From 544203079cfbe98ec58b88524256f292e3f542b5 Mon Sep 17 00:00:00 2001 From: Anton Gladky Date: Tue, 23 Nov 2021 20:14:35 +0100 Subject: [PATCH] New upstream version 9.1.0+dfsg1 --- .clang-format | 16 +- .clang-tidy | 93 + .kitware-release-paraview.json | 11 + Accelerators/Vtkm/CMakeLists.txt | 178 - Accelerators/Vtkm/Core/CMakeLists.txt | 115 + Accelerators/Vtkm/Core/Testing/CMakeLists.txt | 1 + .../Vtkm/Core/Testing/Cxx/CMakeLists.txt | 36 + .../Core/Testing/Cxx/TestVTKMDataArray.cxx | 106 + .../Testing/Cxx/TestVTKMImplicitDataArray.cxx | 99 + .../TestVTKMImplicitDataArray.png.sha512 | 1 + Accelerators/Vtkm/Core/vtk.module | 25 + Accelerators/Vtkm/Core/vtkmConfigCore.h.in | 55 + Accelerators/Vtkm/Core/vtkmDataArray.cxx | 36 + Accelerators/Vtkm/Core/vtkmDataArray.h | 128 + Accelerators/Vtkm/Core/vtkmFilterPolicy.h | 48 + .../Vtkm/Core/vtkmlib/DataArrayConverters.cxx | 215 + .../Vtkm/Core/vtkmlib/DataArrayConverters.h | 136 + .../Vtkm/Core/vtkmlib/DataArrayConverters.hxx | 74 + Accelerators/Vtkm/Core/vtkmlib/PortalTraits.h | 147 + Accelerators/Vtkm/Core/vtkmlib/Portals.cxx | 29 + Accelerators/Vtkm/Core/vtkmlib/Portals.h | 139 + .../Vtkm/{ => Core}/vtkmlib/Portals.hxx | 0 .../Vtkm/Core/vtkmlib/vtkmDataArray.hxx | 506 + Accelerators/Vtkm/DataModel/CMakeLists.txt | 119 + .../Vtkm/DataModel/Testing/CMakeLists.txt | 1 + .../Vtkm/DataModel/Testing/Cxx/CMakeLists.txt | 35 + .../DataModel/Testing/Cxx/TestVTKMDataSet.cxx | 402 + Accelerators/Vtkm/DataModel/vtk.module | 15 + .../Vtkm/DataModel/vtkmConfigDataModel.h.in | 55 + Accelerators/Vtkm/DataModel/vtkmDataSet.cxx | 439 + Accelerators/Vtkm/DataModel/vtkmDataSet.h | 195 + .../Vtkm/DataModel/vtkmFilterPolicy.h | 48 + .../DataModel/vtkmlib/ArrayConverters.cxx | 160 + .../Vtkm/DataModel/vtkmlib/ArrayConverters.h | 64 + .../DataModel/vtkmlib/ArrayConverters.hxx | 93 + .../vtkmlib/ArrayConvertersReal.cxx | 0 .../vtkmlib/ArrayConvertersSigned.cxx | 0 .../vtkmlib/ArrayConvertersUnsigned.cxx | 0 .../DataModel/vtkmlib/CellSetConverters.cxx | 282 + .../DataModel/vtkmlib/CellSetConverters.h | 49 + .../DataModel/vtkmlib/DataSetConverters.cxx | 309 + .../DataModel/vtkmlib/DataSetConverters.h | 65 + .../DataModel/vtkmlib/ImageDataConverter.cxx | 172 + .../DataModel/vtkmlib/ImageDataConverter.h | 48 + .../vtkmlib/ImplicitFunctionConverter.cxx | 144 + .../vtkmlib/ImplicitFunctionConverter.h | 46 + .../DataModel/vtkmlib/PolyDataConverter.cxx | 217 + .../DataModel/vtkmlib/PolyDataConverter.h | 43 + .../vtkmlib/UnstructuredGridConverter.cxx | 122 + .../vtkmlib/UnstructuredGridConverter.h | 44 + Accelerators/Vtkm/Filters/CMakeLists.txt | 127 + .../Vtkm/{ => Filters}/Testing/CMakeLists.txt | 0 .../Vtkm/Filters/Testing/Cxx/CMakeLists.txt | 55 + .../Testing/Cxx/TestVTKMCleanGrid.cxx | 0 .../Vtkm/Filters/Testing/Cxx/TestVTKMClip.cxx | 175 + .../Cxx/TestVTKMClipWithImplicitFunction.cxx | 74 + .../Cxx/TestVTKMCoordinateSystemTransform.cxx | 0 .../Testing/Cxx/TestVTKMExternalFaces.cxx | 0 .../Testing/Cxx/TestVTKMExtractVOI.cxx | 85 + .../Filters/Testing/Cxx/TestVTKMGradient.cxx | 324 + .../Cxx/TestVTKMGradientAndVorticity.cxx | 416 + .../Testing/Cxx/TestVTKMHistogram.cxx | 0 .../Testing/Cxx/TestVTKMLevelOfDetail.cxx | 507 + .../Testing/Cxx/TestVTKMMarchingCubes.cxx | 0 .../Testing/Cxx/TestVTKMMarchingCubes2.cxx | 0 .../Testing/Cxx/TestVTKMNDHistogram.cxx | 124 + .../Testing/Cxx/TestVTKMPointElevation.cxx | 114 + .../Testing/Cxx/TestVTKMPointTransform.cxx | 0 .../Testing/Cxx/TestVTKMPolyDataNormals.cxx | 154 + .../Filters/Testing/Cxx/TestVTKMProbe.cxx | 153 + .../Filters/Testing/Cxx/TestVTKMThreshold.cxx | 117 + .../Testing/Cxx/TestVTKMThreshold2.cxx | 91 + .../Cxx/TestVTKMTriangleMeshPointNormals.cxx | 110 + .../Testing/Cxx/TestVTKMWarpScalar.cxx | 0 .../Testing/Cxx/TestVTKMWarpVector.cxx | 0 .../Baseline/TestVTKMCleanGrid.png.sha512 | 0 .../Data/Baseline/TestVTKMClip.png.sha512 | 0 ...estVTKMClipWithImplicitFunction.png.sha512 | 0 .../Baseline/TestVTKMExternalFaces.png.sha512 | 0 .../Baseline/TestVTKMExtractVOI.png.sha512 | 0 .../Baseline/TestVTKMLevelOfDetail.png.sha512 | 0 .../Baseline/TestVTKMMarchingCubes.png.sha512 | 0 .../TestVTKMMarchingCubes2.png.sha512 | 0 .../TestVTKMMarchingCubes_1.png.sha512 | 0 .../TestVTKMPointElevation.png.sha512 | 0 .../TestVTKMPointTransform.png.sha512 | 0 .../TestVTKMPolyDataNormals.png.sha512 | 0 .../Baseline/TestVTKMThreshold.png.sha512 | 0 .../Baseline/TestVTKMThreshold2.png.sha512 | 0 .../Baseline/TestVTKMThreshold_1.png.sha512 | 0 ...estVTKMTriangleMeshPointNormals.png.sha512 | 0 .../Baseline/TestVTKMWarpScalar.png.sha512 | 0 .../Baseline/TestVTKMWarpVector.png.sha512 | 0 .../Testing/Python/CMakeLists.txt | 0 .../Testing/Python/TestVTKMAverageToCells.py | 0 .../Testing/Python/TestVTKMAverageToPoints.py | 0 Accelerators/Vtkm/Filters/vtk.module | 29 + .../Vtkm/Filters/vtkmAverageToCells.cxx | 100 + .../Vtkm/Filters/vtkmAverageToCells.h | 52 + .../Vtkm/Filters/vtkmAverageToPoints.cxx | 101 + .../Vtkm/Filters/vtkmAverageToPoints.h | 51 + Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx | 102 + Accelerators/Vtkm/Filters/vtkmCleanGrid.h | 68 + Accelerators/Vtkm/Filters/vtkmClip.cxx | 220 + Accelerators/Vtkm/Filters/vtkmClip.h | 95 + .../vtkmClipInstantiationsWithField.cxx | 39 + ...ClipInstantiationsWithImplicitFunction.cxx | 32 + Accelerators/Vtkm/Filters/vtkmClipInternals.h | 38 + .../Vtkm/Filters/vtkmConfigFilters.h.in | 55 + Accelerators/Vtkm/Filters/vtkmContour.cxx | 135 + Accelerators/Vtkm/Filters/vtkmContour.h | 57 + .../Filters/vtkmCoordinateSystemTransform.cxx | 205 + .../Filters/vtkmCoordinateSystemTransform.h | 71 + .../Vtkm/Filters/vtkmExternalFaces.cxx | 134 + Accelerators/Vtkm/Filters/vtkmExternalFaces.h | 82 + Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx | 98 + Accelerators/Vtkm/Filters/vtkmExtractVOI.h | 73 + Accelerators/Vtkm/Filters/vtkmGradient.cxx | 245 + Accelerators/Vtkm/Filters/vtkmGradient.h | 71 + Accelerators/Vtkm/Filters/vtkmHistogram.cxx | 166 + Accelerators/Vtkm/Filters/vtkmHistogram.h | 114 + .../Vtkm/Filters/vtkmImageConnectivity.cxx | 101 + .../Vtkm/Filters/vtkmImageConnectivity.h | 61 + .../Vtkm/Filters/vtkmLevelOfDetail.cxx | 167 + Accelerators/Vtkm/Filters/vtkmLevelOfDetail.h | 95 + Accelerators/Vtkm/Filters/vtkmNDHistogram.cxx | 201 + Accelerators/Vtkm/Filters/vtkmNDHistogram.h | 80 + .../Vtkm/Filters/vtkmPointElevation.cxx | 107 + .../Vtkm/Filters/vtkmPointElevation.h | 67 + .../Vtkm/Filters/vtkmPointTransform.cxx | 170 + .../Vtkm/Filters/vtkmPointTransform.h | 63 + .../Vtkm/Filters/vtkmPolyDataNormals.cxx | 132 + .../Vtkm/Filters/vtkmPolyDataNormals.h | 80 + Accelerators/Vtkm/Filters/vtkmProbe.cxx | 265 + Accelerators/Vtkm/Filters/vtkmProbe.h | 156 + Accelerators/Vtkm/Filters/vtkmThreshold.cxx | 102 + Accelerators/Vtkm/Filters/vtkmThreshold.h | 70 + .../Filters/vtkmTriangleMeshPointNormals.cxx | 111 + .../Filters/vtkmTriangleMeshPointNormals.h | 86 + Accelerators/Vtkm/Filters/vtkmWarpScalar.cxx | 187 + Accelerators/Vtkm/Filters/vtkmWarpScalar.h | 65 + Accelerators/Vtkm/Filters/vtkmWarpVector.cxx | 134 + Accelerators/Vtkm/Filters/vtkmWarpVector.h | 52 + Accelerators/Vtkm/Testing/Cxx/CMakeLists.txt | 71 - .../Vtkm/Testing/Cxx/TestVTKMClip.cxx | 172 - .../Cxx/TestVTKMClipWithImplicitFunction.cxx | 73 - .../Vtkm/Testing/Cxx/TestVTKMDataArray.cxx | 106 - .../Vtkm/Testing/Cxx/TestVTKMDataSet.cxx | 400 - .../Vtkm/Testing/Cxx/TestVTKMExtractVOI.cxx | 84 - .../Vtkm/Testing/Cxx/TestVTKMGradient.cxx | 322 - .../Cxx/TestVTKMGradientAndVorticity.cxx | 412 - .../Testing/Cxx/TestVTKMLevelOfDetail.cxx | 507 - .../Vtkm/Testing/Cxx/TestVTKMNDHistogram.cxx | 124 - .../Testing/Cxx/TestVTKMPointElevation.cxx | 113 - .../Testing/Cxx/TestVTKMPolyDataNormals.cxx | 153 - .../Vtkm/Testing/Cxx/TestVTKMProbe.cxx | 149 - .../Vtkm/Testing/Cxx/TestVTKMThreshold.cxx | 114 - .../Vtkm/Testing/Cxx/TestVTKMThreshold2.cxx | 88 - .../Cxx/TestVTKMTriangleMeshPointNormals.cxx | 109 - Accelerators/Vtkm/vtk.module | 31 - Accelerators/Vtkm/vtkmAverageToCells.cxx | 102 - Accelerators/Vtkm/vtkmAverageToCells.h | 53 - Accelerators/Vtkm/vtkmAverageToPoints.cxx | 103 - Accelerators/Vtkm/vtkmAverageToPoints.h | 52 - Accelerators/Vtkm/vtkmCleanGrid.cxx | 104 - Accelerators/Vtkm/vtkmCleanGrid.h | 69 - Accelerators/Vtkm/vtkmClip.cxx | 207 - Accelerators/Vtkm/vtkmClip.h | 93 - Accelerators/Vtkm/vtkmConfig.h.in | 65 - Accelerators/Vtkm/vtkmContour.cxx | 139 - Accelerators/Vtkm/vtkmContour.h | 58 - .../Vtkm/vtkmCoordinateSystemTransform.cxx | 208 - .../Vtkm/vtkmCoordinateSystemTransform.h | 73 - Accelerators/Vtkm/vtkmDataArray.cxx | 36 - Accelerators/Vtkm/vtkmDataArray.h | 128 - Accelerators/Vtkm/vtkmDataArray.hxx | 506 - Accelerators/Vtkm/vtkmDataSet.cxx | 435 - Accelerators/Vtkm/vtkmDataSet.h | 196 - Accelerators/Vtkm/vtkmExternalFaces.cxx | 136 - Accelerators/Vtkm/vtkmExternalFaces.h | 83 - Accelerators/Vtkm/vtkmExtractVOI.cxx | 103 - Accelerators/Vtkm/vtkmExtractVOI.h | 60 - Accelerators/Vtkm/vtkmFilterPolicy.h | 149 - Accelerators/Vtkm/vtkmGradient.cxx | 258 - Accelerators/Vtkm/vtkmGradient.h | 58 - Accelerators/Vtkm/vtkmHistogram.cxx | 168 - Accelerators/Vtkm/vtkmHistogram.h | 115 - Accelerators/Vtkm/vtkmImageConnectivity.cxx | 102 - Accelerators/Vtkm/vtkmImageConnectivity.h | 62 - Accelerators/Vtkm/vtkmLevelOfDetail.cxx | 169 - Accelerators/Vtkm/vtkmLevelOfDetail.h | 96 - Accelerators/Vtkm/vtkmNDHistogram.cxx | 202 - Accelerators/Vtkm/vtkmNDHistogram.h | 81 - Accelerators/Vtkm/vtkmPointElevation.cxx | 99 - Accelerators/Vtkm/vtkmPointElevation.h | 55 - Accelerators/Vtkm/vtkmPointTransform.cxx | 171 - Accelerators/Vtkm/vtkmPointTransform.h | 64 - Accelerators/Vtkm/vtkmPolyDataNormals.cxx | 125 - Accelerators/Vtkm/vtkmPolyDataNormals.h | 67 - Accelerators/Vtkm/vtkmProbe.cxx | 265 - Accelerators/Vtkm/vtkmProbe.h | 159 - Accelerators/Vtkm/vtkmThreshold.cxx | 96 - Accelerators/Vtkm/vtkmThreshold.h | 57 - .../Vtkm/vtkmTriangleMeshPointNormals.cxx | 115 - .../Vtkm/vtkmTriangleMeshPointNormals.h | 72 - Accelerators/Vtkm/vtkmWarpScalar.cxx | 191 - Accelerators/Vtkm/vtkmWarpScalar.h | 67 - Accelerators/Vtkm/vtkmWarpVector.cxx | 138 - Accelerators/Vtkm/vtkmWarpVector.h | 54 - Accelerators/Vtkm/vtkmlib/ArrayConverters.cxx | 320 - Accelerators/Vtkm/vtkmlib/ArrayConverters.h | 142 - Accelerators/Vtkm/vtkmlib/ArrayConverters.hxx | 132 - .../Vtkm/vtkmlib/CellSetConverters.cxx | 312 - Accelerators/Vtkm/vtkmlib/CellSetConverters.h | 49 - .../Vtkm/vtkmlib/DataSetConverters.cxx | 310 - Accelerators/Vtkm/vtkmlib/DataSetConverters.h | 65 - .../Vtkm/vtkmlib/ImageDataConverter.cxx | 172 - .../Vtkm/vtkmlib/ImageDataConverter.h | 48 - .../vtkmlib/ImplicitFunctionConverter.cxx | 157 - .../Vtkm/vtkmlib/ImplicitFunctionConverter.h | 46 - .../Vtkm/vtkmlib/PolyDataConverter.cxx | 181 - Accelerators/Vtkm/vtkmlib/PolyDataConverter.h | 43 - Accelerators/Vtkm/vtkmlib/PortalTraits.h | 147 - Accelerators/Vtkm/vtkmlib/Portals.cxx | 29 - Accelerators/Vtkm/vtkmlib/Portals.h | 139 - .../vtkmlib/UnstructuredGridConverter.cxx | 122 - .../Vtkm/vtkmlib/UnstructuredGridConverter.h | 44 - CMake/CTestCustom.cmake.in | 48 +- CMake/CheckCXXSourceRuns.cmake | 62 - CMake/FindCGNS.cmake | 48 + CMake/FindEXPAT.cmake | 2 +- CMake/FindExprTk.cmake | 43 + CMake/FindFreetype.cmake | 2 +- CMake/FindLZMA.cmake | 2 +- CMake/FindLibXml2.cmake | 2 +- CMake/FindMEMKIND.cmake | 71 + CMake/FindNetCDF.cmake | 35 + CMake/FindODBC.cmake | 4 +- CMake/FindOGG.cmake | 2 +- CMake/FindOpenMP.cmake | 553 - CMake/FindOpenSlide.cmake | 38 +- CMake/FindOpenVR.cmake | 5 +- CMake/FindSDL2.cmake | 31 + CMake/FindTBB.cmake | 38 +- CMake/NewCMake/CMakeParseArguments.cmake | 21 - .../FindPackageHandleStandardArgs.cmake | 395 - CMake/NewCMake/FindPackageMessage.cmake | 57 - .../SelectLibraryConfigurations.cmake | 81 - CMake/RasterizeSVG.cmake | 7 +- CMake/VTKDetermineVersion.cmake | 106 + CMake/VTKcppcheckSuppressions.txt | 22 +- ...asicConfigVersion-AnyNewerVersion.cmake.in | 37 - .../BasicConfigVersion-ExactVersion.cmake.in | 52 - ...sicConfigVersion-SameMajorVersion.cmake.in | 51 - ...sicConfigVersion-SameMinorVersion.cmake.in | 55 - .../3.11/CMakePackageConfigHelpers.cmake | 332 - .../3.11/WriteBasicConfigVersionFile.cmake | 53 - CMake/patches/3.16/FindMPI.cmake | 1780 - CMake/patches/3.16/FindMPI/libver_mpi.c | 20 - CMake/patches/3.16/FindMPI/test_mpi.c | 31 - CMake/patches/3.18/FindPython/Support.cmake | 47 +- CMake/patches/3.19/FindJPEG.cmake | 136 + CMake/patches/3.19/FindLibArchive.cmake | 76 + CMake/patches/3.19/FindSQLite3.cmake | 68 + CMake/patches/3.19/FindX11.cmake | 878 + CMake/patches/3.20/FindGDAL.cmake | 199 + CMake/patches/3.22/FindMPI.cmake | 1893 + .../FindMPI/fortranparam_mpi.f90.in | 0 CMake/patches/3.22/FindMPI/libver_mpi.c | 20 + .../{3.16 => 3.22}/FindMPI/libver_mpi.f90.in | 0 .../{3.16 => 3.22}/FindMPI/mpiver.f90.in | 0 CMake/patches/3.22/FindMPI/test_mpi.c | 38 + .../{3.16 => 3.22}/FindMPI/test_mpi.f90.in | 0 CMake/patches/99/FindGDAL.cmake | 120 - CMake/patches/99/FindHDF5.cmake | 825 +- CMake/patches/99/FindJPEG.cmake | 128 - CMake/patches/99/FindLibArchive.cmake | 71 - CMake/patches/99/FindOpenGL.cmake | 336 +- CMake/patches/99/FindSQLite3.cmake | 66 - CMake/patches/99/FindX11.cmake | 729 - CMake/vtk-config.cmake.in | 43 +- CMake/vtkAndroid.cmake | 2 +- CMake/vtkCompilerDynamicAnalysisFlags.cmake | 18 - CMake/vtkCompilerPlatformFlags.cmake | 2 +- CMake/vtkDetectLibraryType.cmake | 7 +- CMake/vtkDirectories.cmake | 14 - CMake/vtkEncodeString.cmake | 7 +- CMake/vtkHashSource.cmake | 7 +- CMake/vtkInstallCMakePackage.cmake | 52 +- CMake/vtkInstallCMakePackageHelpers.cmake | 25 +- CMake/vtkMobileDevices.cmake | 17 +- CMake/vtkModule.cmake | 787 +- CMake/vtkModuleGraphviz.cmake | 7 +- CMake/vtkModuleJson.cmake | 7 +- CMake/vtkModuleRemote.cmake | 3 +- CMake/vtkModuleTesting.cmake | 143 +- CMake/vtkModuleWrapJava.cmake | 48 +- CMake/vtkModuleWrapPython.cmake | 126 +- CMake/vtkObjectFactory.cmake | 26 +- CMake/vtkObjectFactory.cxx.in | 3 + CMake/vtkOpenGLOptions.cmake | 43 +- CMake/vtkQt.cmake | 31 + CMake/vtkSanitize.cmake | 41 + CMake/vtkSanitizeFlags.cmake | 32 + CMake/vtkTestVideoForWindows.cmake | 54 - CMake/vtkTesting.cmake | 35 +- CMake/vtkTestingRenderingDriver.cmake | 7 +- CMake/vtkVersion.cmake | 4 +- CMake/vtkWrapSettings.cmake | 14 +- CMake/vtkiOS.cmake | 2 + CMakeLists.txt | 162 +- CONTRIBUTING.md | 2 +- Charts/Core/CMakeLists.txt | 10 +- Charts/Core/Testing/Cxx/CMakeLists.txt | 12 +- Charts/Core/Testing/Cxx/TestAreaPlot.cxx | 5 +- Charts/Core/Testing/Cxx/TestAxes.cxx | 8 +- Charts/Core/Testing/Cxx/TestAxes2.cxx | 2 +- Charts/Core/Testing/Cxx/TestBagPlot.cxx | 5 +- Charts/Core/Testing/Cxx/TestBarGraph.cxx | 2 +- .../Testing/Cxx/TestBarGraphHorizontal.cxx | 5 +- .../Testing/Cxx/TestBarGraphSelection.cxx | 2 +- Charts/Core/Testing/Cxx/TestBoxPlot.cxx | 5 +- Charts/Core/Testing/Cxx/TestBoxPlot2.cxx | 5 +- .../Core/Testing/Cxx/TestCategoryLegend.cxx | 2 +- .../Core/Testing/Cxx/TestChartBadPoints.cxx | 5 +- Charts/Core/Testing/Cxx/TestChartDouble.cxx | 2 +- .../Testing/Cxx/TestChartDoubleColors.cxx | 5 +- .../Cxx/TestChartDoubleColorsOpaque.cxx | 5 +- Charts/Core/Testing/Cxx/TestChartMatrix.cxx | 2 +- Charts/Core/Testing/Cxx/TestChartMatrix2.cxx | 164 + Charts/Core/Testing/Cxx/TestChartMatrix3.cxx | 128 + Charts/Core/Testing/Cxx/TestChartPicking.cxx | 134 + Charts/Core/Testing/Cxx/TestChartUnicode.cxx | 2 +- .../Testing/Cxx/TestChartXYInvertedAxis.cxx | 2 +- Charts/Core/Testing/Cxx/TestChartXYZ.cxx | 7 +- .../Cxx/TestChartXYZMarginsRotations.cxx | 177 + .../Cxx/TestChartXYZOuterEdgeLabelling.cxx | 183 + .../Testing/Cxx/TestChartXYZUnconstrained.cxx | 175 + Charts/Core/Testing/Cxx/TestChartsOn3D.cxx | 5 +- .../TestColorTransferControlPointsItem.cxx | 137 + .../Testing/Cxx/TestColorTransferFunction.cxx | 5 +- .../Cxx/TestCompositeControlPointsItem.cxx | 59 + Charts/Core/Testing/Cxx/TestContext.cxx | 4 +- Charts/Core/Testing/Cxx/TestContextArea.cxx | 2 +- .../Cxx/TestContextAreaFixedAspect.cxx | 2 +- .../Cxx/TestContextAreaFixedMargins.cxx | 2 +- .../Testing/Cxx/TestContextAreaFixedRect.cxx | 2 +- Charts/Core/Testing/Cxx/TestContextImage.cxx | 2 +- .../Testing/Cxx/TestContextItemStacking.cxx | 2 +- Charts/Core/Testing/Cxx/TestContextScene.cxx | 2 +- .../Core/Testing/Cxx/TestContextUnicode.cxx | 7 +- .../Cxx/TestControlPointsHandleItem.cxx | 5 +- .../Testing/Cxx/TestControlPointsItem.cxx | 137 - .../Cxx/TestControlPointsItemEvents.cxx | 4 +- Charts/Core/Testing/Cxx/TestDiagram.cxx | 4 +- .../Core/Testing/Cxx/TestFreeTypeRender.cxx | 2 +- .../Testing/Cxx/TestFunctionalBagPlot.cxx | 5 +- Charts/Core/Testing/Cxx/TestHistogram2D.cxx | 5 +- .../Testing/Cxx/TestLegendHiddenPlots.cxx | 5 +- Charts/Core/Testing/Cxx/TestLinePlot.cxx | 2 +- Charts/Core/Testing/Cxx/TestLinePlot2.cxx | 2 +- Charts/Core/Testing/Cxx/TestLinePlot3D.cxx | 3 +- .../Testing/Cxx/TestLinePlotAxisFonts.cxx | 2 +- .../Core/Testing/Cxx/TestLinePlotDouble.cxx | 2 +- .../Core/Testing/Cxx/TestLinePlotDouble2.cxx | 2 +- .../Testing/Cxx/TestLinePlotInteraction.cxx | 2 +- .../Testing/Cxx/TestLinePlotSelection.cxx | 2 +- .../Testing/Cxx/TestLinePlotSelection2.cxx | 2 +- .../Cxx/TestLinePlotSelectionMultiBlock.cxx | 109 + .../Cxx/TestMultipleChartRenderers.cxx | 2 +- .../Testing/Cxx/TestMultipleRenderers.cxx | 2 +- .../Cxx/TestMultipleScalarsToColors.cxx | 5 +- .../Testing/Cxx/TestParallelCoordinates.cxx | 2 +- .../Cxx/TestParallelCoordinatesDouble.cxx | 2 +- Charts/Core/Testing/Cxx/TestPieChart.cxx | 5 +- .../Cxx/TestPlotBarRangeHandlesItem.cxx | 235 + Charts/Core/Testing/Cxx/TestPlotMatrix.cxx | 2 +- .../Testing/Cxx/TestPlotRangeHandlesItem.cxx | 350 + Charts/Core/Testing/Cxx/TestPropItem.cxx | 2 +- .../Core/Testing/Cxx/TestQtContextUnicode.cxx | 4 +- Charts/Core/Testing/Cxx/TestQtDiagram.cxx | 4 +- .../Cxx/TestRangeHandlesItemEvents.cxx | 4 +- .../Core/Testing/Cxx/TestScalarsToColors.cxx | 5 +- Charts/Core/Testing/Cxx/TestScatterPlot.cxx | 5 +- .../Testing/Cxx/TestScatterPlotMatrix.cxx | 2 +- .../Cxx/TestScatterPlotMatrixVehicles.cxx | 2 +- .../Cxx/TestScatterPlotMatrixVisible.cxx | 2 +- .../Core/Testing/Cxx/TestScientificPlot.cxx | 2 +- .../Core/Testing/Cxx/TestStackedBarGraph.cxx | 5 +- Charts/Core/Testing/Cxx/TestStackedPlot.cxx | 5 +- Charts/Core/Testing/Cxx/TestZoomAxis.cxx | 2 +- .../Data/Baseline/TestChartMatrix2.png.sha512 | 1 + .../Data/Baseline/TestChartMatrix3.png.sha512 | 1 + .../Data/Baseline/TestChartXYZ.png.sha512 | 2 +- .../TestChartXYZMarginsRotations.png.sha512 | 1 + .../TestChartXYZOuterEdgeLabelling.png.sha512 | 1 + .../TestChartXYZUnconstrained.png.sha512 | 1 + .../TestContextItemStacking.png.sha512 | 2 +- .../TestInteractiveChartXYZ.png.sha512 | 2 +- .../Data/Baseline/TestLinePlot3D.png.sha512 | 2 +- ...TestLinePlotSelectionMultiBlock.png.sha512 | 1 + .../Data/Baseline/TestSurfacePlot.png.sha512 | 2 +- Charts/Core/vtk.module | 1 + Charts/Core/vtkAxis.cxx | 198 +- Charts/Core/vtkAxis.h | 174 +- Charts/Core/vtkAxisExtended.cxx | 2 +- Charts/Core/vtkAxisExtended.h | 4 +- Charts/Core/vtkCategoryLegend.cxx | 39 +- Charts/Core/vtkCategoryLegend.h | 18 +- Charts/Core/vtkChart.cxx | 70 +- Charts/Core/vtkChart.h | 60 +- Charts/Core/vtkChartBox.cxx | 65 +- Charts/Core/vtkChartBox.h | 26 +- Charts/Core/vtkChartHistogram2D.cxx | 25 +- Charts/Core/vtkChartLegend.cxx | 42 +- Charts/Core/vtkChartLegend.h | 52 +- Charts/Core/vtkChartMatrix.cxx | 751 +- Charts/Core/vtkChartMatrix.h | 148 +- Charts/Core/vtkChartParallelCoordinates.cxx | 64 +- Charts/Core/vtkChartParallelCoordinates.h | 4 +- Charts/Core/vtkChartPie.cxx | 41 +- Charts/Core/vtkChartXY.cxx | 541 +- Charts/Core/vtkChartXY.h | 104 +- Charts/Core/vtkChartXYZ.cxx | 930 +- Charts/Core/vtkChartXYZ.h | 227 +- Charts/Core/vtkColorLegend.cxx | 48 +- Charts/Core/vtkColorLegend.h | 20 +- .../vtkColorTransferControlPointsItem.cxx | 35 +- .../Core/vtkColorTransferControlPointsItem.h | 18 +- Charts/Core/vtkColorTransferFunctionItem.cxx | 20 +- Charts/Core/vtkCompositeControlPointsItem.cxx | 62 +- Charts/Core/vtkCompositeControlPointsItem.h | 52 +- .../Core/vtkCompositeTransferFunctionItem.cxx | 17 +- Charts/Core/vtkContextArea.h | 36 +- Charts/Core/vtkContextPolygon.cxx | 24 +- Charts/Core/vtkControlPointsItem.cxx | 364 +- Charts/Core/vtkControlPointsItem.h | 161 +- Charts/Core/vtkInteractiveArea.cxx | 3 +- Charts/Core/vtkInteractiveArea.h | 6 +- Charts/Core/vtkLookupTableItem.cxx | 17 +- Charts/Core/vtkPiecewiseControlPointsItem.cxx | 26 +- Charts/Core/vtkPiecewiseControlPointsItem.h | 13 +- Charts/Core/vtkPiecewiseFunctionItem.cxx | 17 +- Charts/Core/vtkPiecewisePointHandleItem.cxx | 30 +- Charts/Core/vtkPiecewisePointHandleItem.h | 8 +- Charts/Core/vtkPlot.cxx | 155 +- Charts/Core/vtkPlot.h | 105 +- Charts/Core/vtkPlot3D.cxx | 40 +- Charts/Core/vtkPlot3D.h | 20 +- Charts/Core/vtkPlotArea.cxx | 31 +- Charts/Core/vtkPlotArea.h | 18 +- Charts/Core/vtkPlotBag.cxx | 35 +- Charts/Core/vtkPlotBag.h | 12 +- Charts/Core/vtkPlotBar.cxx | 85 +- Charts/Core/vtkPlotBar.h | 52 +- Charts/Core/vtkPlotBarRangeHandlesItem.cxx | 101 + Charts/Core/vtkPlotBarRangeHandlesItem.h | 75 + Charts/Core/vtkPlotBox.cxx | 41 +- Charts/Core/vtkPlotBox.h | 30 +- Charts/Core/vtkPlotFunctionalBag.cxx | 43 +- Charts/Core/vtkPlotFunctionalBag.h | 14 +- Charts/Core/vtkPlotGrid.cxx | 12 +- Charts/Core/vtkPlotGrid.h | 4 +- Charts/Core/vtkPlotHistogram2D.cxx | 37 +- Charts/Core/vtkPlotHistogram2D.h | 10 +- Charts/Core/vtkPlotLine.cxx | 15 +- Charts/Core/vtkPlotLine.h | 4 +- Charts/Core/vtkPlotLine3D.cxx | 10 +- Charts/Core/vtkPlotParallelCoordinates.cxx | 38 +- Charts/Core/vtkPlotParallelCoordinates.h | 24 +- Charts/Core/vtkPlotPie.cxx | 34 +- Charts/Core/vtkPlotPie.h | 14 +- Charts/Core/vtkPlotPoints.cxx | 58 +- Charts/Core/vtkPlotPoints.h | 50 +- Charts/Core/vtkPlotPoints3D.cxx | 10 +- Charts/Core/vtkPlotRangeHandlesItem.cxx | 636 + Charts/Core/vtkPlotRangeHandlesItem.h | 256 + Charts/Core/vtkPlotStacked.cxx | 57 +- Charts/Core/vtkPlotStacked.h | 16 +- Charts/Core/vtkPlotSurface.cxx | 32 +- Charts/Core/vtkPlotSurface.h | 8 +- Charts/Core/vtkRangeHandlesItem.cxx | 302 +- Charts/Core/vtkRangeHandlesItem.h | 121 +- Charts/Core/vtkScalarsToColorsItem.cxx | 27 +- Charts/Core/vtkScalarsToColorsItem.h | 26 +- Charts/Core/vtkScatterPlotMatrix.cxx | 81 +- Charts/Core/vtkScatterPlotMatrix.h | 64 +- .../Cxx/TestBufferedRenderWindowExporter.cxx | 4 +- .../TestPartitionedRenderWindowExporter.cxx | 4 +- Common/Archive/vtkBufferedArchiver.cxx | 26 +- Common/Archive/vtkBufferedArchiver.h | 32 +- Common/Archive/vtkPartitionedArchiver.cxx | 28 +- Common/Archive/vtkPartitionedArchiver.h | 36 +- .../Testing/Cxx/TestCategoricalColors.cxx | 2 +- .../Cxx/TestColorSeriesLookupTables.cxx | 16 +- Common/Color/Testing/Cxx/TestNamedColors.cxx | 44 +- Common/Color/vtkColorSeries.cxx | 60 +- Common/Color/vtkColorSeries.h | 21 +- Common/Color/vtkNamedColors.cxx | 93 +- Common/Color/vtkNamedColors.h | 43 +- .../vtkBilinearQuadIntersection.cxx | 16 +- .../vtkBilinearQuadIntersection.h | 6 +- .../vtkCardinalSpline.cxx | 14 +- .../ComputationalGeometry/vtkCardinalSpline.h | 8 +- .../vtkKochanekSpline.cxx | 12 +- .../ComputationalGeometry/vtkKochanekSpline.h | 16 +- .../vtkParametricBohemianDome.h | 4 +- .../vtkParametricBoy.cxx | 10 +- .../ComputationalGeometry/vtkParametricBoy.h | 4 +- .../vtkParametricConicSpiral.cxx | 10 +- .../vtkParametricConicSpiral.h | 16 +- .../vtkParametricCrossCap.cxx | 10 +- .../vtkParametricDini.cxx | 23 +- .../ComputationalGeometry/vtkParametricDini.h | 13 +- .../vtkParametricEllipsoid.cxx | 10 +- .../vtkParametricEllipsoid.h | 12 +- .../vtkParametricEnneper.cxx | 10 +- .../vtkParametricFigure8Klein.cxx | 10 +- .../vtkParametricFigure8Klein.h | 4 +- .../vtkParametricFunction.cxx | 6 +- .../vtkParametricFunction.h | 56 +- .../vtkParametricKlein.cxx | 10 +- .../ComputationalGeometry/vtkParametricKuen.h | 4 +- .../vtkParametricMobius.cxx | 10 +- .../vtkParametricMobius.h | 4 +- .../vtkParametricPluckerConoid.h | 4 +- .../vtkParametricRandomHills.cxx | 18 +- .../vtkParametricRandomHills.h | 40 +- .../vtkParametricRoman.cxx | 10 +- .../vtkParametricRoman.h | 4 +- .../vtkParametricSpline.cxx | 24 +- .../vtkParametricSpline.h | 28 +- .../vtkParametricSuperEllipsoid.cxx | 10 +- .../vtkParametricSuperEllipsoid.h | 20 +- .../vtkParametricSuperToroid.cxx | 10 +- .../vtkParametricSuperToroid.h | 28 +- .../vtkParametricTorus.cxx | 10 +- .../vtkParametricTorus.h | 8 +- Common/Core/CMakeLists.txt | 191 +- Common/Core/SMP/Common/vtkSMPThreadLocalAPI.h | 215 + .../Common/vtkSMPThreadLocalImplAbstract.h | 78 + Common/Core/SMP/Common/vtkSMPToolsAPI.cxx | 222 + Common/Core/SMP/Common/vtkSMPToolsAPI.h | 301 + Common/Core/SMP/Common/vtkSMPToolsImpl.h | 110 + Common/Core/SMP/Common/vtkSMPToolsInternal.h | 109 + Common/Core/SMP/OpenMP/vtkAtomic.cxx | 173 - Common/Core/SMP/OpenMP/vtkAtomic.h.in | 293 - Common/Core/SMP/OpenMP/vtkSMPThreadLocal.h.in | 180 - .../SMP/OpenMP/vtkSMPThreadLocalBackend.cxx | 268 + .../SMP/OpenMP/vtkSMPThreadLocalBackend.h | 185 + .../Core/SMP/OpenMP/vtkSMPThreadLocalImpl.cxx | 268 - .../Core/SMP/OpenMP/vtkSMPThreadLocalImpl.h | 133 + .../SMP/OpenMP/vtkSMPThreadLocalImpl.h.in | 189 - Common/Core/SMP/OpenMP/vtkSMPTools.cxx | 61 - Common/Core/SMP/OpenMP/vtkSMPToolsImpl.cxx | 91 + Common/Core/SMP/OpenMP/vtkSMPToolsImpl.txx | 145 + .../Core/SMP/OpenMP/vtkSMPToolsInternal.h.in | 98 - .../STDThread/vtkSMPThreadLocalBackend.cxx | 224 + .../SMP/STDThread/vtkSMPThreadLocalBackend.h | 186 + .../SMP/STDThread/vtkSMPThreadLocalImpl.h | 133 + .../Core/SMP/STDThread/vtkSMPThreadPool.cxx | 74 + Common/Core/SMP/STDThread/vtkSMPThreadPool.h | 66 + Common/Core/SMP/STDThread/vtkSMPToolsImpl.cxx | 69 + Common/Core/SMP/STDThread/vtkSMPToolsImpl.txx | 158 + Common/Core/SMP/Sequential/vtkAtomic.cxx | 278 - Common/Core/SMP/Sequential/vtkAtomic.h.in | 467 - .../SMP/Sequential/vtkSMPThreadLocal.h.in | 229 - .../SMP/Sequential/vtkSMPThreadLocalImpl.h | 177 + Common/Core/SMP/Sequential/vtkSMPTools.cxx | 26 - .../Core/SMP/Sequential/vtkSMPToolsImpl.cxx | 41 + .../Core/SMP/Sequential/vtkSMPToolsImpl.txx | 119 + .../SMP/Sequential/vtkSMPToolsInternal.h.in | 73 - Common/Core/SMP/TBB/vtkAtomic.h.in | 247 - Common/Core/SMP/TBB/vtkSMPThreadLocal.h.in | 208 - Common/Core/SMP/TBB/vtkSMPThreadLocalImpl.h | 117 + Common/Core/SMP/TBB/vtkSMPTools.cxx | 68 - Common/Core/SMP/TBB/vtkSMPToolsImpl.cxx | 96 + Common/Core/SMP/TBB/vtkSMPToolsImpl.txx | 195 + Common/Core/SMP/TBB/vtkSMPToolsInternal.h.in | 97 - Common/Core/Testing/Cxx/CMakeLists.txt | 35 +- .../Testing/Cxx/ExampleDataArrayRangeAPI.cxx | 2 +- .../Cxx/ExampleDataArrayRangeDispatch.cxx | 4 +- Common/Core/Testing/Cxx/TestArrayAPI.cxx | 24 +- .../Testing/Cxx/TestArrayAPIConvenience.cxx | 4 +- Common/Core/Testing/Cxx/TestArrayAPIDense.cxx | 4 +- .../Core/Testing/Cxx/TestArrayAPISparse.cxx | 17 +- Common/Core/Testing/Cxx/TestArrayBool.cxx | 4 +- .../Core/Testing/Cxx/TestArrayDispatchers.cxx | 21 +- .../Testing/Cxx/TestArrayFreeFunctions.cxx | 4 +- .../Cxx/TestArrayInterpolationDense.cxx | 8 +- Common/Core/Testing/Cxx/TestArrayLookup.cxx | 4 +- .../Core/Testing/Cxx/TestArrayNullValues.cxx | 2 +- Common/Core/Testing/Cxx/TestArraySize.cxx | 3 +- .../Core/Testing/Cxx/TestArrayUserTypes.cxx | 8 +- Common/Core/Testing/Cxx/TestArrayVariants.cxx | 3 +- Common/Core/Testing/Cxx/TestBitArray.cxx | 93 + Common/Core/Testing/Cxx/TestCLI11.cxx | 48 + Common/Core/Testing/Cxx/TestCollection.cxx | 8 +- .../Testing/Cxx/TestConditionVariable.cxx | 8 +- Common/Core/Testing/Cxx/TestCxxFeatures.cxx | 38 +- .../Core/Testing/Cxx/TestDataArrayAPI.cxx.in | 1 - .../Testing/Cxx/TestDataArrayTupleRange.cxx | 49 +- .../Testing/Cxx/TestDataArrayValueRange.cxx | 40 +- Common/Core/Testing/Cxx/TestFMT.cxx | 34 + .../Testing/Cxx/TestGenericDataArrayAPI.cxx | 86 +- .../Cxx/TestLoggerDisableSignalHandler.cmake | 22 + .../Cxx/TestLoggerDisableSignalHandler.cxx | 31 + .../Core/Testing/Cxx/TestMersenneTwister.cxx | 10 +- Common/Core/Testing/Cxx/TestNew.cxx | 2 + .../Core/Testing/Cxx/TestOStreamWrapper.cxx | 27 +- Common/Core/Testing/Cxx/TestObjectFactory.cxx | 12 +- Common/Core/Testing/Cxx/TestObservers.cxx | 16 +- .../Testing/Cxx/TestObserversPerformance.cxx | 6 +- Common/Core/Testing/Cxx/TestSMP.cxx | 302 +- .../Core/Testing/Cxx/TestScalarsToColors.cxx | 12 +- Common/Core/Testing/Cxx/TestSmartPointer.cxx | 6 +- .../Testing/Cxx/TestSparseArrayValidation.cxx | 3 +- .../Testing/Cxx/TestSystemInformation.cxx | 7 +- .../Core/Testing/Cxx/TestUnicodeStringAPI.cxx | 3 + .../Testing/Cxx/TestUnicodeStringArrayAPI.cxx | 3 + Common/Core/Testing/Cxx/TestVariant.cxx | 17 + Common/Core/Testing/Cxx/TestWeakPointer.cxx | 3 + Common/Core/Testing/Cxx/UnitTestMath.cxx | 506 +- Common/Core/Testing/Cxx/otherStringArray.cxx | 39 +- Common/Core/Testing/Cxx/vtkTestNewVar.h | 7 +- Common/Core/Testing/Python/CMakeLists.txt | 2 + Common/Core/Testing/Python/TestFilePath.py | 45 + .../Core/Testing/Python/TestNumpyInterface.py | 6 +- .../Core/Testing/Python/TestNumpySupport.py | 2 - .../Testing/Python/TestNumpyWeakReference.py | 4 +- Common/Core/Testing/Python/TestVersion.py | 18 + Common/Core/vtk.module | 2 + Common/Core/vtkAOSDataArrayTemplate.h | 60 +- Common/Core/vtkAOSDataArrayTemplate.txx | 26 + Common/Core/vtkAbstractArray.cxx | 99 +- Common/Core/vtkAbstractArray.h | 46 +- Common/Core/vtkAndroidOutputWindow.cxx | 16 +- Common/Core/vtkAndroidOutputWindow.h | 12 +- Common/Core/vtkAnimationCue.cxx | 20 +- Common/Core/vtkAnimationCue.h | 28 +- Common/Core/vtkArchiver.cxx | 19 +- Common/Core/vtkArchiver.h | 20 +- Common/Core/vtkArray.cxx | 10 +- Common/Core/vtkArray.h | 30 +- Common/Core/vtkArrayCoordinates.h | 4 +- Common/Core/vtkArrayDispatch.h | 3 +- Common/Core/vtkArrayDispatch.txx | 14 +- Common/Core/vtkArrayIterator.cxx | 6 +- Common/Core/vtkArrayIteratorTemplate.h | 10 +- Common/Core/vtkArrayIteratorTemplate.txx | 6 +- Common/Core/vtkArrayRange.h | 8 +- Common/Core/vtkArrayWeights.cxx | 9 +- Common/Core/vtkAssume.h | 2 +- Common/Core/vtkAtomicTypeConcepts.h | 48 - Common/Core/vtkBitArray.cxx | 134 +- Common/Core/vtkBitArray.h | 69 +- Common/Core/vtkBitArrayIterator.cxx | 32 +- Common/Core/vtkBitArrayIterator.h | 6 +- Common/Core/vtkBoxMuellerRandomSequence.cxx | 14 +- Common/Core/vtkBoxMuellerRandomSequence.h | 4 +- Common/Core/vtkBreakPoint.cxx | 2 +- Common/Core/vtkBreakPoint.h | 8 +- Common/Core/vtkBuffer.h | 96 +- Common/Core/vtkBuild.h.in | 21 + Common/Core/vtkByteSwap.cxx | 59 +- Common/Core/vtkByteSwap.h | 30 +- Common/Core/vtkCharArray.cxx | 9 +- Common/Core/vtkCharArray.h | 14 + Common/Core/vtkCollection.cxx | 14 +- Common/Core/vtkCollection.h | 4 +- Common/Core/vtkCollectionIterator.cxx | 16 +- Common/Core/vtkCollectionIterator.h | 4 +- Common/Core/vtkCollectionRange.h | 16 +- Common/Core/vtkCommand.cxx | 8 + Common/Core/vtkCommand.h | 24 +- .../Core/vtkCommonInformationKeyManager.cxx | 12 +- Common/Core/vtkCommonInformationKeyManager.h | 4 +- Common/Core/vtkCompiler.h | 54 + Common/Core/vtkConditionVariable.cxx | 7 +- Common/Core/vtkConditionVariable.h | 16 +- Common/Core/vtkConfigure.h | 52 + Common/Core/vtkConfigure.h.in | 145 - Common/Core/vtkConfigureDeprecated.h.in | 24 + Common/Core/vtkCriticalSection.h | 12 +- Common/Core/vtkDataArray.cxx | 213 +- Common/Core/vtkDataArray.h | 54 +- Common/Core/vtkDataArrayCollection.cxx | 5 + Common/Core/vtkDataArrayCollection.h | 6 +- .../Core/vtkDataArrayCollectionIterator.cxx | 12 +- Common/Core/vtkDataArrayCollectionIterator.h | 4 +- Common/Core/vtkDataArrayIteratorMacro.h | 10 +- Common/Core/vtkDataArrayMeta.h | 9 +- Common/Core/vtkDataArrayPrivate.txx | 37 +- Common/Core/vtkDataArraySelection.cxx | 52 +- Common/Core/vtkDataArraySelection.h | 18 +- Common/Core/vtkDataArrayTemplate.h | 52 - Common/Core/vtkDataArrayTupleRange_AOS.h | 62 +- Common/Core/vtkDataArrayTupleRange_Generic.h | 82 +- Common/Core/vtkDataArrayValueRange_AOS.h | 1 + Common/Core/vtkDataArrayValueRange_Generic.h | 44 +- Common/Core/vtkDebug.h.in | 24 + Common/Core/vtkDebugLeaks.cxx | 115 +- Common/Core/vtkDebugLeaks.h | 19 +- Common/Core/vtkDebugLeaksManager.h | 4 +- Common/Core/vtkDebugRangeIterators.h.in | 24 + Common/Core/vtkDenseArray.h | 20 +- Common/Core/vtkDenseArray.txx | 4 +- Common/Core/vtkDeprecation.h | 140 + Common/Core/vtkDoubleArray.cxx | 9 +- Common/Core/vtkDoubleArray.h | 1 + Common/Core/vtkDynamicLoader.cxx | 22 +- Common/Core/vtkDynamicLoader.h | 12 +- Common/Core/vtkEndian.h.in | 31 + Common/Core/vtkEventData.h | 75 +- Common/Core/vtkEventForwarderCommand.h | 2 +- Common/Core/vtkFeatures.h.in | 24 + Common/Core/vtkFileOutputWindow.h | 16 +- Common/Core/vtkFloatArray.cxx | 9 +- Common/Core/vtkFloatArray.h | 1 + Common/Core/vtkFloatingPointExceptions.cxx | 6 +- Common/Core/vtkGarbageCollector.cxx | 95 +- Common/Core/vtkGarbageCollector.h | 9 +- Common/Core/vtkGarbageCollectorManager.h | 4 +- Common/Core/vtkGaussianRandomSequence.cxx | 15 +- Common/Core/vtkGaussianRandomSequence.h | 12 +- Common/Core/vtkGenericDataArray.cxx | 14 - Common/Core/vtkGenericDataArray.h | 61 +- Common/Core/vtkGenericDataArray.txx | 10 +- Common/Core/vtkGenericDataArrayLookupHelper.h | 7 +- ...nericDataArrayValueRangeInstantiate.cxx.in | 36 + Common/Core/vtkIOStream.h | 2 - Common/Core/vtkIOStreamFwd.h | 2 - Common/Core/vtkIdList.cxx | 47 +- Common/Core/vtkIdList.h | 26 +- Common/Core/vtkIdListCollection.cxx | 5 + Common/Core/vtkIdListCollection.h | 6 +- Common/Core/vtkIdTypeArray.cxx | 9 +- Common/Core/vtkIdTypeArray.h | 1 + Common/Core/vtkInformation.cxx | 154 +- Common/Core/vtkInformation.h | 89 +- Common/Core/vtkInformationDataObjectKey.cxx | 14 +- Common/Core/vtkInformationDataObjectKey.h | 4 +- Common/Core/vtkInformationDoubleKey.cxx | 18 +- Common/Core/vtkInformationDoubleKey.h | 4 +- Common/Core/vtkInformationDoubleVectorKey.cxx | 24 +- Common/Core/vtkInformationDoubleVectorKey.h | 4 +- Common/Core/vtkInformationIdTypeKey.cxx | 18 +- Common/Core/vtkInformationIdTypeKey.h | 4 +- Common/Core/vtkInformationInformationKey.cxx | 14 +- Common/Core/vtkInformationInformationKey.h | 4 +- .../vtkInformationInformationVectorKey.cxx | 16 +- .../Core/vtkInformationInformationVectorKey.h | 4 +- Common/Core/vtkInformationIntegerKey.cxx | 18 +- Common/Core/vtkInformationIntegerKey.h | 4 +- .../Core/vtkInformationIntegerPointerKey.cxx | 22 +- Common/Core/vtkInformationIntegerPointerKey.h | 4 +- .../Core/vtkInformationIntegerVectorKey.cxx | 28 +- Common/Core/vtkInformationIntegerVectorKey.h | 4 +- Common/Core/vtkInformationIterator.cxx | 18 +- Common/Core/vtkInformationIterator.h | 4 +- Common/Core/vtkInformationKey.cxx | 34 +- Common/Core/vtkInformationKey.h | 8 +- Common/Core/vtkInformationKeyLookup.cxx | 6 +- Common/Core/vtkInformationKeyVectorKey.cxx | 28 +- Common/Core/vtkInformationKeyVectorKey.h | 4 +- Common/Core/vtkInformationObjectBaseKey.cxx | 14 +- Common/Core/vtkInformationObjectBaseKey.h | 4 +- .../vtkInformationObjectBaseVectorKey.cxx | 42 +- .../Core/vtkInformationObjectBaseVectorKey.h | 16 +- Common/Core/vtkInformationRequestKey.cxx | 16 +- Common/Core/vtkInformationRequestKey.h | 4 +- Common/Core/vtkInformationStringKey.cxx | 18 +- Common/Core/vtkInformationStringKey.h | 4 +- Common/Core/vtkInformationStringVectorKey.cxx | 30 +- Common/Core/vtkInformationStringVectorKey.h | 6 +- Common/Core/vtkInformationUnsignedLongKey.cxx | 18 +- Common/Core/vtkInformationUnsignedLongKey.h | 4 +- Common/Core/vtkInformationVariantKey.cxx | 18 +- Common/Core/vtkInformationVariantKey.h | 4 +- .../Core/vtkInformationVariantVectorKey.cxx | 24 +- Common/Core/vtkInformationVariantVectorKey.h | 4 +- Common/Core/vtkInformationVector.cxx | 28 +- Common/Core/vtkInformationVector.h | 16 +- Common/Core/vtkIntArray.cxx | 9 +- Common/Core/vtkIntArray.h | 1 + Common/Core/vtkLegacy.h.in | 105 + Common/Core/vtkLogger.cxx | 105 +- Common/Core/vtkLogger.h | 67 +- Common/Core/vtkLongArray.cxx | 9 +- Common/Core/vtkLongArray.h | 1 + Common/Core/vtkLongLongArray.cxx | 9 +- Common/Core/vtkLongLongArray.h | 1 + Common/Core/vtkLookupTable.cxx | 84 +- Common/Core/vtkLookupTable.h | 82 +- Common/Core/vtkMappedDataArray.h | 12 +- Common/Core/vtkMath.cxx | 472 +- Common/Core/vtkMath.h | 588 +- Common/Core/vtkMathPrivate.hxx | 957 + Common/Core/vtkMathUtilities.h | 19 +- Common/Core/vtkMatrixUtilities.h | 359 + Common/Core/vtkMersenneTwister.cxx | 23 +- Common/Core/vtkMersenneTwister.h | 14 +- Common/Core/vtkMersenneTwister_Private.cxx | 26 +- Common/Core/vtkMeta.h | 8 +- .../Core/vtkMinimalStandardRandomSequence.cxx | 25 +- .../Core/vtkMinimalStandardRandomSequence.h | 11 +- Common/Core/vtkMultiThreader.cxx | 57 +- Common/Core/vtkMultiThreader.h | 30 +- Common/Core/vtkMutexLock.cxx | 4 +- Common/Core/vtkMutexLock.h | 12 +- Common/Core/vtkNew.h | 19 +- Common/Core/vtkOStrStreamWrapper.cxx | 12 +- Common/Core/vtkOStrStreamWrapper.h | 6 +- Common/Core/vtkOStreamWrapper.cxx | 29 +- Common/Core/vtkOStreamWrapper.h | 24 +- Common/Core/vtkObject.cxx | 96 +- Common/Core/vtkObject.h | 44 +- Common/Core/vtkObjectBase.cxx | 279 +- Common/Core/vtkObjectBase.h | 83 +- Common/Core/vtkObjectFactory.cxx | 32 +- Common/Core/vtkObjectFactory.h | 32 +- Common/Core/vtkObjectFactoryCollection.cxx | 5 + Common/Core/vtkObjectFactoryCollection.h | 6 +- Common/Core/vtkOldStyleCallbackCommand.h | 4 +- Common/Core/vtkOptions.h.in | 24 + Common/Core/vtkOutputWindow.cxx | 15 +- Common/Core/vtkOutputWindow.h | 31 +- Common/Core/vtkOverrideInformation.h | 4 +- .../Core/vtkOverrideInformationCollection.cxx | 5 + .../Core/vtkOverrideInformationCollection.h | 6 +- Common/Core/vtkPlatform.h.in | 32 + Common/Core/vtkPoints.cxx | 2 +- Common/Core/vtkPoints.h | 13 +- Common/Core/vtkPoints2D.cxx | 2 +- Common/Core/vtkPoints2D.h | 6 +- Common/Core/vtkRandomPool.cxx | 18 +- Common/Core/vtkRandomPool.h | 29 +- Common/Core/vtkRandomSequence.cxx | 13 +- Common/Core/vtkRandomSequence.h | 9 +- Common/Core/vtkSMP.h.in | 34 + Common/Core/vtkSMPSelection.cmake | 160 +- Common/Core/vtkSMPThreadLocal.h | 155 + Common/Core/vtkSMPThreadLocalObject.h | 16 +- Common/Core/vtkSMPTools.cxx | 67 + Common/Core/vtkSMPTools.h | 397 +- Common/Core/vtkSOADataArrayTemplate.h | 35 +- Common/Core/vtkSOADataArrayTemplate.txx | 28 + .../vtkSOADataArrayTemplateInstantiate.cxx | 37 - .../vtkSOADataArrayTemplateInstantiate.cxx.in | 23 + Common/Core/vtkScalarsToColors.cxx | 175 +- Common/Core/vtkScalarsToColors.h | 48 +- Common/Core/vtkScaledSOADataArrayTemplate.h | 23 +- Common/Core/vtkScaledSOADataArrayTemplate.txx | 6 + ...kScaledSOADataArrayTemplateInstantiate.cxx | 37 - ...aledSOADataArrayTemplateInstantiate.cxx.in | 23 + Common/Core/vtkSetGet.h | 127 +- Common/Core/vtkShortArray.cxx | 9 +- Common/Core/vtkShortArray.h | 1 + Common/Core/vtkSignedCharArray.cxx | 9 +- Common/Core/vtkSignedCharArray.h | 1 + Common/Core/vtkSimpleCriticalSection.cxx | 4 +- Common/Core/vtkSimpleCriticalSection.h | 5 +- Common/Core/vtkSmartPointer.h | 32 +- Common/Core/vtkSmartPointerBase.cxx | 27 +- Common/Core/vtkSmartPointerBase.h | 10 +- Common/Core/vtkSortDataArray.cxx | 40 +- Common/Core/vtkSortDataArray.h | 16 +- Common/Core/vtkSparseArray.h | 10 +- Common/Core/vtkSparseArray.txx | 10 +- Common/Core/vtkStdString.cxx | 2 +- Common/Core/vtkStdString.h | 19 +- Common/Core/vtkStringArray.cxx | 89 +- Common/Core/vtkStringArray.h | 22 +- Common/Core/vtkSystemIncludes.h | 18 - Common/Core/vtkThreads.h.in | 41 + Common/Core/vtkTimePointUtility.h | 4 +- Common/Core/vtkTimeStamp.cxx | 10 +- Common/Core/vtkTimeStamp.h | 4 +- Common/Core/vtkToolkits.h | 23 + Common/Core/vtkToolkits.h.in | 44 - Common/Core/vtkType.h | 28 +- Common/Core/vtkTypeList.h | 4 +- Common/Core/vtkTypeList.txx | 14 +- Common/Core/vtkTypedArray.cxx.in | 8 +- Common/Core/vtkTypedArray.h | 29 +- Common/Core/vtkTypedArray.h.in | 1 - Common/Core/vtkTypedDataArray.txx | 8 +- Common/Core/vtkUnicodeString.cxx | 8 +- Common/Core/vtkUnicodeString.h | 43 +- Common/Core/vtkUnicodeStringArray.cxx | 4 + Common/Core/vtkUnicodeStringArray.h | 7 +- Common/Core/vtkUnsignedCharArray.cxx | 9 +- Common/Core/vtkUnsignedCharArray.h | 1 + Common/Core/vtkUnsignedIntArray.cxx | 9 +- Common/Core/vtkUnsignedIntArray.h | 1 + Common/Core/vtkUnsignedLongArray.cxx | 9 +- Common/Core/vtkUnsignedLongArray.h | 1 + Common/Core/vtkUnsignedLongLongArray.cxx | 9 +- Common/Core/vtkUnsignedLongLongArray.h | 1 + Common/Core/vtkUnsignedShortArray.cxx | 9 +- Common/Core/vtkUnsignedShortArray.h | 1 + Common/Core/vtkVariant.cxx | 68 +- Common/Core/vtkVariant.h | 41 +- Common/Core/vtkVariantArray.cxx | 84 +- Common/Core/vtkVariantArray.h | 11 +- Common/Core/vtkVariantCast.cxx | 42 + Common/Core/vtkVariantCast.h | 12 +- Common/Core/vtkVariantCreate.h | 7 +- Common/Core/vtkVariantExtract.h | 3 + Common/Core/vtkVariantInlineOperators.h | 4 +- Common/Core/vtkVariantToNumeric.cxx | 2 +- Common/Core/vtkVersion.cxx | 14 + Common/Core/vtkVersion.h | 8 +- Common/Core/vtkVersionFull.h.in | 22 + Common/Core/vtkVoidArray.cxx | 1 + Common/Core/vtkVoidArray.h | 1 + Common/Core/vtkWeakPointer.h | 29 +- Common/Core/vtkWeakPointerBase.cxx | 27 +- Common/Core/vtkWeakPointerBase.h | 9 +- Common/Core/vtkWeakReference.cxx | 10 +- Common/Core/vtkWin32Header.h | 8 +- Common/Core/vtkWin32OutputWindow.cxx | 151 +- Common/Core/vtkWin32OutputWindow.h | 27 +- Common/Core/vtkWin32ProcessOutputWindow.cxx | 12 +- Common/Core/vtkWindow.cxx | 21 +- Common/Core/vtkWindow.h | 65 +- Common/Core/vtkWrappingHints.h | 3 + Common/Core/vtkXMLFileOutputWindow.cxx | 5 + Common/Core/vtkXMLFileOutputWindow.h | 20 +- Common/DataModel/CMakeLists.txt | 10 +- .../Testing/Cxx/BezierInterpolation.cxx | 17 +- Common/DataModel/Testing/Cxx/CMakeLists.txt | 23 +- .../Cxx/TestAngularPeriodicDataArray.cxx | 8 +- Common/DataModel/Testing/Cxx/TestBezier.cxx | 4 + .../Testing/Cxx/TestBiQuadraticQuad.cxx | 2 +- .../DataModel/Testing/Cxx/TestCellArray.cxx | 21 - .../Testing/Cxx/TestCellInflation.cxx | 208 + Common/DataModel/Testing/Cxx/TestColor.cxx | 2 +- .../Testing/Cxx/TestComputeBoundingSphere.cxx | 6 +- .../Testing/Cxx/TestDataArrayDispatcher.cxx | 3 + .../Testing/Cxx/TestDataAssembly.cxx | 125 + .../Testing/Cxx/TestDataAssemblyUtilities.cxx | 275 + .../DataModel/Testing/Cxx/TestDispatchers.cxx | 3 + .../DataModel/Testing/Cxx/TestGenericCell.cxx | 9 +- Common/DataModel/Testing/Cxx/TestGraph2.cxx | 1 + .../Testing/Cxx/TestHigherOrderCell.cxx | 22 +- .../Testing/Cxx/TestHyperTreeGridBitmask.cxx | 253 + .../Cxx/TestHyperTreeGridElderChildIndex.cxx | 220 + .../Cxx/TestIncrementalOctreePointLocator.cxx | 901 + .../Testing/Cxx/TestInterpolationDerivs.cxx | 30 +- .../Cxx/TestInterpolationFunctions.cxx | 20 +- .../Testing/Cxx/TestLagrangeTetra.cxx | 2 +- .../Testing/Cxx/TestLagrangeTriangle.cxx | 2 +- .../Testing/Cxx/TestLagrangeWedge.cxx | 2 +- .../Testing/Cxx/TestMappedGridDeepCopy.cxx | 11 +- ...TestMeanValueCoordinatesInterpolation2.cxx | 4 +- .../DataModel/Testing/Cxx/TestMemkindData.cxx | 268 + .../Testing/Cxx/TestPentagonalPrism.cxx | 21 +- .../Testing/Cxx/TestPiecewiseFunction.cxx | 60 + .../DataModel/Testing/Cxx/TestPixelExtent.cxx | 16 +- .../Testing/Cxx/TestPointLocators.cxx | 4 +- .../DataModel/Testing/Cxx/TestPolyhedron0.cxx | 3 + .../DataModel/Testing/Cxx/TestPolyhedron1.cxx | 3 + .../DataModel/Testing/Cxx/TestPolyhedron2.cxx | 5 +- .../DataModel/Testing/Cxx/TestPolyhedron3.cxx | 5 +- .../TestPolyhedronCombinatorialContouring.cxx | 2 - .../Testing/Cxx/TestPolyhedronContouring.cxx | 2 - .../Testing/Cxx/TestPolyhedronConvexity.cxx | 3 + .../Testing/Cxx/TestPolyhedronCutter.cxx | 4 +- .../Testing/Cxx/TestQuadraticPolygon.cxx | 2 +- Common/DataModel/Testing/Cxx/TestRect.cxx | 6 +- .../Testing/Cxx/TestSelectionExpression.cxx | 2 +- .../Testing/Cxx/TestSelectionSubtract.cxx | 1 - ...estSimpleIncrementalOctreePointLocator.cxx | 71 + Common/DataModel/Testing/Cxx/TestTable.cxx | 18 +- .../Testing/Cxx/TestThreadedCopy.cxx | 99 + Common/DataModel/Testing/Cxx/TestTriangle.cxx | 52 + Common/DataModel/Testing/Cxx/TestVector.cxx | 2 +- .../Testing/Cxx/TestVectorOperators.cxx | 22 +- .../DataModel/Testing/Cxx/UnitTestCells.cxx | 383 +- Common/DataModel/Testing/Cxx/UnitTestLine.cxx | 76 +- .../Cxx/UnitTestPlanesIntersection.cxx | 3 + .../Cxx/UnitTestTriangleIntersection.cxx | 12 +- .../Testing/Cxx/otherCellBoundaries.cxx | 3 + .../Testing/Cxx/otherCellPosition.cxx | 3 + .../Testing/Cxx/quadCellConsistency.cxx | 80 +- .../Testing/Cxx/quadraticEvaluation.cxx | 321 +- .../Testing/Cxx/quadraticIntersection.cxx | 279 +- .../Baseline/quadraticIntersection.png.sha512 | 2 +- .../quadraticIntersection_1.png.sha512 | 1 - .../quadraticIntersection_2.png.sha512 | 1 - .../DataModel/Testing/Python/CMakeLists.txt | 2 + .../Testing/Python/TestComputeBounds.py | 66 + .../DataModel/Testing/Python/TestGetBounds.py | 4 - .../Testing/Python/TestGetBounds2.py | 10 +- .../Testing/Python/TestHyperTreeGrid2DFull.py | 8 +- .../Python/TestHyperTreeGrid2DFullGI.py | 4 +- .../Testing/Python/TestHyperTreeGrid2DMask.py | 2 +- .../Python/TestHyperTreeGrid2DWithFilters.py | 4 +- .../TestHyperTreeGrid3DCursorsMandel.py | 12 +- .../Testing/Python/TestHyperTreeGrid3DFull.py | 4 +- .../Python/TestHyperTreeGrid3DMandel.py | 6 +- .../Testing/Python/TestHyperTreeGrid3DMask.py | 4 +- .../Python/TestHyperTreeGrid3DWithFilters.py | 4 +- .../Python/TestNumericArrayImageData.py | 3 +- .../TestStaticPointLocatorWithDataSet.py | 13 + .../Python/TestUniformHyperTreeGrid2DFull.py | 4 +- .../Python/TestUniformHyperTreeGrid2DMask.py | 4 +- .../TestUniformHyperTreeGrid2DWithFilters.py | 4 +- .../TestUniformHyperTreeGrid3DWithFilters.py | 4 +- Common/DataModel/vtk.module | 3 + Common/DataModel/vtkAMRBox.cxx | 66 +- Common/DataModel/vtkAMRBox.h | 38 +- Common/DataModel/vtkAMRDataInternals.cxx | 28 +- Common/DataModel/vtkAMRDataInternals.h | 1 + Common/DataModel/vtkAMRInformation.cxx | 7 +- Common/DataModel/vtkAMRInformation.h | 26 +- Common/DataModel/vtkAMRUtilities.cxx | 33 +- Common/DataModel/vtkAMRUtilities.h | 10 +- Common/DataModel/vtkAbstractCellLinks.cxx | 8 +- Common/DataModel/vtkAbstractCellLinks.h | 19 +- Common/DataModel/vtkAbstractCellLocator.cxx | 44 +- Common/DataModel/vtkAbstractCellLocator.h | 24 +- .../DataModel/vtkAbstractElectronicData.cxx | 8 +- Common/DataModel/vtkAbstractElectronicData.h | 9 +- Common/DataModel/vtkAbstractPointLocator.cxx | 14 +- Common/DataModel/vtkAbstractPointLocator.h | 24 +- .../DataModel/vtkAdjacentVertexIterator.cxx | 8 +- Common/DataModel/vtkAdjacentVertexIterator.h | 8 +- .../DataModel/vtkAngularPeriodicDataArray.h | 12 +- Common/DataModel/vtkAnimationScene.cxx | 32 +- Common/DataModel/vtkAnimationScene.h | 20 +- Common/DataModel/vtkAnnotation.h | 13 +- Common/DataModel/vtkAnnotationLayers.cxx | 4 +- Common/DataModel/vtkAnnotationLayers.h | 17 +- Common/DataModel/vtkArrayData.cxx | 6 +- Common/DataModel/vtkArrayData.h | 3 - Common/DataModel/vtkArrayListTemplate.h | 69 +- Common/DataModel/vtkArrayListTemplate.txx | 101 +- Common/DataModel/vtkAtom.cxx | 25 +- Common/DataModel/vtkAtom.h | 8 +- Common/DataModel/vtkAttributesErrorMetric.cxx | 17 +- Common/DataModel/vtkAttributesErrorMetric.h | 12 +- Common/DataModel/vtkBSPCuts.cxx | 44 +- Common/DataModel/vtkBSPCuts.h | 13 +- Common/DataModel/vtkBSPIntersections.cxx | 54 +- Common/DataModel/vtkBSPIntersections.h | 11 +- Common/DataModel/vtkBezierCurve.cxx | 10 +- Common/DataModel/vtkBezierCurve.h | 3 + Common/DataModel/vtkBezierHexahedron.cxx | 20 +- Common/DataModel/vtkBezierHexahedron.h | 9 +- Common/DataModel/vtkBezierInterpolation.cxx | 58 +- Common/DataModel/vtkBezierInterpolation.h | 23 +- Common/DataModel/vtkBezierQuadrilateral.cxx | 12 +- Common/DataModel/vtkBezierQuadrilateral.h | 5 +- Common/DataModel/vtkBezierTetra.cxx | 34 +- Common/DataModel/vtkBezierTetra.h | 7 +- Common/DataModel/vtkBezierTriangle.cxx | 28 +- Common/DataModel/vtkBezierTriangle.h | 5 +- Common/DataModel/vtkBezierWedge.cxx | 22 +- Common/DataModel/vtkBezierWedge.h | 11 +- Common/DataModel/vtkBiQuadraticQuad.cxx | 40 +- Common/DataModel/vtkBiQuadraticQuad.h | 1 - .../vtkBiQuadraticQuadraticHexahedron.cxx | 55 +- .../vtkBiQuadraticQuadraticHexahedron.h | 12 +- .../vtkBiQuadraticQuadraticWedge.cxx | 53 +- .../DataModel/vtkBiQuadraticQuadraticWedge.h | 12 +- Common/DataModel/vtkBiQuadraticTriangle.cxx | 38 +- Common/DataModel/vtkBiQuadraticTriangle.h | 12 +- Common/DataModel/vtkBond.cxx | 29 +- Common/DataModel/vtkBond.h | 8 +- Common/DataModel/vtkBoundingBox.cxx | 337 +- Common/DataModel/vtkBoundingBox.h | 166 +- Common/DataModel/vtkBox.cxx | 118 +- Common/DataModel/vtkBox.h | 21 +- Common/DataModel/vtkCell.cxx | 383 +- Common/DataModel/vtkCell.h | 55 +- Common/DataModel/vtkCell3D.cxx | 81 +- Common/DataModel/vtkCell3D.h | 24 +- Common/DataModel/vtkCellArray.cxx | 158 +- Common/DataModel/vtkCellArray.h | 126 +- Common/DataModel/vtkCellArrayIterator.h | 12 +- Common/DataModel/vtkCellData.cxx | 3 + Common/DataModel/vtkCellData.h | 5 +- Common/DataModel/vtkCellIterator.cxx | 6 + Common/DataModel/vtkCellIterator.h | 1 + Common/DataModel/vtkCellLinks.cxx | 61 +- Common/DataModel/vtkCellLinks.h | 21 +- Common/DataModel/vtkCellLocator.cxx | 61 +- Common/DataModel/vtkCellLocator.h | 6 +- Common/DataModel/vtkCellLocatorStrategy.cxx | 14 +- Common/DataModel/vtkCellLocatorStrategy.h | 8 +- Common/DataModel/vtkCellType.h | 1 + Common/DataModel/vtkCellTypes.cxx | 30 +- Common/DataModel/vtkCellTypes.h | 4 +- .../DataModel/vtkClosestNPointsStrategy.cxx | 12 +- Common/DataModel/vtkClosestNPointsStrategy.h | 8 +- Common/DataModel/vtkClosestPointStrategy.cxx | 20 +- Common/DataModel/vtkClosestPointStrategy.h | 8 +- Common/DataModel/vtkColor.h | 36 +- Common/DataModel/vtkCompositeDataIterator.cxx | 12 +- Common/DataModel/vtkCompositeDataIterator.h | 12 +- Common/DataModel/vtkCompositeDataSet.cxx | 80 +- Common/DataModel/vtkCompositeDataSet.h | 36 +- Common/DataModel/vtkCompositeDataSet.txx | 59 + .../vtkCompositeDataSetNodeReference.h | 4 +- Common/DataModel/vtkCompositeDataSetRange.h | 11 +- Common/DataModel/vtkCone.h | 10 +- Common/DataModel/vtkConvexPointSet.cxx | 38 +- Common/DataModel/vtkConvexPointSet.h | 40 +- Common/DataModel/vtkCubicLine.cxx | 36 +- Common/DataModel/vtkCubicLine.h | 12 +- Common/DataModel/vtkCylinder.cxx | 12 +- Common/DataModel/vtkCylinder.h | 18 +- Common/DataModel/vtkDataArrayDispatcher.h | 19 +- Common/DataModel/vtkDataAssembly.cxx | 1340 + Common/DataModel/vtkDataAssembly.h | 477 + Common/DataModel/vtkDataAssemblyUtilities.cxx | 834 + Common/DataModel/vtkDataAssemblyUtilities.h | 138 + Common/DataModel/vtkDataAssemblyVisitor.h | 124 + Common/DataModel/vtkDataObject.cxx | 60 +- Common/DataModel/vtkDataObject.h | 32 +- Common/DataModel/vtkDataObjectCollection.cxx | 5 + Common/DataModel/vtkDataObjectCollection.h | 6 +- Common/DataModel/vtkDataObjectTree.cxx | 109 +- Common/DataModel/vtkDataObjectTree.h | 24 +- Common/DataModel/vtkDataObjectTreeInternals.h | 2 +- .../DataModel/vtkDataObjectTreeIterator.cxx | 26 +- Common/DataModel/vtkDataObjectTreeIterator.h | 8 +- Common/DataModel/vtkDataObjectTreeRange.h | 10 +- Common/DataModel/vtkDataObjectTypes.cxx | 419 +- Common/DataModel/vtkDataObjectTypes.h | 18 +- Common/DataModel/vtkDataSet.cxx | 114 +- Common/DataModel/vtkDataSet.h | 36 +- Common/DataModel/vtkDataSetAttributes.cxx | 281 +- Common/DataModel/vtkDataSetAttributes.h | 82 +- .../vtkDataSetAttributesFieldList.cxx | 39 +- .../DataModel/vtkDataSetAttributesFieldList.h | 8 +- Common/DataModel/vtkDataSetCellIterator.cxx | 3 +- Common/DataModel/vtkDataSetCollection.cxx | 5 + Common/DataModel/vtkDataSetCollection.h | 14 +- Common/DataModel/vtkDirectedAcyclicGraph.cxx | 14 +- Common/DataModel/vtkDirectedAcyclicGraph.h | 4 +- Common/DataModel/vtkDirectedGraph.cxx | 16 +- Common/DataModel/vtkDirectedGraph.h | 4 +- Common/DataModel/vtkDispatcher.h | 14 +- Common/DataModel/vtkDispatcher_Private.h | 26 +- .../DataModel/vtkDistributedGraphHelper.cxx | 26 +- Common/DataModel/vtkDistributedGraphHelper.h | 4 +- Common/DataModel/vtkDoubleDispatcher.h | 13 +- Common/DataModel/vtkEdgeListIterator.cxx | 16 +- Common/DataModel/vtkEdgeTable.cxx | 55 +- Common/DataModel/vtkEdgeTable.h | 4 +- Common/DataModel/vtkEmptyCell.cxx | 18 +- Common/DataModel/vtkEmptyCell.h | 8 +- .../DataModel/vtkExplicitStructuredGrid.cxx | 98 +- Common/DataModel/vtkExplicitStructuredGrid.h | 59 +- .../vtkExtractStructuredGridHelper.cxx | 32 +- .../vtkExtractStructuredGridHelper.h | 2 +- Common/DataModel/vtkFieldData.cxx | 183 +- Common/DataModel/vtkFieldData.h | 43 +- Common/DataModel/vtkFindCellStrategy.cxx | 18 +- Common/DataModel/vtkFindCellStrategy.h | 4 +- Common/DataModel/vtkGenericAdaptorCell.cxx | 32 +- Common/DataModel/vtkGenericAdaptorCell.h | 4 +- Common/DataModel/vtkGenericAttribute.cxx | 6 +- .../vtkGenericAttributeCollection.cxx | 52 +- .../DataModel/vtkGenericAttributeCollection.h | 20 +- Common/DataModel/vtkGenericCell.cxx | 76 +- Common/DataModel/vtkGenericCell.h | 9 +- Common/DataModel/vtkGenericCellIterator.cxx | 6 +- Common/DataModel/vtkGenericCellIterator.h | 4 +- .../DataModel/vtkGenericCellTessellator.cxx | 18 +- Common/DataModel/vtkGenericCellTessellator.h | 12 +- Common/DataModel/vtkGenericDataSet.cxx | 44 +- Common/DataModel/vtkGenericDataSet.h | 21 +- Common/DataModel/vtkGenericEdgeTable.cxx | 63 +- Common/DataModel/vtkGenericEdgeTable.h | 14 +- .../vtkGenericInterpolatedVelocityField.cxx | 8 +- .../vtkGenericInterpolatedVelocityField.h | 18 +- Common/DataModel/vtkGenericPointIterator.cxx | 6 +- Common/DataModel/vtkGenericPointIterator.h | 8 +- .../vtkGenericSubdivisionErrorMetric.cxx | 10 +- .../vtkGenericSubdivisionErrorMetric.h | 12 +- Common/DataModel/vtkGeometricErrorMetric.cxx | 18 +- Common/DataModel/vtkGeometricErrorMetric.h | 8 +- Common/DataModel/vtkGraph.cxx | 196 +- Common/DataModel/vtkGraph.h | 64 +- Common/DataModel/vtkGraphEdge.cxx | 6 +- Common/DataModel/vtkGraphEdge.h | 12 +- Common/DataModel/vtkGraphInternals.cxx | 23 +- Common/DataModel/vtkGraphInternals.h | 7 +- Common/DataModel/vtkHexagonalPrism.cxx | 231 +- Common/DataModel/vtkHexagonalPrism.h | 24 +- Common/DataModel/vtkHexahedron.cxx | 218 +- Common/DataModel/vtkHexahedron.h | 23 +- .../vtkHierarchicalBoxDataIterator.h | 4 +- .../DataModel/vtkHierarchicalBoxDataSet.cxx | 14 +- Common/DataModel/vtkHierarchicalBoxDataSet.h | 4 +- Common/DataModel/vtkHigherOrderHexahedron.cxx | 33 +- Common/DataModel/vtkHigherOrderHexahedron.h | 13 +- .../DataModel/vtkHigherOrderInterpolation.cxx | 8 +- .../DataModel/vtkHigherOrderQuadrilateral.cxx | 16 +- .../DataModel/vtkHigherOrderQuadrilateral.h | 5 +- Common/DataModel/vtkHigherOrderTetra.cxx | 100 +- Common/DataModel/vtkHigherOrderTetra.h | 9 +- Common/DataModel/vtkHigherOrderTriangle.cxx | 81 +- Common/DataModel/vtkHigherOrderTriangle.h | 9 +- Common/DataModel/vtkHigherOrderWedge.cxx | 42 +- Common/DataModel/vtkHigherOrderWedge.h | 17 +- Common/DataModel/vtkHyperTree.cxx | 326 +- Common/DataModel/vtkHyperTree.h | 121 +- Common/DataModel/vtkHyperTreeCursor.cxx | 6 +- Common/DataModel/vtkHyperTreeGrid.cxx | 220 +- Common/DataModel/vtkHyperTreeGrid.h | 138 +- Common/DataModel/vtkHyperTreeGridEntry.cxx | 24 +- .../vtkHyperTreeGridGeometryEntry.cxx | 26 +- .../vtkHyperTreeGridGeometryLevelEntry.cxx | 28 +- .../vtkHyperTreeGridGeometryLevelEntry.h | 1 - .../DataModel/vtkHyperTreeGridLevelEntry.cxx | 28 +- Common/DataModel/vtkHyperTreeGridLevelEntry.h | 1 - .../vtkHyperTreeGridNonOrientedCursor.cxx | 56 +- .../vtkHyperTreeGridNonOrientedCursor.h | 12 +- ...HyperTreeGridNonOrientedGeometryCursor.cxx | 60 +- ...tkHyperTreeGridNonOrientedGeometryCursor.h | 8 +- ...perTreeGridNonOrientedMooreSuperCursor.cxx | 14 +- ...HyperTreeGridNonOrientedMooreSuperCursor.h | 2 +- ...reeGridNonOrientedMooreSuperCursorData.cxx | 12 +- ...eeGridNonOrientedMooreSuperCursorLight.cxx | 15 +- ...TreeGridNonOrientedMooreSuperCursorLight.h | 3 +- ...vtkHyperTreeGridNonOrientedSuperCursor.cxx | 88 +- .../vtkHyperTreeGridNonOrientedSuperCursor.h | 12 +- ...perTreeGridNonOrientedSuperCursorLight.cxx | 75 +- ...HyperTreeGridNonOrientedSuperCursorLight.h | 12 +- ...eeGridNonOrientedVonNeumannSuperCursor.cxx | 13 +- ...TreeGridNonOrientedVonNeumannSuperCursor.h | 2 +- ...idNonOrientedVonNeumannSuperCursorData.cxx | 6 +- ...dNonOrientedVonNeumannSuperCursorLight.cxx | 13 +- ...ridNonOrientedVonNeumannSuperCursorLight.h | 2 +- .../vtkHyperTreeGridOrientedCursor.cxx | 50 +- .../vtkHyperTreeGridOrientedCursor.h | 12 +- ...vtkHyperTreeGridOrientedGeometryCursor.cxx | 56 +- .../vtkHyperTreeGridOrientedGeometryCursor.h | 8 +- Common/DataModel/vtkHyperTreeGridScales.h | 3 + Common/DataModel/vtkImageData.cxx | 473 +- Common/DataModel/vtkImageData.h | 181 +- Common/DataModel/vtkImageTransform.cxx | 70 +- Common/DataModel/vtkImageTransform.h | 16 +- Common/DataModel/vtkImplicitBoolean.h | 12 +- Common/DataModel/vtkImplicitDataSet.cxx | 2 +- Common/DataModel/vtkImplicitDataSet.h | 16 +- Common/DataModel/vtkImplicitFunction.h | 16 +- .../vtkImplicitFunctionCollection.cxx | 5 + .../DataModel/vtkImplicitFunctionCollection.h | 10 +- Common/DataModel/vtkImplicitHalo.cxx | 10 +- Common/DataModel/vtkImplicitHalo.h | 16 +- Common/DataModel/vtkImplicitSelectionLoop.cxx | 16 +- Common/DataModel/vtkImplicitSelectionLoop.h | 22 +- Common/DataModel/vtkImplicitSum.cxx | 20 +- Common/DataModel/vtkImplicitSum.h | 8 +- Common/DataModel/vtkImplicitVolume.cxx | 16 +- Common/DataModel/vtkImplicitVolume.h | 16 +- .../DataModel/vtkImplicitWindowFunction.cxx | 6 +- Common/DataModel/vtkImplicitWindowFunction.h | 20 +- Common/DataModel/vtkInEdgeIterator.cxx | 10 +- Common/DataModel/vtkInEdgeIterator.h | 8 +- Common/DataModel/vtkIncrementalOctreeNode.cxx | 100 +- Common/DataModel/vtkIncrementalOctreeNode.h | 50 +- .../vtkIncrementalOctreePointLocator.cxx | 240 +- .../vtkIncrementalOctreePointLocator.h | 51 +- ...ionQuadratureSchemeDefinitionVectorKey.cxx | 40 +- ...ationQuadratureSchemeDefinitionVectorKey.h | 8 +- Common/DataModel/vtkIntersectionCounter.h | 4 +- .../vtkIterativeClosestPointTransform.cxx | 35 +- .../vtkIterativeClosestPointTransform.h | 48 +- Common/DataModel/vtkKdNode.cxx | 52 +- Common/DataModel/vtkKdNode.h | 40 +- Common/DataModel/vtkKdTree.cxx | 262 +- Common/DataModel/vtkKdTree.h | 60 +- Common/DataModel/vtkKdTreePointLocator.h | 4 +- Common/DataModel/vtkLagrangeCurve.cxx | 5 +- Common/DataModel/vtkLagrangeHexahedron.cxx | 15 +- Common/DataModel/vtkLagrangeHexahedron.h | 6 +- Common/DataModel/vtkLagrangeInterpolation.cxx | 13 +- Common/DataModel/vtkLagrangeInterpolation.h | 10 +- Common/DataModel/vtkLagrangeQuadrilateral.cxx | 7 +- Common/DataModel/vtkLagrangeQuadrilateral.h | 2 +- Common/DataModel/vtkLagrangeTetra.cxx | 45 +- Common/DataModel/vtkLagrangeTetra.h | 4 +- Common/DataModel/vtkLagrangeTriangle.cxx | 29 +- Common/DataModel/vtkLagrangeTriangle.h | 2 +- Common/DataModel/vtkLagrangeWedge.cxx | 17 +- Common/DataModel/vtkLagrangeWedge.h | 8 +- Common/DataModel/vtkLine.cxx | 197 +- Common/DataModel/vtkLine.h | 64 +- Common/DataModel/vtkLocator.cxx | 6 +- Common/DataModel/vtkLocator.h | 32 +- Common/DataModel/vtkMappedUnstructuredGrid.h | 7 +- .../DataModel/vtkMappedUnstructuredGrid.txx | 4 +- .../vtkMappedUnstructuredGridCellIterator.h | 6 +- .../vtkMappedUnstructuredGridCellIterator.txx | 5 +- .../vtkMeanValueCoordinatesInterpolator.cxx | 19 +- .../vtkMeanValueCoordinatesInterpolator.h | 4 +- Common/DataModel/vtkMergePoints.cxx | 6 +- Common/DataModel/vtkMergePoints.h | 8 +- Common/DataModel/vtkMolecule.cxx | 124 +- Common/DataModel/vtkMolecule.h | 60 +- Common/DataModel/vtkMultiBlockDataSet.cxx | 57 +- Common/DataModel/vtkMultiBlockDataSet.h | 16 +- Common/DataModel/vtkMultiPieceDataSet.cxx | 10 +- Common/DataModel/vtkMultiPieceDataSet.h | 10 +- Common/DataModel/vtkMutableDirectedGraph.cxx | 54 +- .../DataModel/vtkMutableUndirectedGraph.cxx | 54 +- Common/DataModel/vtkNonLinearCell.cxx | 4 +- Common/DataModel/vtkNonLinearCell.h | 2 +- .../DataModel/vtkNonMergingPointLocator.cxx | 4 +- Common/DataModel/vtkNonMergingPointLocator.h | 4 +- Common/DataModel/vtkNonOverlappingAMR.h | 4 +- Common/DataModel/vtkOctreePointLocator.cxx | 78 +- Common/DataModel/vtkOctreePointLocator.h | 38 +- .../DataModel/vtkOctreePointLocatorNode.cxx | 36 +- Common/DataModel/vtkOctreePointLocatorNode.h | 44 +- Common/DataModel/vtkOrderedTriangulator.cxx | 85 +- Common/DataModel/vtkOrderedTriangulator.h | 28 +- Common/DataModel/vtkOutEdgeIterator.cxx | 10 +- Common/DataModel/vtkOutEdgeIterator.h | 8 +- Common/DataModel/vtkOverlappingAMR.cxx | 34 +- Common/DataModel/vtkOverlappingAMR.h | 20 +- Common/DataModel/vtkPartitionedDataSet.cxx | 26 +- Common/DataModel/vtkPartitionedDataSet.h | 14 +- .../vtkPartitionedDataSetCollection.cxx | 205 +- .../vtkPartitionedDataSetCollection.h | 79 +- Common/DataModel/vtkPath.cxx | 32 +- Common/DataModel/vtkPath.h | 12 +- Common/DataModel/vtkPentagonalPrism.cxx | 215 +- Common/DataModel/vtkPentagonalPrism.h | 24 +- Common/DataModel/vtkPeriodicDataArray.h | 8 +- Common/DataModel/vtkPerlinNoise.h | 18 +- Common/DataModel/vtkPiecewiseFunction.cxx | 166 +- Common/DataModel/vtkPiecewiseFunction.h | 72 +- Common/DataModel/vtkPixel.cxx | 130 +- Common/DataModel/vtkPixel.h | 34 +- Common/DataModel/vtkPixelExtent.cxx | 36 +- Common/DataModel/vtkPixelExtent.h | 30 +- Common/DataModel/vtkPixelTransfer.cxx | 2 +- Common/DataModel/vtkPixelTransfer.h | 2 +- Common/DataModel/vtkPlane.cxx | 155 +- Common/DataModel/vtkPlane.h | 51 +- Common/DataModel/vtkPlaneCollection.cxx | 5 + Common/DataModel/vtkPlaneCollection.h | 6 +- Common/DataModel/vtkPlanes.cxx | 24 +- Common/DataModel/vtkPlanes.h | 20 +- Common/DataModel/vtkPlanesIntersection.cxx | 12 +- Common/DataModel/vtkPointData.cxx | 24 +- Common/DataModel/vtkPointData.h | 7 +- Common/DataModel/vtkPointLocator.cxx | 76 +- Common/DataModel/vtkPointLocator.h | 34 +- Common/DataModel/vtkPointSet.cxx | 56 +- Common/DataModel/vtkPointSet.h | 90 +- Common/DataModel/vtkPointSetCellIterator.cxx | 3 +- Common/DataModel/vtkPointsProjectedHull.cxx | 5 +- Common/DataModel/vtkPolyData.cxx | 433 +- Common/DataModel/vtkPolyData.h | 86 +- Common/DataModel/vtkPolyDataCollection.cxx | 2 +- Common/DataModel/vtkPolyDataCollection.h | 4 +- Common/DataModel/vtkPolyDataInternals.h | 5 +- Common/DataModel/vtkPolyLine.cxx | 28 +- Common/DataModel/vtkPolyLine.h | 8 +- Common/DataModel/vtkPolyPlane.cxx | 18 +- Common/DataModel/vtkPolyPlane.h | 8 +- Common/DataModel/vtkPolyVertex.cxx | 24 +- Common/DataModel/vtkPolyVertex.h | 4 +- Common/DataModel/vtkPolygon.cxx | 408 +- Common/DataModel/vtkPolygon.h | 79 +- Common/DataModel/vtkPolyhedron.cxx | 292 +- Common/DataModel/vtkPolyhedron.h | 57 +- Common/DataModel/vtkPyramid.cxx | 186 +- Common/DataModel/vtkPyramid.h | 22 +- Common/DataModel/vtkQuad.cxx | 62 +- Common/DataModel/vtkQuad.h | 8 +- Common/DataModel/vtkQuadraticEdge.cxx | 32 +- Common/DataModel/vtkQuadraticEdge.h | 4 +- Common/DataModel/vtkQuadraticHexahedron.cxx | 56 +- Common/DataModel/vtkQuadraticHexahedron.h | 12 +- Common/DataModel/vtkQuadraticLinearQuad.cxx | 42 +- Common/DataModel/vtkQuadraticLinearQuad.h | 8 +- Common/DataModel/vtkQuadraticLinearWedge.cxx | 53 +- Common/DataModel/vtkQuadraticLinearWedge.h | 16 +- Common/DataModel/vtkQuadraticPolygon.cxx | 62 +- Common/DataModel/vtkQuadraticPolygon.h | 16 +- Common/DataModel/vtkQuadraticPyramid.cxx | 68 +- Common/DataModel/vtkQuadraticPyramid.h | 20 +- Common/DataModel/vtkQuadraticQuad.cxx | 44 +- Common/DataModel/vtkQuadraticQuad.h | 8 +- Common/DataModel/vtkQuadraticTetra.cxx | 62 +- Common/DataModel/vtkQuadraticTetra.h | 12 +- Common/DataModel/vtkQuadraticTriangle.cxx | 38 +- Common/DataModel/vtkQuadraticTriangle.h | 8 +- Common/DataModel/vtkQuadraticWedge.cxx | 94 +- Common/DataModel/vtkQuadraticWedge.h | 12 +- .../vtkQuadratureSchemeDefinition.cxx | 32 +- .../DataModel/vtkQuadratureSchemeDefinition.h | 8 +- Common/DataModel/vtkQuadric.h | 10 +- Common/DataModel/vtkRect.h | 33 +- Common/DataModel/vtkRectilinearGrid.cxx | 302 +- Common/DataModel/vtkRectilinearGrid.h | 95 +- Common/DataModel/vtkReebGraph.cxx | 229 +- Common/DataModel/vtkReebGraph.h | 12 +- .../vtkReebGraphSimplificationMetric.cxx | 8 +- .../vtkReebGraphSimplificationMetric.h | 8 +- Common/DataModel/vtkSelection.cxx | 65 +- Common/DataModel/vtkSelection.h | 48 +- Common/DataModel/vtkSelectionNode.cxx | 69 +- Common/DataModel/vtkSelectionNode.h | 306 +- Common/DataModel/vtkSimpleCellTessellator.cxx | 70 +- Common/DataModel/vtkSimpleCellTessellator.h | 12 +- Common/DataModel/vtkSmoothErrorMetric.cxx | 14 +- Common/DataModel/vtkSmoothErrorMetric.h | 4 +- Common/DataModel/vtkSortFieldData.cxx | 10 +- Common/DataModel/vtkSortFieldData.h | 4 +- Common/DataModel/vtkSphere.cxx | 69 +- Common/DataModel/vtkSphere.h | 22 +- Common/DataModel/vtkSpheres.cxx | 22 +- Common/DataModel/vtkSpheres.h | 16 +- Common/DataModel/vtkSpline.cxx | 28 +- Common/DataModel/vtkSpline.h | 20 +- Common/DataModel/vtkStaticCellLinks.cxx | 6 +- Common/DataModel/vtkStaticCellLinks.h | 18 +- Common/DataModel/vtkStaticCellLinksTemplate.h | 29 +- .../DataModel/vtkStaticCellLinksTemplate.txx | 135 +- Common/DataModel/vtkStaticCellLocator.cxx | 163 +- Common/DataModel/vtkStaticCellLocator.h | 36 +- .../DataModel/vtkStaticEdgeLocatorTemplate.h | 126 +- .../vtkStaticEdgeLocatorTemplate.txx | 12 +- Common/DataModel/vtkStaticPointLocator.cxx | 84 +- Common/DataModel/vtkStaticPointLocator.h | 50 +- Common/DataModel/vtkStaticPointLocator2D.cxx | 84 +- Common/DataModel/vtkStaticPointLocator2D.h | 40 +- Common/DataModel/vtkStructuredData.cxx | 143 + Common/DataModel/vtkStructuredData.h | 35 +- Common/DataModel/vtkStructuredExtent.cxx | 6 +- Common/DataModel/vtkStructuredGrid.cxx | 227 +- Common/DataModel/vtkStructuredGrid.h | 37 +- Common/DataModel/vtkStructuredPoints.cxx | 5 + Common/DataModel/vtkStructuredPoints.h | 5 +- .../vtkStructuredPointsCollection.cxx | 2 +- .../DataModel/vtkStructuredPointsCollection.h | 4 +- Common/DataModel/vtkSuperquadric.h | 30 +- Common/DataModel/vtkTable.cxx | 69 +- Common/DataModel/vtkTable.h | 15 +- Common/DataModel/vtkTetra.cxx | 185 +- Common/DataModel/vtkTetra.h | 24 +- Common/DataModel/vtkTree.cxx | 24 +- Common/DataModel/vtkTree.h | 8 +- Common/DataModel/vtkTreeDFSIterator.h | 4 +- Common/DataModel/vtkTreeIterator.h | 10 +- .../DataModel/vtkTriQuadraticHexahedron.cxx | 53 +- Common/DataModel/vtkTriQuadraticHexahedron.h | 12 +- Common/DataModel/vtkTriQuadraticPyramid.cxx | 1083 + Common/DataModel/vtkTriQuadraticPyramid.h | 229 + Common/DataModel/vtkTriangle.cxx | 153 +- Common/DataModel/vtkTriangle.h | 18 +- Common/DataModel/vtkTriangleStrip.cxx | 28 +- Common/DataModel/vtkTriangleStrip.h | 4 +- Common/DataModel/vtkUndirectedGraph.cxx | 22 +- Common/DataModel/vtkUndirectedGraph.h | 4 +- Common/DataModel/vtkUniformGrid.cxx | 76 +- Common/DataModel/vtkUniformGrid.h | 22 +- Common/DataModel/vtkUniformGridAMR.cxx | 74 +- Common/DataModel/vtkUniformGridAMR.h | 3 +- .../vtkUniformGridAMRDataIterator.cxx | 3 +- Common/DataModel/vtkUniformHyperTreeGrid.cxx | 40 +- Common/DataModel/vtkUniformHyperTreeGrid.h | 37 +- Common/DataModel/vtkUnstructuredGrid.cxx | 479 +- Common/DataModel/vtkUnstructuredGrid.h | 86 +- Common/DataModel/vtkUnstructuredGridBase.cxx | 18 +- Common/DataModel/vtkUnstructuredGridBase.h | 4 +- .../vtkUnstructuredGridCellIterator.cxx | 2 +- .../vtkUnstructuredGridCellIterator.h | 20 +- Common/DataModel/vtkVector.h | 83 +- Common/DataModel/vtkVectorOperators.h | 42 +- Common/DataModel/vtkVertex.cxx | 26 +- Common/DataModel/vtkVertex.h | 17 +- Common/DataModel/vtkVertexListIterator.cxx | 8 +- Common/DataModel/vtkVertexListIterator.h | 8 +- Common/DataModel/vtkVoxel.cxx | 196 +- Common/DataModel/vtkVoxel.h | 37 +- Common/DataModel/vtkWedge.cxx | 173 +- Common/DataModel/vtkWedge.h | 22 +- Common/DataModel/vtkXMLDataElement.cxx | 225 +- Common/DataModel/vtkXMLDataElement.h | 72 +- Common/ExecutionModel/CMakeLists.txt | 2 + .../Cxx/TestMultiOutputSimpleFilter.cxx | 6 +- .../Testing/Cxx/TestTemporalSupport.cxx | 3 +- Common/ExecutionModel/vtkAlgorithm.cxx | 208 +- Common/ExecutionModel/vtkAlgorithm.h | 92 +- Common/ExecutionModel/vtkAlgorithmOutput.cxx | 14 +- .../vtkAnnotationLayersAlgorithm.cxx | 22 +- .../ExecutionModel/vtkArrayDataAlgorithm.cxx | 22 +- Common/ExecutionModel/vtkArrayDataAlgorithm.h | 3 +- ...vtkCachedStreamingDemandDrivenPipeline.cxx | 13 +- .../vtkCachedStreamingDemandDrivenPipeline.h | 4 +- Common/ExecutionModel/vtkCastToConcrete.cxx | 2 +- Common/ExecutionModel/vtkCastToConcrete.h | 6 +- .../vtkCompositeDataPipeline.cxx | 69 +- .../ExecutionModel/vtkCompositeDataPipeline.h | 4 +- .../vtkCompositeDataSetAlgorithm.cxx | 22 +- .../vtkCompositeDataSetAlgorithm.h | 14 +- .../ExecutionModel/vtkDataObjectAlgorithm.cxx | 60 +- .../ExecutionModel/vtkDataObjectAlgorithm.h | 23 +- Common/ExecutionModel/vtkDataSetAlgorithm.cxx | 48 +- Common/ExecutionModel/vtkDataSetAlgorithm.h | 50 +- .../vtkDemandDrivenPipeline.cxx | 74 +- .../ExecutionModel/vtkDemandDrivenPipeline.h | 8 +- .../vtkDirectedGraphAlgorithm.cxx | 22 +- Common/ExecutionModel/vtkEnsembleSource.cxx | 8 +- Common/ExecutionModel/vtkEnsembleSource.h | 4 +- Common/ExecutionModel/vtkExecutive.cxx | 80 +- Common/ExecutionModel/vtkExecutive.h | 28 +- .../vtkExplicitStructuredGridAlgorithm.cxx | 40 +- .../vtkExplicitStructuredGridAlgorithm.h | 19 +- .../ExecutionModel/vtkExtentRCBPartitioner.h | 32 +- Common/ExecutionModel/vtkExtentSplitter.cxx | 38 +- Common/ExecutionModel/vtkExtentSplitter.h | 16 +- Common/ExecutionModel/vtkExtentTranslator.cxx | 16 +- Common/ExecutionModel/vtkExtentTranslator.h | 12 +- .../vtkFilteringInformationKeyManager.cxx | 12 +- .../vtkFilteringInformationKeyManager.h | 4 +- Common/ExecutionModel/vtkGraphAlgorithm.cxx | 24 +- .../vtkHierarchicalBoxDataSetAlgorithm.cxx | 24 +- .../vtkHierarchicalBoxDataSetAlgorithm.h | 12 +- .../vtkHyperTreeGridAlgorithm.cxx | 48 +- .../vtkHyperTreeGridAlgorithm.h | 36 +- Common/ExecutionModel/vtkImageAlgorithm.cxx | 48 +- Common/ExecutionModel/vtkImageAlgorithm.h | 28 +- .../ExecutionModel/vtkImageInPlaceFilter.cxx | 8 +- .../ExecutionModel/vtkImageToStructuredGrid.h | 4 +- .../vtkImageToStructuredPoints.cxx | 22 +- .../vtkImageToStructuredPoints.h | 4 +- .../vtkInformationDataObjectMetaDataKey.cxx | 8 +- .../vtkInformationExecutivePortKey.cxx | 20 +- .../vtkInformationExecutivePortKey.h | 4 +- .../vtkInformationExecutivePortVectorKey.cxx | 38 +- .../vtkInformationExecutivePortVectorKey.h | 8 +- .../vtkInformationIntegerRequestKey.cxx | 12 +- .../ExecutionModel/vtkMoleculeAlgorithm.cxx | 38 +- Common/ExecutionModel/vtkMoleculeAlgorithm.h | 12 +- .../vtkMultiBlockDataSetAlgorithm.cxx | 22 +- .../vtkMultiBlockDataSetAlgorithm.h | 14 +- .../vtkMultiTimeStepAlgorithm.cxx | 68 +- .../vtkMultiTimeStepAlgorithm.h | 58 +- .../vtkNonOverlappingAMRAlgorithm.h | 8 +- .../vtkOverlappingAMRAlgorithm.h | 12 +- Common/ExecutionModel/vtkParallelReader.cxx | 33 +- Common/ExecutionModel/vtkParallelReader.h | 12 +- .../vtkPartitionedDataSetAlgorithm.cxx | 97 + .../vtkPartitionedDataSetAlgorithm.h | 82 + ...kPartitionedDataSetCollectionAlgorithm.cxx | 97 + ...vtkPartitionedDataSetCollectionAlgorithm.h | 83 + .../vtkPassInputTypeAlgorithm.cxx | 46 +- .../vtkPassInputTypeAlgorithm.h | 67 +- .../vtkPiecewiseFunctionAlgorithm.cxx | 32 +- .../vtkPiecewiseFunctionAlgorithm.h | 12 +- .../ExecutionModel/vtkPointSetAlgorithm.cxx | 40 +- Common/ExecutionModel/vtkPointSetAlgorithm.h | 18 +- .../ExecutionModel/vtkPolyDataAlgorithm.cxx | 38 +- Common/ExecutionModel/vtkPolyDataAlgorithm.h | 12 +- Common/ExecutionModel/vtkProgressObserver.h | 4 +- Common/ExecutionModel/vtkReaderAlgorithm.cxx | 109 +- Common/ExecutionModel/vtkReaderAlgorithm.h | 6 + Common/ExecutionModel/vtkReaderExecutive.cxx | 108 +- Common/ExecutionModel/vtkReaderExecutive.h | 13 +- .../vtkRectilinearGridAlgorithm.cxx | 36 +- .../vtkRectilinearGridAlgorithm.h | 16 +- .../ExecutionModel/vtkSMPProgressObserver.h | 2 +- Common/ExecutionModel/vtkScalarTree.cxx | 8 +- Common/ExecutionModel/vtkScalarTree.h | 12 +- .../ExecutionModel/vtkSelectionAlgorithm.cxx | 22 +- .../vtkSimpleImageToImageFilter.cxx | 10 +- Common/ExecutionModel/vtkSimpleReader.cxx | 35 +- Common/ExecutionModel/vtkSimpleReader.h | 23 +- Common/ExecutionModel/vtkSimpleScalarTree.cxx | 26 +- Common/ExecutionModel/vtkSimpleScalarTree.h | 16 +- Common/ExecutionModel/vtkSpanSpace.cxx | 53 +- Common/ExecutionModel/vtkSpanSpace.h | 28 +- Common/ExecutionModel/vtkSphereTree.cxx | 60 +- Common/ExecutionModel/vtkSphereTree.h | 36 +- .../vtkStreamingDemandDrivenPipeline.cxx | 62 +- .../vtkStreamingDemandDrivenPipeline.h | 24 +- .../vtkStructuredGridAlgorithm.cxx | 36 +- .../vtkStructuredGridAlgorithm.h | 16 +- Common/ExecutionModel/vtkTableAlgorithm.cxx | 22 +- .../vtkThreadedCompositeDataPipeline.cxx | 24 +- .../vtkThreadedCompositeDataPipeline.h | 2 +- .../vtkThreadedImageAlgorithm.cxx | 29 +- .../vtkThreadedImageAlgorithm.h | 25 +- Common/ExecutionModel/vtkTreeAlgorithm.cxx | 22 +- Common/ExecutionModel/vtkTrivialConsumer.cxx | 10 +- Common/ExecutionModel/vtkTrivialProducer.cxx | 22 +- Common/ExecutionModel/vtkTrivialProducer.h | 4 +- .../vtkUndirectedGraphAlgorithm.cxx | 22 +- .../vtkUniformGridAMRAlgorithm.h | 12 +- .../vtkUniformGridPartitioner.h | 12 +- .../vtkUnstructuredGridAlgorithm.cxx | 36 +- .../vtkUnstructuredGridAlgorithm.h | 12 +- .../vtkUnstructuredGridBaseAlgorithm.cxx | 34 +- .../vtkUnstructuredGridBaseAlgorithm.h | 12 +- Common/Math/CMakeLists.txt | 1 + Common/Math/Testing/Cxx/CMakeLists.txt | 2 + .../Cxx/TestPolynomialSolversUnivariate.cxx | 2 +- Common/Math/Testing/Cxx/TestQuaternion.cxx | 16 +- .../Cxx/TestQuaternionInterpolator.cxx | 111 + Common/Math/Testing/Cxx/UnitTestFFT.cxx | 426 + Common/Math/vtk.module | 1 + Common/Math/vtkAmoebaMinimizer.cxx | 34 +- Common/Math/vtkAmoebaMinimizer.h | 44 +- Common/Math/vtkFFT.cxx | 184 + Common/Math/vtkFFT.h | 237 + Common/Math/vtkFunctionSet.h | 2 +- Common/Math/vtkInitialValueProblemSolver.h | 10 +- Common/Math/vtkMatrix3x3.cxx | 28 +- Common/Math/vtkMatrix3x3.h | 2 +- Common/Math/vtkMatrix4x4.cxx | 22 +- Common/Math/vtkMatrix4x4.h | 38 +- .../Math/vtkPolynomialSolversUnivariate.cxx | 77 +- Common/Math/vtkPolynomialSolversUnivariate.h | 24 +- Common/Math/vtkQuaternion.h | 48 +- Common/Math/vtkQuaternionInterpolator.cxx | 125 +- Common/Math/vtkQuaternionInterpolator.h | 37 +- Common/Math/vtkRungeKutta2.cxx | 5 + Common/Math/vtkRungeKutta2.h | 7 +- Common/Math/vtkRungeKutta4.h | 4 +- Common/Math/vtkRungeKutta45.cxx | 24 +- Common/Math/vtkRungeKutta45.h | 6 +- Common/Math/vtkTuple.h | 43 +- Common/Misc/CMakeLists.txt | 8 + Common/Misc/Testing/Cxx/CMakeLists.txt | 1 + .../Misc/Testing/Cxx/TestPolygonBuilder5.cxx | 3 +- .../Cxx/UnitTestExprTkFunctionParser.cxx | 1027 + .../Testing/Cxx/UnitTestFunctionParser.cxx | 489 +- Common/Misc/vtk.module | 1 + Common/Misc/vtkContourValues.cxx | 2 +- Common/Misc/vtkErrorCode.h | 4 +- Common/Misc/vtkExprTkFunctionParser.cxx | 1351 + Common/Misc/vtkExprTkFunctionParser.h | 367 + Common/Misc/vtkFunctionParser.cxx | 114 +- Common/Misc/vtkFunctionParser.h | 79 +- Common/Misc/vtkHeap.h | 8 +- Common/Misc/vtkPolygonBuilder.cxx | 2 +- Common/Misc/vtkResourceFileLocator.cxx | 30 +- Common/Misc/vtkResourceFileLocator.h | 39 +- Common/Python/vtkPythonArchiver.cxx | 24 +- Common/Python/vtkPythonArchiver.h | 16 +- Common/System/CMakeLists.txt | 7 +- Common/System/Testing/Cxx/CMakeLists.txt | 2 + Common/System/Testing/Cxx/TestDirectory.cxx | 2 +- .../Testing/Cxx/TestExecutableRunner.cxx | 67 + Common/System/Testing/Cxx/otherTimerLog.cxx | 40 +- Common/System/vtkClientSocket.cxx | 8 +- Common/System/vtkClientSocket.h | 4 +- Common/System/vtkDirectory.cxx | 8 +- Common/System/vtkDirectory.h | 22 +- Common/System/vtkExecutableRunner.cxx | 196 + Common/System/vtkExecutableRunner.h | 112 + Common/System/vtkServerSocket.cxx | 12 +- Common/System/vtkSocket.cxx | 50 +- Common/System/vtkSocketCollection.cxx | 18 +- Common/System/vtkSocketCollection.h | 4 +- Common/System/vtkThreadMessager.cxx | 6 +- Common/System/vtkThreadMessager.h | 8 +- Common/System/vtkTimerLog.cxx | 188 +- Common/System/vtkTimerLog.h | 43 +- .../Transforms/Testing/Python/CMakeLists.txt | 1 + .../Python/TestThreadedPointTransformation.py | 54 + Common/Transforms/vtkAbstractTransform.cxx | 95 +- Common/Transforms/vtkAbstractTransform.h | 57 +- Common/Transforms/vtkCylindricalTransform.cxx | 2 +- Common/Transforms/vtkCylindricalTransform.h | 4 +- Common/Transforms/vtkGeneralTransform.cxx | 32 +- Common/Transforms/vtkGeneralTransform.h | 40 +- Common/Transforms/vtkHomogeneousTransform.cxx | 26 +- Common/Transforms/vtkHomogeneousTransform.h | 8 +- Common/Transforms/vtkIdentityTransform.cxx | 38 +- Common/Transforms/vtkIdentityTransform.h | 16 +- Common/Transforms/vtkLandmarkTransform.cxx | 20 +- Common/Transforms/vtkLandmarkTransform.h | 16 +- Common/Transforms/vtkLinearTransform.cxx | 134 +- Common/Transforms/vtkLinearTransform.h | 44 +- .../vtkMatrixToHomogeneousTransform.cxx | 16 +- .../Transforms/vtkMatrixToLinearTransform.cxx | 16 +- .../Transforms/vtkMatrixToLinearTransform.h | 4 +- Common/Transforms/vtkPerspectiveTransform.cxx | 36 +- Common/Transforms/vtkPerspectiveTransform.h | 40 +- Common/Transforms/vtkSphericalTransform.cxx | 2 +- Common/Transforms/vtkSphericalTransform.h | 4 +- .../vtkThinPlateSplineTransform.cxx | 40 +- .../Transforms/vtkThinPlateSplineTransform.h | 24 +- Common/Transforms/vtkTransform.cxx | 38 +- Common/Transforms/vtkTransform.h | 60 +- Common/Transforms/vtkTransform2D.cxx | 58 +- Common/Transforms/vtkTransform2D.h | 18 +- Common/Transforms/vtkTransformCollection.cxx | 5 + Common/Transforms/vtkTransformCollection.h | 6 +- Common/Transforms/vtkWarpTransform.cxx | 16 +- Common/Transforms/vtkWarpTransform.h | 40 +- Documentation/Doxygen/DataAssembly.md | 108 + Documentation/Doxygen/IOHDFFormat.md | 335 + Documentation/Doxygen/ModuleSystem.md | 6 + Documentation/Doxygen/PythonWrappers.md | 1074 + Documentation/Doxygen/vtkhdf-image-data.svg | 1 + .../Doxygen/vtkhdf-unstructured-grid.svg | 1 + Documentation/dev/build.md | 84 +- Documentation/dev/build_windows_vs.md | 2 +- .../dev/changes_6.3/ghosts_and_blanking.md | 2 +- Documentation/dev/git/README.md | 2 +- Documentation/dev/git/dashboard.md | 2 +- Documentation/dev/git/data.md | 10 + Documentation/dev/git/deprecation.md | 77 + Documentation/dev/git/develop.md | 163 +- Documentation/release/9.1.md | 796 + .../imgs/9.1/AMRDetonationVelodyne.png | Bin 0 -> 1035066 bytes .../9.1/Doxygen_CrossReference_Examples.png | Bin 0 -> 250018 bytes .../TestGPURayCastMapperRectilinearGrid.png | Bin 0 -> 71012 bytes .../9.1/TestGPURayCastVolumeGhostArrays.png | Bin 0 -> 38106 bytes ...estGPURayCastVolumeUniformGridBlanking.png | Bin 0 -> 42020 bytes .../release/imgs/9.1/interactive_2d_after.png | Bin 0 -> 217751 bytes .../imgs/9.1/interactive_2d_before.png | Bin 0 -> 218330 bytes Domains/Chemistry/CMakeLists.txt | 7 +- Domains/Chemistry/Testing/CMakeLists.txt | 7 - Domains/Chemistry/Testing/Cxx/CMakeLists.txt | 6 - .../Testing/Cxx/GenerateBlueObeliskHeader.cxx | 2 +- .../Testing/Cxx/TestPeriodicTable.cxx | 2 +- .../Chemistry/Testing/Python/CMakeLists.txt | 3 - .../Chemistry/Testing/Python/MoleculeXYZ.py | 30 - Domains/Chemistry/elements.xml | 342 +- Domains/Chemistry/vtk.module | 4 +- Domains/Chemistry/vtkBlueObeliskData.cxx | 56 +- Domains/Chemistry/vtkBlueObeliskData.h | 53 +- .../Chemistry/vtkBlueObeliskDataInternal.h | 360 +- .../Chemistry/vtkBlueObeliskDataParser.cxx | 136 +- Domains/Chemistry/vtkBlueObeliskDataParser.h | 16 +- Domains/Chemistry/vtkCMLMoleculeReader.cxx | 326 - Domains/Chemistry/vtkCMLMoleculeReader.h | 67 - Domains/Chemistry/vtkGaussianCubeReader2.cxx | 324 - Domains/Chemistry/vtkGaussianCubeReader2.h | 77 - Domains/Chemistry/vtkMoleculeMapper.cxx | 42 +- Domains/Chemistry/vtkMoleculeMapper.h | 80 +- .../Chemistry/vtkMoleculeToAtomBallFilter.cxx | 8 +- .../vtkMoleculeToBondStickFilter.cxx | 8 +- .../Chemistry/vtkMoleculeToLinesFilter.cxx | 8 +- Domains/Chemistry/vtkMoleculeToLinesFilter.h | 1 + .../Chemistry/vtkMoleculeToPolyDataFilter.cxx | 10 +- .../Chemistry/vtkOpenQubeElectronicData.cxx | 24 +- Domains/Chemistry/vtkOpenQubeElectronicData.h | 25 +- .../Chemistry/vtkOpenQubeMoleculeSource.cxx | 20 +- Domains/Chemistry/vtkOpenQubeMoleculeSource.h | 20 +- Domains/Chemistry/vtkPeriodicTable.cxx | 67 +- Domains/Chemistry/vtkPeriodicTable.h | 8 +- .../Chemistry/vtkPointSetToMoleculeFilter.cxx | 13 +- .../Chemistry/vtkPointSetToMoleculeFilter.h | 5 +- .../vtkProgrammableElectronicData.cxx | 20 +- .../Chemistry/vtkProgrammableElectronicData.h | 24 +- Domains/Chemistry/vtkProteinRibbonFilter.cxx | 14 +- Domains/Chemistry/vtkProteinRibbonFilter.h | 25 +- Domains/Chemistry/vtkSimpleBondPerceiver.cxx | 14 +- Domains/Chemistry/vtkSimpleBondPerceiver.h | 8 +- Domains/Chemistry/vtkVASPAnimationReader.h | 90 - .../Chemistry/vtkVASPTessellationReader.cxx | 624 - Domains/Chemistry/vtkVASPTessellationReader.h | 93 - Domains/Chemistry/vtkXYZMolReader2.cxx | 257 - Domains/Chemistry/vtkXYZMolReader2.h | 79 - Domains/ChemistryOpenGL2/vtk.module | 1 + .../vtkOpenGLMoleculeMapper.cxx | 24 +- .../vtkOpenGLMoleculeMapper.h | 9 +- Domains/Microscopy/vtkOpenSlideReader.cxx | 7 +- Domains/Microscopy/vtkOpenSlideReader.h | 8 +- .../Testing/Cxx/TestPSimpleBondPerceiver.cxx | 58 +- .../vtkPSimpleBondPerceiver.cxx | 14 +- .../vtkPSimpleBondPerceiver.h | 5 +- Examples/Android/ReadMe.txt | 8 +- Examples/Annotation/Python/DispAllFonts.py | 143 - Examples/Annotation/Python/TestText.py | 55 - Examples/Annotation/Python/TestTextOldWay.py | 55 - Examples/Annotation/Python/UNMAINTAINED.md | 8 - Examples/Annotation/Python/annotatePick.py | 86 - Examples/Annotation/Python/cubeAxes.py | 118 - Examples/Annotation/Python/labeledMesh.py | 148 - Examples/Annotation/Python/multiLineText.py | 188 - Examples/Annotation/Python/textOrigin.py | 52 - Examples/Annotation/Python/xyPlot.py | 196 - Examples/Array/Cxx/AdjacencyMatrix.cxx | 60 - Examples/Array/Cxx/ArrayBasics.cxx | 90 - Examples/Array/Cxx/ArrayIteration.cxx | 43 - Examples/Array/Cxx/CMakeLists.txt | 24 - Examples/Array/Cxx/IdentityMatrix.cxx | 40 - Examples/Array/Cxx/UNMAINTAINED.md | 8 - Examples/Build/vtkLocal/CMakeLists.txt | 28 - .../Build/vtkLocal/JavaDependencies.cmake.in | 5 - Examples/Build/vtkLocal/README | 36 - Examples/Build/vtkLocal/vtkLocalExample.cxx | 21 - Examples/Build/vtkLocal/vtkLocalExample.h | 35 - Examples/Build/vtkMy/Common/vtkBar.cxx | 9 +- Examples/Build/vtkMy/Common/vtkBar.h | 1 + Examples/Build/vtkMy/Imaging/vtkImageFoo.cxx | 16 +- Examples/Build/vtkMy/Imaging/vtkImageFoo.h | 8 +- Examples/Build/vtkMy/Unsorted/vtkBar2.cxx | 9 +- Examples/Build/vtkMy/Unsorted/vtkBar2.h | 1 + Examples/CMakeLists.txt | 69 +- Examples/Charts/Cxx/CMakeLists.txt | 5 +- Examples/Charts/Cxx/GraphItem.cxx | 2 +- Examples/Charts/Cxx/PiecewiseItem.cxx | 2 +- Examples/Charts/Cxx/QChartTable.cxx | 8 +- Examples/Charts/Cxx/QScalarsToColors.cxx | 8 +- Examples/Charts/Cxx/vtkGraphItem.cxx | 28 +- Examples/DataManipulation/Python/Arrays.py | 89 - .../DataManipulation/Python/BuildUGrid.py | 386 - .../DataManipulation/Python/CreateStrip.py | 59 - .../DataManipulation/Python/FinancialField.py | 282 - .../DataManipulation/Python/UNMAINTAINED.md | 8 - Examples/DataManipulation/Python/marching.py | 215 - .../Python/pointToCellData.py | 99 - Examples/Emscripten/Cxx/Cone/CMakeLists.txt | 155 + Examples/Emscripten/Cxx/Cone/Cone.cxx | 61 + Examples/Emscripten/Cxx/Cone/README.md | 43 + Examples/Emscripten/Cxx/Cone/index.html | 33 + .../Cxx/ConeFullScreen/CMakeLists.txt | 93 + .../Cxx/ConeFullScreen/ConeFullScreen.cxx | 82 + .../Emscripten/Cxx/ConeFullScreen/README.md | 42 + .../Emscripten/Cxx/ConeFullScreen/index.html | 38 + .../Emscripten/Cxx/MultiCone/CMakeLists.txt | 96 + .../Emscripten/Cxx/MultiCone/MultiCone.cxx | 132 + Examples/Emscripten/Cxx/MultiCone/README.md | 13 + Examples/Emscripten/Cxx/MultiCone/index.html | 141 + Examples/Emscripten/Cxx/README.md | 73 + .../Emscripten/Cxx/WrappedMace/CMakeLists.txt | 95 + Examples/Emscripten/Cxx/WrappedMace/README.md | 17 + .../Cxx/WrappedMace/WrappedMace.cxx | 157 + .../Emscripten/Cxx/WrappedMace/index.html | 95 + Examples/GUI/Cocoa/CustomLayer.mm | 1 + .../SimpleCocoaVTK.xcodeproj/project.pbxproj | 4 + Examples/GUI/Python/BoxWidget.py | 86 - Examples/GUI/Python/CustomInteraction.py | 219 - Examples/GUI/Python/ImagePlaneWidget.py | 343 - Examples/GUI/Python/ImageTracerWidget.py | 293 - Examples/GUI/Python/ImplicitPlaneWidget.py | 80 - .../GUI/Python/OrthogonalPlanesWithTkPhoto.py | 152 - Examples/GUI/Python/ProbeWithPointWidget.py | 93 - Examples/GUI/Python/ProbingWithPlaneWidget.py | 89 - Examples/GUI/Python/SphereWidget.py | 113 - .../GUI/Python/StreamlinesWithLineWidget.py | 136 - Examples/GUI/Python/TransformWithBoxWidget.py | 65 - Examples/GUI/Python/UNMAINTAINED.md | 8 - .../GUI/Python/VolumeRenderWithBoxWidget.py | 124 - .../Qt/FourPaneViewer/QtVTKRenderWindows.cxx | 3 +- .../Qt/FourPaneViewer/QtVTKRenderWindows.h | 4 +- .../Qt/FourPaneViewer/QtVTKRenderWindows.ui | 12 +- .../FourPaneViewer/QtVTKRenderWindowsApp.cxx | 4 +- Examples/GUI/Qt/ImageViewer/main.cxx | 6 +- Examples/GUI/Qt/SimpleView/SimpleView.h | 4 +- Examples/GUI/Qt/SimpleView/SimpleView.ui | 6 +- Examples/GUI/Qt/SimpleView/main.cxx | 4 +- .../QtVTKTouchscreenRenderWindows.cxx | 2 +- .../QtVTKTouchscreenRenderWindowsApp.cxx | 4 +- .../Python/SegmentAndBrokenLineSources.py | 55 - .../Python/SingleYoungsMaterialInterface.py | 124 - Examples/Graphics/Python/UNMAINTAINED.md | 8 - Examples/IO/Cxx/CMakeLists.txt | 25 +- Examples/IO/Cxx/objtovtp.cxx | 2 +- Examples/IO/Python/UNMAINTAINED.md | 8 - Examples/IO/Python/flamingo.py | 52 - Examples/IO/Python/stl.py | 42 - Examples/ImageProcessing/Cxx/CMakeLists.txt | 15 +- Examples/ImageProcessing/Python/Contours2D.py | 75 - .../ImageProcessing/Python/ImageInteractor.py | 173 - .../Python/ImageInteractorReslice.py | 65 - .../ImageProcessing/Python/ImageSlicing.py | 129 - .../ImageProcessing/Python/UNMAINTAINED.md | 8 - Examples/Infovis/Cxx/CMakeLists.txt | 22 +- .../Infovis/Cxx/CustomLinkView/CMakeLists.txt | 8 +- .../Cxx/CustomLinkView/CustomLinkView.cxx | 2 +- .../Cxx/CustomLinkView/CustomLinkView.h | 6 +- .../Cxx/CustomLinkView/CustomLinkView.ui | 6 +- Examples/Infovis/Cxx/EasyView/CMakeLists.txt | 8 +- Examples/Infovis/Cxx/EasyView/EasyView.cxx | 2 +- Examples/Infovis/Cxx/EasyView/EasyView.h | 4 +- Examples/Infovis/Cxx/EasyView/EasyView.ui | 6 +- Examples/Infovis/Cxx/EasyView/main.cxx | 4 +- Examples/Infovis/Cxx/StatsView/CMakeLists.txt | 12 +- Examples/Infovis/Cxx/StatsView/StatsView.cxx | 2 +- Examples/Infovis/Cxx/StatsView/StatsView.h | 4 +- Examples/Infovis/Java/Focus.java | 239 - Examples/Infovis/Java/HelloWorld.java | 27 - Examples/Infovis/Java/TreeViews.java | 210 - Examples/Infovis/Java/UNMAINTAINED.md | 8 - Examples/Infovis/Python/Rcalculator_mst.py | 74 - Examples/Infovis/Python/Rcalculator_vd.py | 66 - Examples/Infovis/Python/Rinterface.py | 52 - Examples/Infovis/Python/Rrand_table.py | 52 - Examples/Infovis/Python/UNMAINTAINED.md | 8 - .../Python/adjacency_matrix_to_graph.py | 59 - Examples/Infovis/Python/aggregate.py | 106 - Examples/Infovis/Python/authors.csv | 7 - Examples/Infovis/Python/boost_bfs.py | 36 - Examples/Infovis/Python/boost_centrality.py | 44 - Examples/Infovis/Python/boost_mst.py | 59 - .../Infovis/Python/boost_mst_extract_graph.py | 88 - Examples/Infovis/Python/boost_mst_with_hgv.py | 102 - Examples/Infovis/Python/circular_vertices.py | 45 - Examples/Infovis/Python/columns.csv | 2 - Examples/Infovis/Python/cone_layout.py | 27 - .../Python/contingency_port_protocol.py | 70 - Examples/Infovis/Python/create_tree.py | 23 - Examples/Infovis/Python/csv_to_graph.py | 61 - Examples/Infovis/Python/database_query1.py | 29 - Examples/Infovis/Python/databases.py | 63 - Examples/Infovis/Python/databases2.py | 42 - .../Infovis/Python/delimited_text_reader1.py | 15 - .../Infovis/Python/delimited_text_reader2.py | 36 - Examples/Infovis/Python/dimacs.py | 58 - .../Infovis/Python/displayVTKHierarchy.py | 82 - Examples/Infovis/Python/edges.csv | 6 - Examples/Infovis/Python/filters.py | 32 - Examples/Infovis/Python/geoview.py | 82 - Examples/Infovis/Python/graph1.py | 58 - Examples/Infovis/Python/graph3d.py | 86 - .../Python/graph_selection_subtract.py | 80 - Examples/Infovis/Python/graph_tree_ring.py | 99 - Examples/Infovis/Python/gui.py | 50 - Examples/Infovis/Python/hello_world.py | 15 - Examples/Infovis/Python/hierarchical_graph.py | 71 - Examples/Infovis/Python/icicle_view.py | 47 - Examples/Infovis/Python/icicle_view_simple.py | 26 - Examples/Infovis/Python/kcore.py | 60 - Examples/Infovis/Python/labels.py | 65 - Examples/Infovis/Python/merge_graphs.py | 107 - Examples/Infovis/Python/mysql_database.py | 39 - Examples/Infovis/Python/nodes.csv | 5 - .../Infovis/Python/programmable_pipeline.py | 54 - .../Infovis/Python/programmable_pipeline2.py | 140 - Examples/Infovis/Python/psql_database.py | 54 - Examples/Infovis/Python/random3d.py | 30 - Examples/Infovis/Python/selection.py | 113 - Examples/Infovis/Python/selection_domain.py | 73 - Examples/Infovis/Python/simple_selection.py | 49 - .../Infovis/Python/statistics_temperatures.py | 77 - .../Infovis/Python/streaming_statistics.py | 111 - .../Python/streaming_statistics_pyqt.py | 127 - Examples/Infovis/Python/table_data.csv | 8 - Examples/Infovis/Python/tables1.py | 50 - Examples/Infovis/Python/tables2.py | 39 - Examples/Infovis/Python/tables3.py | 41 - Examples/Infovis/Python/tables4.py | 41 - Examples/Infovis/Python/tables_adv.py | 139 - Examples/Infovis/Python/temperatures.csv | 34 - Examples/Infovis/Python/theme.py | 19 - Examples/Infovis/Python/tree1.py | 62 - Examples/Infovis/Python/tree_map.py | 35 - Examples/Infovis/Python/treemap_view.py | 25 - .../Python/treering_hierarchical_view.py | 56 - Examples/Infovis/Python/treering_view.py | 44 - .../Infovis/Python/treering_view_simple.py | 26 - Examples/Infovis/Python/treetest.xml | 17 - .../Python/vertex_degree_programmable.py | 49 - Examples/Infovis/Python/views.py | 94 - Examples/Infovis/Python/vtkclasses.xml | 2624 - Examples/Infovis/Python/vtklibrary.xml | 2666 - Examples/LIC/Python/CylinderAndPolarAxes.py | 97 - Examples/LIC/Python/UNMAINTAINED.md | 8 - Examples/Medical/Cxx/CMakeLists.txt | 5 + .../Medical/Cxx/GenerateCubesFromLabels.cxx | 4 +- .../Medical/Cxx/GenerateModelsFromLabels.cxx | 4 +- Examples/Medical/Python/Medical1.py | 93 - Examples/Medical/Python/Medical2.py | 119 - Examples/Medical/Python/Medical3.py | 196 - Examples/Medical/Python/Medical4.py | 113 - Examples/Medical/Python/UNMAINTAINED.md | 8 - Examples/Modelling/Cxx/CMakeLists.txt | 6 + Examples/Modelling/Python/DelMesh.py | 86 - Examples/Modelling/Python/Delaunay3D.py | 60 - Examples/Modelling/Python/PerlinTerrain.py | 67 - Examples/Modelling/Python/SpherePuzzle.py | 169 - .../Modelling/Python/constrainedDelaunay.py | 150 - Examples/Modelling/Python/expCos.py | 81 - Examples/Modelling/Python/faultLines.py | 71 - Examples/Modelling/Python/hello.py | 64 - Examples/Modelling/Python/iceCream.py | 95 - .../Modelling/Python/procrustesAlignment.py | 184 - .../Modelling/Python/reconstructSurface.py | 85 - Examples/Modules/UsingVTK/CMakeLists.txt | 5 + Examples/Modules/Wrapping/CMakeLists.txt | 5 + .../Modules/Wrapping/module/vtkWrappable.h | 2 +- .../MPI/Python/ParallelCone.py | 89 - .../MPI/Python/UNMAINTAINED.md | 8 - Examples/Rendering/Cxx/AmbientSpheres.cxx | 162 - Examples/Rendering/Cxx/CMakeLists.txt | 28 - Examples/Rendering/Cxx/Cylinder.cxx | 87 - Examples/Rendering/Cxx/DiffuseSpheres.cxx | 164 - Examples/Rendering/Cxx/SpecularSpheres.cxx | 170 - Examples/Rendering/Python/CADPart.py | 57 - Examples/Rendering/Python/CSpline.py | 117 - Examples/Rendering/Python/Cylinder.py | 56 - Examples/Rendering/Python/FilterCADPart.py | 66 - Examples/Rendering/Python/RenderLargeImage.py | 47 - Examples/Rendering/Python/TPlane.py | 47 - Examples/Rendering/Python/UNMAINTAINED.md | 8 - Examples/Rendering/Python/assembly.py | 83 - Examples/Rendering/Python/rainbow.py | 95 - Examples/RunExample.cmake | 40 + Examples/Statistics/CMakeLists.txt | 19 - .../ExampleDescriptiveStatistics.cxx | 745 - .../Statistics/ExampleKMeansStatistics.cxx | 240 - Examples/Statistics/UNMAINTAINED.md | 8 - Examples/Tutorial/README.txt | 19 - Examples/Tutorial/Step1/Cxx/CMakeLists.txt | 16 - Examples/Tutorial/Step1/Cxx/Cone.cxx | 105 - Examples/Tutorial/Step1/Java/Cone.java | 91 - Examples/Tutorial/Step1/Java/UNMAINTAINED.md | 8 - Examples/Tutorial/Step1/Python/Cone.py | 72 - .../Tutorial/Step1/Python/UNMAINTAINED.md | 8 - Examples/Tutorial/Step2/Cxx/CMakeLists.txt | 16 - Examples/Tutorial/Step2/Cxx/Cone2.cxx | 102 - Examples/Tutorial/Step2/Java/Cone2.java | 82 - Examples/Tutorial/Step2/Java/UNMAINTAINED.md | 8 - Examples/Tutorial/Step2/Python/Cone2.py | 59 - .../Tutorial/Step2/Python/UNMAINTAINED.md | 8 - Examples/Tutorial/Step3/Cxx/CMakeLists.txt | 16 - Examples/Tutorial/Step3/Cxx/Cone3.cxx | 121 - Examples/Tutorial/Step3/Java/Cone3.java | 105 - Examples/Tutorial/Step3/Java/UNMAINTAINED.md | 8 - Examples/Tutorial/Step3/Python/Cone3.py | 83 - .../Tutorial/Step3/Python/UNMAINTAINED.md | 8 - Examples/Tutorial/Step4/Cxx/CMakeLists.txt | 16 - Examples/Tutorial/Step4/Cxx/Cone4.cxx | 132 - Examples/Tutorial/Step4/Java/Cone4.java | 122 - Examples/Tutorial/Step4/Java/UNMAINTAINED.md | 8 - Examples/Tutorial/Step4/Python/Cone4.py | 93 - .../Tutorial/Step4/Python/UNMAINTAINED.md | 8 - Examples/Tutorial/Step5/Cxx/CMakeLists.txt | 16 - Examples/Tutorial/Step5/Cxx/Cone5.cxx | 133 - Examples/Tutorial/Step5/Java/Cone5.java | 117 - Examples/Tutorial/Step5/Java/UNMAINTAINED.md | 8 - Examples/Tutorial/Step5/Python/Cone5.py | 93 - .../Tutorial/Step5/Python/UNMAINTAINED.md | 8 - Examples/Tutorial/Step6/Cxx/CMakeLists.txt | 17 - Examples/Tutorial/Step6/Cxx/Cone6.cxx | 179 - Examples/Tutorial/Step6/Python/Cone6.py | 117 - .../Tutorial/Step6/Python/UNMAINTAINED.md | 8 - .../Cxx/BandedContours.cxx | 102 - .../Baseline/TestBandedContours.png.sha512 | 1 - .../Baseline/TestFilledContours.png.sha512 | 1 - .../Baseline/TestFilledContours_1.png.sha512 | 1 - ...TubesWithVaryingRadiusAndColors.png.sha512 | 1 - .../Cxx/CMakeLists.txt | 41 - .../Cxx/FilledContours.cxx | 150 - .../Cxx/TestBandedContours.cxx | 2 - .../Cxx/TestFilledContours.cxx | 2 - .../TestTubesWithVaryingRadiusAndColors.cxx | 2 - .../Cxx/TubesWithVaryingRadiusAndColors.cxx | 127 - .../Python/BandContourTerrain.py | 149 - .../VisualizationAlgorithms/Python/ClipCow.py | 120 - .../Python/ColorIsosurface.py | 78 - .../Python/CutCombustor.py | 80 - .../Python/DepthSort.py | 90 - .../Python/ExtractGeometry.py | 73 - .../Python/ExtractUGrid.py | 93 - .../Python/GenerateTextureCoords.py | 65 - .../Python/SubsampleGrid.py | 68 - .../Python/TextureThreshold.py | 137 - .../Python/UNMAINTAINED.md | 8 - .../VisualizationAlgorithms/Python/VisQuad.py | 59 - .../Python/deciFran.py | 52 - .../Python/imageWarp.py | 57 - .../Python/officeTube.py | 303 - .../Python/officeTubes.py | 311 - .../Python/probeComb.py | 124 - .../Python/smoothFran.py | 55 - .../VisualizationAlgorithms/Python/spikeF.py | 82 - .../Python/streamSurface.py | 81 - .../Python/warpComb.py | 92 - Examples/VolumeRendering/Cxx/CMakeLists.txt | 26 - .../Cxx/FixedPointVolumeRayCastMapperCT.cxx | 493 - .../VolumeRendering/Cxx/GPURenderDemo.cxx | 544 - .../Python/PseudoVolumeRendering.py | 124 - .../VolumeRendering/Python/SimpleRayCast.py | 65 - .../VolumeRendering/Python/UNMAINTAINED.md | 8 - .../VolumeRendering/Python/VolumePicker.py | 209 - Examples/Widgets/Cxx/BalloonWidget.cxx | 75 - .../Cxx/Baseline/TestBalloonWidget.png.sha512 | 1 - .../Cxx/Baseline/TestSlider.png.sha512 | 1 - .../Cxx/Baseline/TestSlider2D.png.sha512 | 1 - .../Cxx/Baseline/TestSlider2D_1.png.sha512 | 1 - .../Cxx/Baseline/TestSlider2D_2.png.sha512 | 1 - Examples/Widgets/Cxx/CMakeLists.txt | 37 - Examples/Widgets/Cxx/Slider.cxx | 105 - Examples/Widgets/Cxx/Slider2D.cxx | 112 - Examples/Widgets/Cxx/SplineWidget.cxx | 105 - Examples/Widgets/Cxx/TestBalloonWidget.cxx | 2 - Examples/Widgets/Cxx/TestSlider.cxx | 2 - Examples/Widgets/Cxx/TestSlider2D.cxx | 2 - .../PlaneView/PlaneView/VTKViewController.mm | 14 +- .../Surfaces/Classes/MyGLKViewController.mm | 10 +- Filters/AMR/Testing/Cxx/CMakeLists.txt | 1 + Filters/AMR/Testing/Cxx/TestAMRGhostZones.cxx | 207 + Filters/AMR/Testing/Cxx/TestAMRIterator.cxx | 2 +- Filters/AMR/Testing/Cxx/TestImageToAMR.cxx | 2 +- Filters/AMR/vtkAMRCutPlane.cxx | 2 +- Filters/AMR/vtkAMRCutPlane.h | 24 +- Filters/AMR/vtkAMRGaussianPulseSource.h | 32 +- Filters/AMR/vtkAMRResampleFilter.cxx | 70 +- Filters/AMR/vtkAMRResampleFilter.h | 38 +- Filters/AMR/vtkAMRSliceFilter.cxx | 40 +- Filters/AMR/vtkAMRSliceFilter.h | 16 +- Filters/AMR/vtkAMRToMultiBlockFilter.h | 8 +- Filters/AMR/vtkImageToAMR.cxx | 18 +- Filters/AMR/vtkImageToAMR.h | 12 +- Filters/Core/CMakeLists.txt | 14 +- Filters/Core/Testing/CMakeLists.txt | 12 + Filters/Core/Testing/Cxx/CMakeLists.txt | 9 + .../Test3DLinearGridPlaneCutterCellData.cxx | 106 + .../Core/Testing/Cxx/TestAppendDataSets.cxx | 216 +- .../Core/Testing/Cxx/TestAppendSelection.cxx | 2 +- .../Core/Testing/Cxx/TestArrayCalculator.cxx | 262 +- .../Core/Testing/Cxx/TestAssignAttribute.cxx | 8 +- .../TestCategoricalPointDataToCellData.cxx | 2 +- Filters/Core/Testing/Cxx/TestCellCenters.cxx | 3 + .../Testing/Cxx/TestCellDataToPointData.cxx | 35 + .../Core/Testing/Cxx/TestCleanPolyData2.cxx | 1 - ...taObjectToPartitionedDataSetCollection.cxx | 43 + Filters/Core/Testing/Cxx/TestFeatureEdges.cxx | 333 +- .../Testing/Cxx/TestGlyph3DFollowCamera.cxx | 130 + .../Core/Testing/Cxx/TestMaskPointsModes.cxx | 107 + .../Core/Testing/Cxx/TestNamedComponents.cxx | 9 +- ...PartitionedDataSetCollectionConvertors.cxx | 113 + .../Core/Testing/Cxx/TestPolyDataTangents.cxx | 2 +- .../Cxx/TestProbeFilterOutputAttributes.cxx | 2 +- .../Core/Testing/Cxx/TestResampleToImage.cxx | 63 +- .../Testing/Cxx/TestResampleWithDataSet.cxx | 42 +- .../Testing/Cxx/TestResampleWithDataSet3.cxx | 3 +- .../Testing/Cxx/TestSlicePlanePrecision.cxx | 55 + .../Testing/Cxx/TestStructuredGridAppend.cxx | 4 +- Filters/Core/Testing/Cxx/TestThreshold.cxx | 35 +- .../Core/Testing/Cxx/TestThresholdPoints.cxx | 208 +- Filters/Core/Testing/Cxx/TestTubeBender.cxx | 135 + ...turedGridToExplicitStructuredGridEmpty.cxx | 72 + .../Testing/Cxx/TestVaryRadiusTubeFilter.cxx | 179 + .../Core/Testing/Cxx/UnitTestMaskPoints.cxx | 21 +- .../Baseline/CellDataToPointData2.png.sha512 | 1 + ...3DLinearGridPlaneCutterCellData.png.sha512 | 1 + .../Baseline/TestBinnedDecimation.png.sha512 | 1 + ...TestCompositeDataSetPlaneCutter.png.sha512 | 1 + .../TestExplicitStructuredGridCrop.png.md5 | 1 - .../TestExplicitStructuredGridCrop.png.sha512 | 1 + ...itStructuredGridToUnstructuredGrid.png.md5 | 1 - ...tructuredGridToUnstructuredGrid.png.sha512 | 1 + .../TestFlyingEdges2DThinPixel.png.sha512 | 1 + .../TestFlyingEdges3DThinSlice.png.sha512 | 1 + ...FlyingEdgesPlaneCutterThinSlice.png.sha512 | 1 + ...tImageDataToExplicitStructuredGrid.png.md5 | 1 - ...ageDataToExplicitStructuredGrid.png.sha512 | 1 + .../Baseline/TestMaskPointsModes.png.sha512 | 1 + ...tOrientedFlyingEdgesPlaneCutter.png.sha512 | 1 + ...OrientedFlyingEdgesPlaneCutter2.png.sha512 | 1 + .../TestPointDataToCellData2.png.sha512 | 1 + ...tPolyDataEdgeConnectivityFilter.png.sha512 | 1 + ...PolyDataEdgeConnectivityFilter2.png.sha512 | 1 + ...PolyDataEdgeConnectivityFilter3.png.sha512 | 1 + ...PolyDataEdgeConnectivityFilter4.png.sha512 | 1 + .../TestPolyDataPlaneClipper.png.sha512 | 1 + .../TestPolyDataPlaneClipper2.png.sha512 | 1 + .../Data/Baseline/TestTubeBender.png.sha512 | 1 + ...cturedGridToExplicitStructuredGrid.png.md5 | 1 - ...redGridToExplicitStructuredGrid.png.sha512 | 1 + ...idToExplicitStructuredGridEmpty.png.sha512 | 1 + .../TestVaryRadiusTubeFilter.png.sha512 | 1 + .../TestWindowedSincPolyDataFilter.png.sha512 | 1 + ...TestWindowedSincPolyDataFilter2.png.sha512 | 1 + .../Baseline/contourQuadraticCells.png.sha512 | 2 +- .../Data/Baseline/cutPolygons.png.sha512 | 2 +- .../Data/Baseline/cutPolygons_1.png.sha512 | 1 - .../Testing/Data/Baseline/cutter.png.sha512 | 2 +- Filters/Core/Testing/Python/CMakeLists.txt | 18 + .../Testing/Python/CellDataToPointData2.py | 94 + .../Testing/Python/TestBinnedDecimation.py | 207 + .../Python/TestCompositeDataSetPlaneCutter.py | 71 + ...ontour3DLinearGridInterpolateAttributes.py | 30 +- .../Core/Testing/Python/TestContourCases.py | 2 +- .../Core/Testing/Python/TestContourFilter.py | 46 + .../Core/Testing/Python/TestFlyingEdges2D.py | 1 + .../Python/TestFlyingEdges2DThinPixel.py | 62 + .../Core/Testing/Python/TestFlyingEdges3D.py | 1 + .../Python/TestFlyingEdges3DThinSlice.py | 66 + .../Testing/Python/TestFlyingEdgesExtents.py | 1 + .../TestFlyingEdgesPlaneCutterThinSlice.py | 69 + .../TestOrientedFlyingEdgesPlaneCutter.py | 118 + .../TestOrientedFlyingEdgesPlaneCutter2.py | 74 + .../Python/TestPointDataToCellData2.py | 121 + .../TestPolyDataEdgeConnectivityFilter.py | 85 + .../TestPolyDataEdgeConnectivityFilter2.py | 94 + .../TestPolyDataEdgeConnectivityFilter3.py | 86 + .../TestPolyDataEdgeConnectivityFilter4.py | 90 + .../Python/TestPolyDataPlaneClipper.py | 95 + .../Python/TestPolyDataPlaneClipper2.py | 130 + .../Python/TestWindowedSincPolyDataFilter.py | 94 + .../Python/TestWindowedSincPolyDataFilter2.py | 101 + .../Testing/Python/contourQuadraticCells.py | 655 +- Filters/Core/Testing/Python/cutPolygons.py | 2 - Filters/Core/Testing/Python/cutter.py | 2 - .../Core/Testing/Python/pointsPrecisions.py | 4 +- Filters/Core/VoronoiKernel.cxx | 8 +- Filters/Core/vtk.module | 3 + .../Core/vtk3DLinearGridCrinkleExtractor.cxx | 33 +- .../Core/vtk3DLinearGridCrinkleExtractor.h | 28 +- Filters/Core/vtk3DLinearGridInternal.h | 23 +- Filters/Core/vtk3DLinearGridPlaneCutter.cxx | 503 +- Filters/Core/vtk3DLinearGridPlaneCutter.h | 64 +- Filters/Core/vtkAppendArcLength.cxx | 8 +- Filters/Core/vtkAppendArcLength.h | 4 +- Filters/Core/vtkAppendCompositeDataLeaves.cxx | 18 +- Filters/Core/vtkAppendCompositeDataLeaves.h | 4 +- Filters/Core/vtkAppendDataSets.cxx | 18 +- Filters/Core/vtkAppendDataSets.h | 27 +- Filters/Core/vtkAppendFilter.cxx | 118 +- Filters/Core/vtkAppendFilter.h | 26 +- Filters/Core/vtkAppendPolyData.cxx | 32 +- Filters/Core/vtkAppendPolyData.h | 25 +- Filters/Core/vtkAppendSelection.cxx | 20 +- Filters/Core/vtkAppendSelection.h | 12 +- Filters/Core/vtkArrayCalculator.cxx | 1206 +- Filters/Core/vtkArrayCalculator.h | 246 +- .../Core/vtkAttributeDataToFieldDataFilter.h | 6 +- Filters/Core/vtkBinCellDataFilter.cxx | 24 +- Filters/Core/vtkBinCellDataFilter.h | 44 +- Filters/Core/vtkBinnedDecimation.cxx | 1654 + Filters/Core/vtkBinnedDecimation.h | 261 + Filters/Core/vtkCellCenters.cxx | 34 +- Filters/Core/vtkCellCenters.h | 8 +- Filters/Core/vtkCellDataToPointData.cxx | 378 +- Filters/Core/vtkCellDataToPointData.h | 60 +- Filters/Core/vtkCenterOfMass.h | 8 +- Filters/Core/vtkCleanPolyData.cxx | 71 +- Filters/Core/vtkCleanPolyData.h | 39 +- Filters/Core/vtkClipPolyData.cxx | 14 +- Filters/Core/vtkClipPolyData.h | 28 +- Filters/Core/vtkCompositeCutter.cxx | 2 +- Filters/Core/vtkCompositeDataProbeFilter.cxx | 43 +- Filters/Core/vtkCompositeDataProbeFilter.h | 23 +- Filters/Core/vtkConnectivityFilter.h | 32 +- Filters/Core/vtkContour3DLinearGrid.cxx | 108 +- Filters/Core/vtkContour3DLinearGrid.h | 47 +- Filters/Core/vtkContourFilter.cxx | 34 +- Filters/Core/vtkContourFilter.h | 49 +- Filters/Core/vtkContourGrid.cxx | 30 +- Filters/Core/vtkContourGrid.h | 53 +- Filters/Core/vtkContourHelper.cxx | 3 + .../Core/vtkConvertToMultiBlockDataSet.cxx | 79 + Filters/Core/vtkConvertToMultiBlockDataSet.h | 55 + ...kConvertToPartitionedDataSetCollection.cxx | 88 + ...vtkConvertToPartitionedDataSetCollection.h | 55 + Filters/Core/vtkCutter.cxx | 35 +- Filters/Core/vtkCutter.h | 28 +- Filters/Core/vtkDataObjectGenerator.cxx | 46 +- Filters/Core/vtkDataObjectGenerator.h | 4 +- Filters/Core/vtkDataObjectToDataSetFilter.cxx | 116 +- Filters/Core/vtkDataObjectToDataSetFilter.h | 40 +- .../Core/vtkDataSetEdgeSubdivisionCriterion.h | 16 +- Filters/Core/vtkDataSetToDataObjectFilter.cxx | 10 +- Filters/Core/vtkDataSetToDataObjectFilter.h | 28 +- Filters/Core/vtkDecimatePolylineFilter.cxx | 10 +- Filters/Core/vtkDecimatePolylineFilter.h | 16 +- Filters/Core/vtkDecimatePro.cxx | 50 +- Filters/Core/vtkDecimatePro.h | 56 +- Filters/Core/vtkDelaunay2D.cxx | 70 +- Filters/Core/vtkDelaunay2D.h | 24 +- Filters/Core/vtkDelaunay3D.cxx | 48 +- Filters/Core/vtkDelaunay3D.h | 46 +- Filters/Core/vtkEdgeSubdivisionCriterion.cxx | 2 + Filters/Core/vtkEdgeSubdivisionCriterion.h | 2 - Filters/Core/vtkElevationFilter.cxx | 53 +- Filters/Core/vtkElevationFilter.h | 12 +- Filters/Core/vtkExecutionTimer.cxx | 18 +- Filters/Core/vtkExecutionTimer.h | 16 +- .../Core/vtkExplicitStructuredGridCrop.cxx | 18 +- Filters/Core/vtkExplicitStructuredGridCrop.h | 4 +- ...plicitStructuredGridToUnstructuredGrid.cxx | 10 +- ...ExplicitStructuredGridToUnstructuredGrid.h | 1 + Filters/Core/vtkFeatureEdges.cxx | 273 +- Filters/Core/vtkFeatureEdges.h | 54 +- .../vtkFieldDataToAttributeDataFilter.cxx | 84 +- .../Core/vtkFieldDataToAttributeDataFilter.h | 34 +- Filters/Core/vtkFlyingEdges2D.cxx | 99 +- Filters/Core/vtkFlyingEdges2D.h | 8 +- Filters/Core/vtkFlyingEdges3D.cxx | 201 +- Filters/Core/vtkFlyingEdges3D.h | 21 +- Filters/Core/vtkFlyingEdgesPlaneCutter.cxx | 284 +- Filters/Core/vtkFlyingEdgesPlaneCutter.h | 22 +- Filters/Core/vtkGlyph2D.h | 14 +- Filters/Core/vtkGlyph3D.cxx | 155 +- Filters/Core/vtkGlyph3D.h | 132 +- .../Core/vtkGridSynchronizedTemplates3D.cxx | 28 +- Filters/Core/vtkGridSynchronizedTemplates3D.h | 22 +- Filters/Core/vtkHedgeHog.h | 18 +- Filters/Core/vtkHull.h | 20 +- Filters/Core/vtkIdFilter.cxx | 4 - Filters/Core/vtkIdFilter.h | 31 +- Filters/Core/vtkImageAppend.cxx | 34 +- Filters/Core/vtkImageAppend.h | 20 +- .../vtkImageDataToExplicitStructuredGrid.cxx | 12 +- .../vtkImageDataToExplicitStructuredGrid.h | 1 + Filters/Core/vtkImplicitPolyDataDistance.cxx | 20 +- Filters/Core/vtkImplicitPolyDataDistance.h | 21 +- .../vtkImplicitProjectOnPlaneDistance.cxx | 14 +- .../Core/vtkImplicitProjectOnPlaneDistance.h | 14 +- Filters/Core/vtkMarchingCubes.cxx | 156 +- Filters/Core/vtkMarchingCubes.h | 16 +- Filters/Core/vtkMarchingSquares.cxx | 123 +- Filters/Core/vtkMarchingSquares.h | 8 +- Filters/Core/vtkMaskFields.h | 4 +- Filters/Core/vtkMaskPoints.cxx | 510 +- Filters/Core/vtkMaskPoints.h | 114 +- Filters/Core/vtkMaskPolyData.h | 10 +- Filters/Core/vtkMassProperties.cxx | 10 +- Filters/Core/vtkMergeDataObjectFilter.cxx | 20 +- Filters/Core/vtkMergeDataObjectFilter.h | 8 +- Filters/Core/vtkMergeFields.cxx | 6 +- Filters/Core/vtkMergeFields.h | 4 +- Filters/Core/vtkMergeFilter.cxx | 2 +- Filters/Core/vtkMergeFilter.h | 24 +- Filters/Core/vtkMoleculeAppend.cxx | 21 +- Filters/Core/vtkMoleculeAppend.h | 9 +- Filters/Core/vtkMultiObjectMassProperties.cxx | 19 +- Filters/Core/vtkMultiObjectMassProperties.h | 8 +- Filters/Core/vtkPassThrough.cxx | 100 + Filters/Core/vtkPassThrough.h | 83 + Filters/Core/vtkPlaneCutter.cxx | 301 +- Filters/Core/vtkPlaneCutter.h | 45 +- Filters/Core/vtkPointDataToCellData.cxx | 164 +- Filters/Core/vtkPointDataToCellData.h | 40 +- .../Core/vtkPolyDataConnectivityFilter.cxx | 8 +- Filters/Core/vtkPolyDataConnectivityFilter.h | 44 +- .../vtkPolyDataEdgeConnectivityFilter.cxx | 1099 + .../Core/vtkPolyDataEdgeConnectivityFilter.h | 445 + Filters/Core/vtkPolyDataNormals.h | 40 +- Filters/Core/vtkPolyDataPlaneClipper.cxx | 929 + Filters/Core/vtkPolyDataPlaneClipper.h | 158 + Filters/Core/vtkPolyDataTangents.h | 8 +- Filters/Core/vtkProbeFilter.cxx | 314 +- Filters/Core/vtkProbeFilter.h | 57 +- Filters/Core/vtkQuadricClustering.cxx | 62 +- Filters/Core/vtkQuadricClustering.h | 73 +- Filters/Core/vtkQuadricDecimation.cxx | 18 +- Filters/Core/vtkQuadricDecimation.h | 34 +- Filters/Core/vtkRearrangeFields.cxx | 4 +- Filters/Core/vtkRearrangeFields.h | 4 +- .../vtkRectilinearSynchronizedTemplates.cxx | 26 +- .../vtkRectilinearSynchronizedTemplates.h | 20 +- Filters/Core/vtkRemoveDuplicatePolys.cxx | 12 +- Filters/Core/vtkRemoveDuplicatePolys.h | 2 +- Filters/Core/vtkRemoveUnusedPoints.cxx | 255 + Filters/Core/vtkRemoveUnusedPoints.h | 70 + Filters/Core/vtkResampleToImage.cxx | 51 +- Filters/Core/vtkResampleToImage.h | 22 +- Filters/Core/vtkResampleWithDataSet.cxx | 40 +- Filters/Core/vtkResampleWithDataSet.h | 46 +- Filters/Core/vtkReverseSense.h | 10 +- Filters/Core/vtkSimpleElevationFilter.cxx | 39 +- Filters/Core/vtkSimpleElevationFilter.h | 6 +- Filters/Core/vtkSmoothPolyDataFilter.cxx | 2 +- Filters/Core/vtkSmoothPolyDataFilter.h | 46 +- Filters/Core/vtkSphereTreeFilter.cxx | 14 +- Filters/Core/vtkSphereTreeFilter.h | 32 +- Filters/Core/vtkStaticCleanPolyData.cxx | 62 +- Filters/Core/vtkStaticCleanPolyData.h | 36 +- Filters/Core/vtkStreamerBase.cxx | 8 +- Filters/Core/vtkStreamingTessellator.cxx | 15 + Filters/Core/vtkStreamingTessellator.h | 52 +- Filters/Core/vtkStripper.cxx | 6 +- Filters/Core/vtkStripper.h | 22 +- Filters/Core/vtkStructuredGridAppend.cxx | 83 +- Filters/Core/vtkStructuredGridAppend.h | 8 +- .../Core/vtkStructuredGridOutlineFilter.cxx | 8 +- Filters/Core/vtkStructuredGridOutlineFilter.h | 6 +- Filters/Core/vtkSynchronizedTemplates2D.cxx | 22 +- Filters/Core/vtkSynchronizedTemplates2D.h | 8 +- Filters/Core/vtkSynchronizedTemplates3D.cxx | 28 +- Filters/Core/vtkSynchronizedTemplates3D.h | 24 +- .../Core/vtkSynchronizedTemplatesCutter3D.cxx | 14 +- .../Core/vtkSynchronizedTemplatesCutter3D.h | 8 +- Filters/Core/vtkTensorGlyph.cxx | 17 +- Filters/Core/vtkTensorGlyph.h | 64 +- Filters/Core/vtkThreshold.cxx | 69 +- Filters/Core/vtkThreshold.h | 109 +- Filters/Core/vtkThresholdPoints.cxx | 42 +- Filters/Core/vtkThresholdPoints.h | 24 +- Filters/Core/vtkTransposeTable.cxx | 16 +- Filters/Core/vtkTransposeTable.h | 12 +- Filters/Core/vtkTriangleFilter.h | 10 +- Filters/Core/vtkTriangleMeshPointNormals.cxx | 24 +- Filters/Core/vtkTriangleMeshPointNormals.h | 4 +- Filters/Core/vtkTubeBender.cxx | 237 + Filters/Core/vtkTubeBender.h | 83 + Filters/Core/vtkTubeFilter.cxx | 13 +- Filters/Core/vtkTubeFilter.h | 70 +- .../vtkUnstructuredGridQuadricDecimation.h | 32 +- ...structuredGridToExplicitStructuredGrid.cxx | 57 +- ...UnstructuredGridToExplicitStructuredGrid.h | 5 +- Filters/Core/vtkVectorDot.cxx | 67 +- Filters/Core/vtkVectorDot.h | 14 +- Filters/Core/vtkVectorNorm.cxx | 8 +- Filters/Core/vtkVectorNorm.h | 6 +- Filters/Core/vtkVoronoi2D.cxx | 8 +- Filters/Core/vtkVoronoi2D.h | 36 +- .../Core/vtkWindowedSincPolyDataFilter.cxx | 1935 +- Filters/Core/vtkWindowedSincPolyDataFilter.h | 125 +- Filters/Extraction/CMakeLists.txt | 7 +- Filters/Extraction/Testing/Cxx/CMakeLists.txt | 17 +- .../Testing/Cxx/TestConvertSelection.cxx | 42 +- .../Testing/Cxx/TestExtractBlock.cxx | 55 +- .../Cxx/TestExtractBlockUsingDataAssembly.cxx | 80 + .../Testing/Cxx/TestExtractCells.cxx | 38 + ...stExtractExodusGlobalTemporalVariables.cxx | 66 + .../Testing/Cxx/TestExtractGridPieces.cxx | 40 + .../Cxx/TestExtractRectilinearGrid.cxx | 2 +- .../TestExtractSelectionUsingDataAssembly.cxx | 113 + .../ExtractEdgesQuadraticCells.png.sha512 | 2 +- .../Python/ExtractEdgesQuadraticCells.py | 1033 +- .../Testing/Python/TestExtractCellsByType.py | 7 +- Filters/Extraction/vtk.module | 2 + Filters/Extraction/vtkBlockSelector.cxx | 96 +- Filters/Extraction/vtkBlockSelector.h | 13 +- Filters/Extraction/vtkConvertSelection.cxx | 147 +- Filters/Extraction/vtkConvertSelection.h | 40 +- .../Extraction/vtkExpandMarkedElements.cxx | 20 +- Filters/Extraction/vtkExpandMarkedElements.h | 8 +- Filters/Extraction/vtkExtractBlock.cxx | 269 +- Filters/Extraction/vtkExtractBlock.h | 66 +- .../vtkExtractBlockUsingDataAssembly.cxx | 371 + .../vtkExtractBlockUsingDataAssembly.h | 140 + Filters/Extraction/vtkExtractCells.cxx | 849 +- Filters/Extraction/vtkExtractCells.h | 28 +- Filters/Extraction/vtkExtractCellsByType.cxx | 26 +- Filters/Extraction/vtkExtractCellsByType.h | 14 +- .../vtkExtractDataArraysOverTime.cxx | 47 +- .../Extraction/vtkExtractDataArraysOverTime.h | 24 +- Filters/Extraction/vtkExtractDataOverTime.cxx | 10 +- Filters/Extraction/vtkExtractDataOverTime.h | 10 +- Filters/Extraction/vtkExtractDataSets.cxx | 10 +- Filters/Extraction/vtkExtractEdges.cxx | 165 +- Filters/Extraction/vtkExtractEdges.h | 17 +- ...tkExtractExodusGlobalTemporalVariables.cxx | 190 +- .../vtkExtractExodusGlobalTemporalVariables.h | 58 +- Filters/Extraction/vtkExtractGeometry.cxx | 22 +- Filters/Extraction/vtkExtractGeometry.h | 12 +- Filters/Extraction/vtkExtractGrid.cxx | 39 +- Filters/Extraction/vtkExtractGrid.h | 12 +- Filters/Extraction/vtkExtractLevel.cxx | 14 +- Filters/Extraction/vtkExtractLevel.h | 4 +- .../Extraction/vtkExtractPolyDataGeometry.cxx | 10 +- .../Extraction/vtkExtractPolyDataGeometry.h | 22 +- .../Extraction/vtkExtractRectilinearGrid.cxx | 12 +- .../Extraction/vtkExtractRectilinearGrid.h | 12 +- .../vtkExtractSelectedArraysOverTime.cxx | 26 +- .../vtkExtractSelectedArraysOverTime.h | 12 +- .../Extraction/vtkExtractSelectedBlock.cxx | 12 +- Filters/Extraction/vtkExtractSelectedIds.cxx | 49 +- .../vtkExtractSelectedLocations.cxx | 45 +- .../vtkExtractSelectedPolyDataIds.cxx | 10 +- Filters/Extraction/vtkExtractSelectedRows.cxx | 14 +- Filters/Extraction/vtkExtractSelectedRows.h | 4 +- .../vtkExtractSelectedThresholds.cxx | 27 +- Filters/Extraction/vtkExtractSelection.cxx | 101 +- Filters/Extraction/vtkExtractSelection.h | 4 +- .../vtkExtractTemporalFieldData.cxx | 22 +- .../Extraction/vtkExtractTemporalFieldData.h | 8 +- .../Extraction/vtkExtractTensorComponents.cxx | 197 +- .../Extraction/vtkExtractTensorComponents.h | 118 +- Filters/Extraction/vtkExtractTimeSteps.cxx | 12 +- Filters/Extraction/vtkExtractTimeSteps.h | 26 +- .../Extraction/vtkExtractUnstructuredGrid.h | 42 +- .../Extraction/vtkExtractVectorComponents.cxx | 73 +- .../Extraction/vtkExtractVectorComponents.h | 4 +- Filters/Extraction/vtkFrustumSelector.cxx | 127 +- Filters/Extraction/vtkFrustumSelector.h | 4 +- .../vtkHierarchicalDataExtractDataSets.cxx | 6 +- .../vtkHierarchicalDataExtractLevel.cxx | 6 +- Filters/Extraction/vtkLocationSelector.cxx | 16 +- .../Extraction/vtkProbeSelectedLocations.cxx | 10 +- Filters/Extraction/vtkSelector.cxx | 81 +- Filters/Extraction/vtkSelector.h | 11 +- Filters/Extraction/vtkValueSelector.cxx | 33 +- Filters/FlowPaths/CMakeLists.txt | 16 +- Filters/FlowPaths/Testing/Cxx/CMakeLists.txt | 4 + .../Cxx/TestLagrangianIntegrationModel.cxx | 13 +- .../Testing/Cxx/TestLagrangianParticle.cxx | 18 +- .../Cxx/TestLagrangianParticleTracker.cxx | 4 +- .../Testing/Cxx/TestParallelVectors.cxx | 329 + .../Testing/Cxx/TestParticleTracers.cxx | 5 +- .../Testing/Cxx/TestStreamSurface.cxx | 101 + .../Testing/Cxx/TestStreamTracer.cxx | 9 +- .../Testing/Cxx/TestVectorFieldTopology.cxx | 140 + .../FlowPaths/Testing/Cxx/TestVortexCore.cxx | 280 + .../Baseline/TestParallelVectors.png.sha512 | 1 + .../Baseline/TestStreamSurface.png.sha512 | 1 + .../TestVectorFieldTopology.png.sha512 | 1 + Filters/FlowPaths/vtk.module | 3 + .../vtkAMRInterpolatedVelocityField.cxx | 2 +- .../vtkAbstractInterpolatedVelocityField.cxx | 32 +- .../vtkAbstractInterpolatedVelocityField.h | 44 +- .../vtkCachingInterpolatedVelocityField.cxx | 63 +- .../vtkCachingInterpolatedVelocityField.h | 20 +- ...tkCellLocatorInterpolatedVelocityField.cxx | 20 +- .../vtkCellLocatorInterpolatedVelocityField.h | 36 +- .../vtkCompositeInterpolatedVelocityField.cxx | 6 +- .../vtkCompositeInterpolatedVelocityField.h | 4 +- .../FlowPaths/vtkEvenlySpacedStreamlines2D.h | 54 +- .../vtkInterpolatedVelocityField.cxx | 14 +- .../FlowPaths/vtkInterpolatedVelocityField.h | 12 +- .../vtkLagrangianBasicIntegrationModel.cxx | 190 +- .../vtkLagrangianBasicIntegrationModel.h | 65 +- .../vtkLagrangianMatidaIntegrationModel.cxx | 17 +- Filters/FlowPaths/vtkLagrangianParticle.cxx | 128 +- Filters/FlowPaths/vtkLagrangianParticle.h | 139 +- .../vtkLagrangianParticleTracker.cxx | 195 +- .../FlowPaths/vtkLagrangianParticleTracker.h | 78 +- Filters/FlowPaths/vtkLagrangianThreadedData.h | 25 +- Filters/FlowPaths/vtkModifiedBSPTree.cxx | 124 +- Filters/FlowPaths/vtkModifiedBSPTree.h | 6 +- Filters/FlowPaths/vtkParallelVectors.cxx | 853 + Filters/FlowPaths/vtkParallelVectors.h | 116 + Filters/FlowPaths/vtkParticlePathFilter.h | 8 +- Filters/FlowPaths/vtkParticleTracer.h | 2 +- Filters/FlowPaths/vtkParticleTracerBase.cxx | 116 +- Filters/FlowPaths/vtkParticleTracerBase.h | 90 +- Filters/FlowPaths/vtkStreaklineFilter.cxx | 2 +- Filters/FlowPaths/vtkStreaklineFilter.h | 8 +- Filters/FlowPaths/vtkStreamSurface.cxx | 345 + Filters/FlowPaths/vtkStreamSurface.h | 94 + Filters/FlowPaths/vtkStreamTracer.cxx | 83 +- Filters/FlowPaths/vtkStreamTracer.h | 81 +- .../vtkTemporalInterpolatedVelocityField.cxx | 44 +- .../vtkTemporalInterpolatedVelocityField.h | 20 +- Filters/FlowPaths/vtkTemporalStreamTracer.cxx | 82 +- Filters/FlowPaths/vtkTemporalStreamTracer.h | 83 +- Filters/FlowPaths/vtkVectorFieldTopology.cxx | 1957 + Filters/FlowPaths/vtkVectorFieldTopology.h | 506 + Filters/FlowPaths/vtkVortexCore.cxx | 507 + Filters/FlowPaths/vtkVortexCore.h | 108 + Filters/General/CMakeLists.txt | 12 +- .../Testing/Cxx/ArrayExtractFactoredArray.cxx | 4 +- .../Testing/Cxx/ArrayMatricizeArray.cxx | 3 +- .../Cxx/ArrayNormalizeMatrixVectors.cxx | 4 + .../General/Testing/Cxx/BoxClipPolyData.cxx | 4 +- .../General/Testing/Cxx/BoxClipTetrahedra.cxx | 5 + .../Testing/Cxx/BoxClipTriangulate.cxx | 10 +- Filters/General/Testing/Cxx/CMakeLists.txt | 42 +- .../General/Testing/Cxx/TestAnimateModes.cxx | 96 + .../TestBooleanOperationPolyDataFilter2.cxx | 18 +- .../General/Testing/Cxx/TestCellValidator.cxx | 396 +- .../Testing/Cxx/TestDeflectNormals.cxx | 88 + .../Testing/Cxx/TestExtractGhostCells.cxx | 122 + .../Testing/Cxx/TestGradientAndVorticity.cxx | 203 +- ...TestGraphWeightEuclideanDistanceFilter.cxx | 4 +- .../Testing/Cxx/TestGroupDataSetsFilter.cxx | 86 + .../General/Testing/Cxx/TestMergeCells.cxx | 177 + .../Testing/Cxx/TestMergeTimeFilter.cxx | 109 + .../Testing/Cxx/TestMergeVectorComponents.cxx | 178 + .../Testing/Cxx/TestQuadraturePoints.cxx | 8 +- .../Testing/Cxx/TestReflectionFilter.cxx | 67 +- .../Cxx/TestSplitByCellScalarFilter.cxx | 1 + Filters/General/Testing/Cxx/TestTableFFT.cxx | 176 + .../Cxx/TestTemporalPathLineFilter.cxx | 160 + .../General/Testing/Cxx/TestTessellator.cxx | 27 +- .../Cxx/TestYoungsMaterialInterface.cxx | 8 +- .../Data/Baseline/TestAnimateModes.png.sha512 | 1 + .../Baseline/TestDeflectNormals.png.sha512 | 1 + .../TestDiscreteMarchingCubes.png.sha512 | 2 +- .../TestGroupTimeStepsFilter.png.sha512 | 1 + .../Baseline/TestRemovePolyData.png.sha512 | 1 + .../Baseline/TestRemovePolyData2.png.sha512 | 1 + .../Baseline/TestRemovePolyData3.png.sha512 | 1 + .../Baseline/TestSparseCellLocator.png.sha512 | 1 + .../Baseline/clipQuadraticCells.png.sha512 | 2 +- .../testDataSetTriangleFilter.png.sha512 | 2 +- Filters/General/Testing/Python/CMakeLists.txt | 7 + Filters/General/Testing/Python/Canny.py | 3 +- .../Testing/Python/GreenLagrangeStrain.py | 7 +- .../General/Testing/Python/TestCellDerivs.py | 2 +- .../General/Testing/Python/TestCurvatures.py | 6 +- .../Python/TestDiscreteMarchingCubes.py | 13 + ...estDiscreteMarchingCubesAdjacentScalars.py | 6 +- .../Python/TestGroupTimeStepsFilter.py | 97 + .../Testing/Python/TestRemovePolyData.py | 135 + .../Testing/Python/TestRemovePolyData2.py | 140 + .../Testing/Python/TestRemovePolyData3.py | 82 + .../Testing/Python/TestSparseCellLocator.py | 145 + .../General/Testing/Python/TestWarpScalar.py | 45 + .../General/Testing/Python/TestWarpVector.py | 45 + .../Testing/Python/clipQuadraticCells.py | 656 +- .../Testing/Python/subPixelPositionMin.py | 3 +- .../General/Testing/Python/tableBasedClip.py | 3 +- Filters/General/vtk.module | 5 + Filters/General/vtkAnimateModes.cxx | 233 + Filters/General/vtkAnimateModes.h | 129 + Filters/General/vtkAnnotationLink.cxx | 38 +- Filters/General/vtkAnnotationLink.h | 12 +- .../General/vtkAppendLocationAttributes.cxx | 6 +- Filters/General/vtkAppendLocationAttributes.h | 7 +- Filters/General/vtkAppendPoints.cxx | 14 +- Filters/General/vtkAppendPoints.h | 8 +- .../vtkApproximatingSubdivisionFilter.h | 2 +- .../General/vtkAreaContourSpectrumFilter.cxx | 16 +- .../General/vtkAreaContourSpectrumFilter.h | 12 +- Filters/General/vtkAxes.cxx | 6 +- Filters/General/vtkAxes.h | 18 +- Filters/General/vtkBlankStructuredGrid.h | 20 +- .../vtkBlankStructuredGridWithImage.cxx | 14 +- .../General/vtkBlankStructuredGridWithImage.h | 4 +- Filters/General/vtkBlockIdScalars.cxx | 10 +- .../vtkBooleanOperationPolyDataFilter.cxx | 19 +- .../vtkBooleanOperationPolyDataFilter.h | 16 +- Filters/General/vtkBoxClipDataSet.cxx | 67 +- Filters/General/vtkBoxClipDataSet.h | 24 +- Filters/General/vtkBrownianPoints.h | 10 +- Filters/General/vtkCellDerivatives.cxx | 306 +- Filters/General/vtkCellDerivatives.h | 15 +- Filters/General/vtkCellTreeLocator.cxx | 75 +- Filters/General/vtkCellTreeLocator.h | 12 +- Filters/General/vtkCellValidator.cxx | 186 +- Filters/General/vtkCellValidator.h | 8 +- Filters/General/vtkClipClosedSurface.cxx | 43 +- Filters/General/vtkClipClosedSurface.h | 46 +- Filters/General/vtkClipConvexPolyData.cxx | 26 +- Filters/General/vtkClipConvexPolyData.h | 4 +- Filters/General/vtkClipDataSet.cxx | 30 +- Filters/General/vtkClipDataSet.h | 36 +- Filters/General/vtkClipVolume.cxx | 8 +- Filters/General/vtkClipVolume.h | 32 +- Filters/General/vtkCoincidentPoints.cxx | 10 +- Filters/General/vtkContourTriangulator.cxx | 43 +- Filters/General/vtkContourTriangulator.h | 8 +- Filters/General/vtkCountFaces.h | 4 +- Filters/General/vtkCountVertices.h | 4 +- Filters/General/vtkCursor2D.cxx | 16 +- Filters/General/vtkCursor2D.h | 38 +- Filters/General/vtkCursor3D.h | 40 +- Filters/General/vtkCurvatures.cxx | 171 +- Filters/General/vtkCurvatures.h | 92 +- Filters/General/vtkDataSetGradient.h | 4 +- .../General/vtkDataSetGradientPrecompute.cxx | 3 + Filters/General/vtkDataSetTriangleFilter.h | 4 +- Filters/General/vtkDateToNumeric.cxx | 20 +- Filters/General/vtkDateToNumeric.h | 4 +- Filters/General/vtkDeflectNormals.cxx | 173 + Filters/General/vtkDeflectNormals.h | 81 + Filters/General/vtkDeformPointSet.cxx | 14 +- Filters/General/vtkDeformPointSet.h | 12 +- Filters/General/vtkDensifyPolyData.cxx | 19 +- Filters/General/vtkDensifyPolyData.h | 4 +- Filters/General/vtkDicer.h | 26 +- Filters/General/vtkDiscreteFlyingEdges2D.cxx | 30 +- Filters/General/vtkDiscreteFlyingEdges2D.h | 12 +- Filters/General/vtkDiscreteFlyingEdges3D.cxx | 187 +- Filters/General/vtkDiscreteFlyingEdges3D.h | 20 +- .../vtkDiscreteFlyingEdgesClipper2D.cxx | 34 +- .../General/vtkDiscreteFlyingEdgesClipper2D.h | 16 +- Filters/General/vtkDiscreteMarchingCubes.cxx | 6 + Filters/General/vtkDiscreteMarchingCubes.h | 5 +- Filters/General/vtkDistancePolyDataFilter.cxx | 13 +- Filters/General/vtkDistancePolyDataFilter.h | 16 +- Filters/General/vtkEdgePoints.h | 4 +- Filters/General/vtkEqualizerFilter.cxx | 453 + Filters/General/vtkEqualizerFilter.h | 106 + Filters/General/vtkExtractArray.h | 4 +- Filters/General/vtkExtractGhostCells.cxx | 103 + Filters/General/vtkExtractGhostCells.h | 61 + Filters/General/vtkExtractSelectedFrustum.cxx | 32 +- Filters/General/vtkExtractSelectedFrustum.h | 24 +- Filters/General/vtkExtractSelectionBase.cxx | 10 +- Filters/General/vtkExtractSelectionBase.h | 4 +- Filters/General/vtkGradientFilter.cxx | 1219 +- Filters/General/vtkGradientFilter.h | 94 +- Filters/General/vtkGraphLayoutFilter.cxx | 4 +- Filters/General/vtkGraphLayoutFilter.h | 18 +- Filters/General/vtkGraphToPoints.h | 2 +- .../vtkGraphWeightEuclideanDistanceFilter.cxx | 2 +- .../vtkGraphWeightEuclideanDistanceFilter.h | 4 +- Filters/General/vtkGraphWeightFilter.cxx | 2 +- Filters/General/vtkGraphWeightFilter.h | 4 +- Filters/General/vtkGroupDataSetsFilter.cxx | 257 + Filters/General/vtkGroupDataSetsFilter.h | 95 + Filters/General/vtkGroupTimeStepsFilter.cxx | 280 + Filters/General/vtkGroupTimeStepsFilter.h | 79 + Filters/General/vtkHyperStreamline.cxx | 5 + Filters/General/vtkHyperStreamline.h | 36 +- Filters/General/vtkIconGlyphFilter.cxx | 8 +- Filters/General/vtkIconGlyphFilter.h | 36 +- Filters/General/vtkImageDataToPointSet.cxx | 6 +- Filters/General/vtkImageMarchingCubes.cxx | 34 +- Filters/General/vtkImageMarchingCubes.h | 20 +- .../vtkInterpolateDataSetAttributes.cxx | 2 +- .../General/vtkInterpolateDataSetAttributes.h | 4 +- .../vtkInterpolatingSubdivisionFilter.h | 2 +- .../General/vtkIntersectionPolyDataFilter.cxx | 50 +- .../General/vtkIntersectionPolyDataFilter.h | 36 +- Filters/General/vtkLevelIdScalars.h | 4 +- Filters/General/vtkLinkEdgels.h | 14 +- .../General/vtkLoopBooleanPolyDataFilter.cxx | 33 +- .../General/vtkLoopBooleanPolyDataFilter.h | 24 +- Filters/General/vtkMarchingContourFilter.cxx | 12 +- Filters/General/vtkMarchingContourFilter.h | 24 +- Filters/General/vtkMatricizeArray.cxx | 3 +- Filters/General/vtkMatricizeArray.h | 8 +- Filters/General/vtkMergeArrays.cxx | 25 +- Filters/General/vtkMergeArrays.h | 12 +- Filters/General/vtkMergeCells.cxx | 206 +- Filters/General/vtkMergeCells.h | 54 +- Filters/General/vtkMergeTimeFilter.cxx | 246 + Filters/General/vtkMergeTimeFilter.h | 139 + Filters/General/vtkMergeVectorComponents.cxx | 205 + Filters/General/vtkMergeVectorComponents.h | 104 + .../General/vtkMultiBlockDataGroupFilter.cxx | 18 +- .../General/vtkMultiBlockDataGroupFilter.h | 8 +- .../vtkMultiBlockFromTimeSeriesFilter.cxx | 3 + .../vtkMultiBlockFromTimeSeriesFilter.h | 16 +- Filters/General/vtkMultiBlockMergeFilter.cxx | 18 +- Filters/General/vtkMultiBlockMergeFilter.h | 4 +- Filters/General/vtkMultiThreshold.h | 20 +- .../vtkNonOverlappingAMRLevelIdScalars.cxx | 12 +- Filters/General/vtkNormalizeMatrixVectors.cxx | 5 + Filters/General/vtkNormalizeMatrixVectors.h | 8 +- Filters/General/vtkOBBDicer.cxx | 2 +- Filters/General/vtkOBBDicer.h | 4 +- Filters/General/vtkOBBTree.cxx | 2 +- Filters/General/vtkOBBTree.h | 4 +- .../vtkOverlappingAMRLevelIdScalars.cxx | 12 +- Filters/General/vtkPassArrays.cxx | 8 +- Filters/General/vtkPassArrays.h | 12 +- Filters/General/vtkPassSelectedArrays.cxx | 14 +- Filters/General/vtkPassSelectedArrays.h | 8 +- Filters/General/vtkPassThrough.cxx | 100 - Filters/General/vtkPassThrough.h | 80 - .../General/vtkPointConnectivityFilter.cxx | 10 +- Filters/General/vtkPointConnectivityFilter.h | 4 +- Filters/General/vtkPolyDataStreamer.cxx | 18 +- Filters/General/vtkPolyDataStreamer.h | 8 +- .../General/vtkPolyDataToReebGraphFilter.cxx | 14 +- .../General/vtkPolyDataToReebGraphFilter.h | 4 +- Filters/General/vtkProbePolyhedron.cxx | 18 +- Filters/General/vtkProbePolyhedron.h | 16 +- .../vtkQuadraturePointInterpolator.cxx | 16 +- .../General/vtkQuadraturePointInterpolator.h | 4 +- .../General/vtkQuadraturePointsGenerator.cxx | 16 +- ...vtkQuadratureSchemeDictionaryGenerator.cxx | 14 +- .../vtkQuadratureSchemeDictionaryGenerator.h | 4 +- Filters/General/vtkQuantizePolyDataPoints.cxx | 8 +- Filters/General/vtkQuantizePolyDataPoints.h | 6 +- .../General/vtkRandomAttributeGenerator.cxx | 27 +- Filters/General/vtkRandomAttributeGenerator.h | 86 +- Filters/General/vtkRectilinearGridClip.cxx | 16 +- Filters/General/vtkRectilinearGridClip.h | 10 +- .../General/vtkRectilinearGridToPointSet.cxx | 10 +- .../vtkRectilinearGridToTetrahedra.cxx | 24 +- .../General/vtkRectilinearGridToTetrahedra.h | 10 +- Filters/General/vtkRecursiveDividingCubes.cxx | 6 +- Filters/General/vtkRecursiveDividingCubes.h | 12 +- Filters/General/vtkReflectionFilter.cxx | 56 +- Filters/General/vtkReflectionFilter.h | 16 +- Filters/General/vtkRemovePolyData.cxx | 815 + Filters/General/vtkRemovePolyData.h | 136 + Filters/General/vtkRotationFilter.cxx | 59 +- Filters/General/vtkRotationFilter.h | 20 +- .../vtkSampleImplicitFunctionFilter.cxx | 14 +- .../General/vtkSampleImplicitFunctionFilter.h | 20 +- Filters/General/vtkShrinkFilter.cxx | 10 +- Filters/General/vtkShrinkFilter.h | 4 +- Filters/General/vtkShrinkPolyData.h | 10 +- .../vtkSpatialRepresentationFilter.cxx | 4 +- .../General/vtkSpatialRepresentationFilter.h | 12 +- Filters/General/vtkSphericalHarmonics.cxx | 230 + Filters/General/vtkSphericalHarmonics.h | 53 + Filters/General/vtkSplineFilter.h | 28 +- .../General/vtkSplitByCellScalarFilter.cxx | 12 +- Filters/General/vtkSplitByCellScalarFilter.h | 4 +- Filters/General/vtkSplitColumnComponents.cxx | 99 +- Filters/General/vtkSplitColumnComponents.h | 12 +- Filters/General/vtkStructuredGridClip.cxx | 16 +- Filters/General/vtkStructuredGridClip.h | 10 +- Filters/General/vtkSubPixelPositionEdgels.h | 8 +- Filters/General/vtkSubdivisionFilter.h | 10 +- Filters/General/vtkSynchronizeTimeFilter.cxx | 23 +- Filters/General/vtkSynchronizeTimeFilter.h | 1 + Filters/General/vtkTableBasedClipCases.cxx | 44 +- Filters/General/vtkTableBasedClipDataSet.cxx | 33 +- Filters/General/vtkTableBasedClipDataSet.h | 36 +- Filters/General/vtkTableFFT.cxx | 379 + Filters/General/vtkTableFFT.h | 181 + Filters/General/vtkTableToPolyData.cxx | 12 +- Filters/General/vtkTableToPolyData.h | 44 +- Filters/General/vtkTableToStructuredGrid.cxx | 14 +- Filters/General/vtkTableToStructuredGrid.h | 28 +- Filters/General/vtkTemporalPathLineFilter.cxx | 107 +- Filters/General/vtkTemporalPathLineFilter.h | 65 +- Filters/General/vtkTemporalStatistics.cxx | 50 +- Filters/General/vtkTemporalStatistics.h | 20 +- Filters/General/vtkTessellatorFilter.cxx | 96 +- Filters/General/vtkTessellatorFilter.h | 22 +- Filters/General/vtkTimeSourceExample.cxx | 20 +- Filters/General/vtkTimeSourceExample.h | 12 +- Filters/General/vtkTransformFilter.h | 12 +- Filters/General/vtkTransformPolyDataFilter.h | 8 +- Filters/General/vtkUncertaintyTubeFilter.cxx | 25 +- Filters/General/vtkUncertaintyTubeFilter.h | 8 +- Filters/General/vtkVertexGlyphFilter.cxx | 6 +- .../vtkVolumeContourSpectrumFilter.cxx | 20 +- .../General/vtkVolumeContourSpectrumFilter.h | 12 +- .../General/vtkVoxelContoursToSurfaceFilter.h | 4 +- Filters/General/vtkWarpLens.h | 30 +- Filters/General/vtkWarpScalar.cxx | 210 +- Filters/General/vtkWarpScalar.h | 38 +- Filters/General/vtkWarpTo.h | 14 +- Filters/General/vtkWarpVector.cxx | 184 +- Filters/General/vtkWarpVector.h | 22 +- .../General/vtkYoungsMaterialInterface.cxx | 37 +- Filters/General/vtkYoungsMaterialInterface.h | 56 +- .../Cxx/UnitTestGenericGeometryFilter.cxx | 8 +- Filters/Generic/Testing/Cxx/otherCreation.cxx | 23 +- Filters/Generic/vtkGenericClip.cxx | 18 +- Filters/Generic/vtkGenericClip.h | 36 +- Filters/Generic/vtkGenericContourFilter.cxx | 30 +- Filters/Generic/vtkGenericContourFilter.h | 24 +- Filters/Generic/vtkGenericCutter.cxx | 28 +- Filters/Generic/vtkGenericCutter.h | 16 +- .../Generic/vtkGenericDataSetTessellator.cxx | 18 +- .../Generic/vtkGenericDataSetTessellator.h | 16 +- Filters/Generic/vtkGenericGeometryFilter.cxx | 24 +- Filters/Generic/vtkGenericGeometryFilter.h | 44 +- Filters/Generic/vtkGenericGlyph3DFilter.cxx | 16 +- Filters/Generic/vtkGenericGlyph3DFilter.h | 64 +- Filters/Generic/vtkGenericOutlineFilter.cxx | 18 +- Filters/Generic/vtkGenericOutlineFilter.h | 1 + Filters/Generic/vtkGenericProbeFilter.cxx | 18 +- Filters/Generic/vtkGenericProbeFilter.h | 8 +- Filters/Generic/vtkGenericStreamTracer.cxx | 92 +- Filters/Generic/vtkGenericStreamTracer.h | 60 +- Filters/Geometry/CMakeLists.txt | 1 + Filters/Geometry/Testing/Cxx/CMakeLists.txt | 9 +- .../Cxx/TestDataSetSurfaceFieldData.cxx | 14 +- ...taSetSurfaceFilterWithBlankedImageData.cxx | 159 + .../Cxx/TestImageDataToUniformGrid.cxx | 8 +- .../Testing/Cxx/TestProjectSphereFilter.cxx | 1 + .../TestRegularGridDataSetSurfaceFilter.cxx | 208 + .../Cxx/TestStructuredAMRGridConnectivity.cxx | 4 +- .../TestStructuredGridGhostDataGenerator.cxx | 531 - .../Cxx/TestUniformGridGhostDataGenerator.cxx | 379 - .../TestUnstructuredGridGeometryFilter.cxx | 551 +- .../Cxx/UnitTestDataSetSurfaceFilter.cxx | 102 +- ...rfaceFilterWithBlankedImageData.png.sha512 | 1 + ...xplicitStructuredGridSurfaceFilter.png.md5 | 1 - ...icitStructuredGridSurfaceFilter.png.sha512 | 1 + .../Baseline/TestGeometryFilter.png.sha512 | 1 + .../Baseline/TestGeometryFilter2.png.sha512 | 1 + .../TestMarkBoundaryFilter.png.sha512 | 1 + .../TestMarkBoundaryFilter2.png.sha512 | 1 + ...RegularGridDataSetSurfaceFilter.png.sha512 | 1 + ...tUnstructuredGridGeometryFilter.png.sha512 | 2 +- .../Geometry/Testing/Python/CMakeLists.txt | 4 + .../Testing/Python/TestGeometryFilter.py | 101 + .../Testing/Python/TestGeometryFilter2.py | 67 + .../Testing/Python/TestMarkBoundaryFilter.py | 110 + .../Testing/Python/TestMarkBoundaryFilter2.py | 87 + Filters/Geometry/Testing/Python/geomFilter.py | 21 +- .../Geometry/vtkAbstractGridConnectivity.h | 12 +- .../vtkCompositeDataGeometryFilter.cxx | 14 +- Filters/Geometry/vtkDataSetGhostGenerator.h | 11 +- .../vtkDataSetRegionSurfaceFilter.cxx | 29 +- .../Geometry/vtkDataSetRegionSurfaceFilter.h | 24 +- Filters/Geometry/vtkDataSetSurfaceFilter.cxx | 1132 +- Filters/Geometry/vtkDataSetSurfaceFilter.h | 212 +- ...vtkExplicitStructuredGridSurfaceFilter.cxx | 26 +- .../vtkExplicitStructuredGridSurfaceFilter.h | 8 +- Filters/Geometry/vtkGeometryFilter.cxx | 3140 +- Filters/Geometry/vtkGeometryFilter.h | 371 +- .../vtkHierarchicalDataSetGeometryFilter.cxx | 6 +- Filters/Geometry/vtkImageDataGeometryFilter.h | 18 +- .../Geometry/vtkImageDataToUniformGrid.cxx | 16 +- Filters/Geometry/vtkImageDataToUniformGrid.h | 4 +- .../vtkLinearToQuadraticCellsFilter.cxx | 18 +- .../vtkLinearToQuadraticCellsFilter.h | 8 +- Filters/Geometry/vtkMarkBoundaryFilter.cxx | 1038 + Filters/Geometry/vtkMarkBoundaryFilter.h | 124 + Filters/Geometry/vtkProjectSphereFilter.cxx | 22 +- Filters/Geometry/vtkProjectSphereFilter.h | 12 +- .../vtkRectilinearGridGeometryFilter.h | 6 +- .../Geometry/vtkRectilinearGridPartitioner.h | 12 +- .../vtkStructuredAMRGridConnectivity.cxx | 92 +- .../vtkStructuredAMRGridConnectivity.h | 28 +- Filters/Geometry/vtkStructuredAMRNeighbor.cxx | 10 +- Filters/Geometry/vtkStructuredAMRNeighbor.h | 10 +- .../Geometry/vtkStructuredGridConnectivity.h | 23 +- .../vtkStructuredGridGeometryFilter.h | 6 +- .../vtkStructuredGridGhostDataGenerator.cxx | 4 + .../vtkStructuredGridGhostDataGenerator.h | 6 +- .../Geometry/vtkStructuredGridPartitioner.h | 12 +- Filters/Geometry/vtkStructuredNeighbor.h | 12 +- .../vtkStructuredPointsGeometryFilter.cxx | 5 + .../vtkStructuredPointsGeometryFilter.h | 4 +- .../vtkUniformGridGhostDataGenerator.cxx | 4 + .../vtkUniformGridGhostDataGenerator.h | 1 + .../vtkUnstructuredGridGeometryFilter.cxx | 48 +- .../vtkUnstructuredGridGeometryFilter.h | 54 +- Filters/Hybrid/Testing/CMakeLists.txt | 1 + Filters/Hybrid/Testing/Cxx/CMakeLists.txt | 2 + .../Hybrid/Testing/Cxx/TemporalStatistics.cxx | 6 +- ...idBinary2DAdaptiveDataSetSurfaceFilter.cxx | 6 +- ...2DAdaptiveDataSetSurfaceFilterMaterial.cxx | 6 +- ...dTernary3DAdaptiveDataSetSurfaceFilter.cxx | 6 +- ...3DAdaptiveDataSetSurfaceFilterMaterial.cxx | 6 +- ...structuredAdaptiveDataSetSurfaceFilter.cxx | 6 +- .../Testing/Cxx/TestTemporalCacheMemkind.cxx | 243 + .../Testing/Cxx/TestTemporalCacheSimple.cxx | 22 +- .../Testing/Cxx/TestTemporalCacheTemporal.cxx | 5 +- .../Testing/Cxx/TestTemporalFractal.cxx | 5 +- .../Testing/Cxx/TestTemporalInterpolator.cxx | 67 + .../TestTemporalInterpolator.png.sha512 | 1 + Filters/Hybrid/vtk.module | 1 + .../vtkAdaptiveDataSetSurfaceFilter.cxx | 42 +- .../Hybrid/vtkAdaptiveDataSetSurfaceFilter.h | 32 +- Filters/Hybrid/vtkBSplineTransform.cxx | 40 +- Filters/Hybrid/vtkBSplineTransform.h | 16 +- Filters/Hybrid/vtkDSPFilterDefinition.cxx | 40 +- Filters/Hybrid/vtkDSPFilterGroup.cxx | 40 +- Filters/Hybrid/vtkDepthSortPolyData.h | 26 +- Filters/Hybrid/vtkEarthSource.cxx | 3 +- Filters/Hybrid/vtkEarthSource.h | 14 +- Filters/Hybrid/vtkFacetReader.cxx | 10 +- Filters/Hybrid/vtkFacetReader.h | 10 +- Filters/Hybrid/vtkForceTime.cxx | 12 +- Filters/Hybrid/vtkGreedyTerrainDecimation.cxx | 52 +- Filters/Hybrid/vtkGreedyTerrainDecimation.h | 28 +- Filters/Hybrid/vtkGridTransform.cxx | 44 +- Filters/Hybrid/vtkGridTransform.h | 20 +- Filters/Hybrid/vtkImageToPolyDataFilter.h | 36 +- Filters/Hybrid/vtkImplicitModeller.cxx | 28 +- Filters/Hybrid/vtkImplicitModeller.h | 49 +- Filters/Hybrid/vtkPCAAnalysisFilter.cxx | 30 +- Filters/Hybrid/vtkPCAAnalysisFilter.h | 4 +- Filters/Hybrid/vtkPolyDataSilhouette.h | 36 +- .../Hybrid/vtkProcrustesAlignmentFilter.cxx | 18 +- Filters/Hybrid/vtkProcrustesAlignmentFilter.h | 16 +- Filters/Hybrid/vtkProjectedTerrainPath.cxx | 26 +- Filters/Hybrid/vtkProjectedTerrainPath.h | 24 +- Filters/Hybrid/vtkRenderLargeImage.cxx | 40 +- Filters/Hybrid/vtkRenderLargeImage.h | 8 +- .../Hybrid/vtkTemporalArrayOperatorFilter.cxx | 17 +- .../Hybrid/vtkTemporalArrayOperatorFilter.h | 21 +- Filters/Hybrid/vtkTemporalDataSetCache.cxx | 258 +- Filters/Hybrid/vtkTemporalDataSetCache.h | 44 +- Filters/Hybrid/vtkTemporalFractal.cxx | 48 +- Filters/Hybrid/vtkTemporalFractal.h | 44 +- Filters/Hybrid/vtkTemporalInterpolator.cxx | 48 +- Filters/Hybrid/vtkTemporalInterpolator.h | 19 +- Filters/Hybrid/vtkTemporalShiftScale.cxx | 21 +- Filters/Hybrid/vtkTemporalShiftScale.h | 24 +- Filters/Hybrid/vtkTemporalSnapToTimeStep.cxx | 16 +- Filters/Hybrid/vtkTransformToGrid.cxx | 24 +- Filters/Hybrid/vtkTransformToGrid.h | 24 +- Filters/Hybrid/vtkWeightedTransformFilter.cxx | 20 +- Filters/Hybrid/vtkWeightedTransformFilter.h | 28 +- .../Testing/Cxx/TestHyperTreeGridBinary2D.cxx | 11 +- .../TestHyperTreeGridBinary2DAxisClipBox.cxx | 12 +- ...stHyperTreeGridBinary2DAxisClipEllipse.cxx | 12 +- ...estHyperTreeGridBinary2DAxisClipPlanes.cxx | 12 +- ...rTreeGridBinary2DAxisReflectionXCenter.cxx | 11 +- ...dBinary2DAxisReflectionXCenterMaterial.cxx | 11 +- ...rTreeGridBinary2DAxisReflectionYCenter.cxx | 9 +- ...dBinary2DAxisReflectionYCenterMaterial.cxx | 11 +- .../TestHyperTreeGridBinary2DCellCenters.cxx | 13 +- ...perTreeGridBinary2DCellCentersMaterial.cxx | 13 +- .../Cxx/TestHyperTreeGridBinary2DContour.cxx | 13 +- ...stHyperTreeGridBinary2DContourMaterial.cxx | 13 +- .../TestHyperTreeGridBinary2DDepthLimiter.cxx | 13 +- ...erTreeGridBinary2DDepthLimiterMaterial.cxx | 13 +- .../Cxx/TestHyperTreeGridBinary2DIJK.cxx | 11 +- ...HyperTreeGridBinary2DInterfaceMaterial.cxx | 15 +- .../Cxx/TestHyperTreeGridBinary2DMaterial.cxx | 11 +- .../TestHyperTreeGridBinary2DMaterialIJK.cxx | 11 +- .../TestHyperTreeGridBinary2DThreshold.cxx | 13 +- ...HyperTreeGridBinary2DThresholdMaterial.cxx | 13 +- .../Cxx/TestHyperTreeGridBinary2DVector.cxx | 15 +- ...ridBinary2DVectorAxisReflectionXCenter.cxx | 14 +- ...ridBinary2DVectorAxisReflectionYCenter.cxx | 14 +- .../Cxx/TestHyperTreeGridBinary3DContour.cxx | 11 +- .../Cxx/TestHyperTreeGridBinary3DGeometry.cxx | 11 +- .../Cxx/TestHyperTreeGridBinaryClipPlanes.cxx | 20 +- ...TestHyperTreeGridBinaryEllipseMaterial.cxx | 8 +- ...GridBinaryHyperbolicParaboloidMaterial.cxx | 10 +- .../Cxx/TestHyperTreeGridTernary2D.cxx | 6 +- .../TestHyperTreeGridTernary2DBiMaterial.cxx | 14 +- ...HyperTreeGridTernary2DFullMaterialBits.cxx | 19 +- .../TestHyperTreeGridTernary2DMaterial.cxx | 13 +- ...TestHyperTreeGridTernary2DMaterialBits.cxx | 12 +- .../TestHyperTreeGridTernary3DAxisClipBox.cxx | 13 +- ...HyperTreeGridTernary3DAxisClipCylinder.cxx | 14 +- ...stHyperTreeGridTernary3DAxisClipPlanes.cxx | 12 +- .../Cxx/TestHyperTreeGridTernary3DAxisCut.cxx | 14 +- ...tHyperTreeGridTernary3DAxisCutMaterial.cxx | 14 +- ...TreeGridTernary3DAxisReflectionXCenter.cxx | 11 +- ...Ternary3DAxisReflectionXCenterMaterial.cxx | 11 +- ...reeGridTernary3DAxisReflectionYZCenter.cxx | 11 +- ...ernary3DAxisReflectionYZCenterMaterial.cxx | 11 +- .../TestHyperTreeGridTernary3DCellCenters.cxx | 13 +- ...erTreeGridTernary3DCellCentersMaterial.cxx | 13 +- .../Cxx/TestHyperTreeGridTernary3DClip.cxx | 13 +- .../Cxx/TestHyperTreeGridTernary3DContour.cxx | 11 +- ...tHyperTreeGridTernary3DContourMaterial.cxx | 11 +- .../TestHyperTreeGridTernary3DDualContour.cxx | 10 +- ...erTreeGridTernary3DDualContourMaterial.cxx | 10 +- .../TestHyperTreeGridTernary3DGeometry.cxx | 11 +- ...GridTernary3DGeometryLargeMaterialBits.cxx | 9 +- ...HyperTreeGridTernary3DGeometryMaterial.cxx | 11 +- ...rTreeGridTernary3DGeometryMaterialBits.cxx | 9 +- .../TestHyperTreeGridTernary3DPlaneCutter.cxx | 12 +- ...tHyperTreeGridTernary3DPlaneCutterDual.cxx | 12 +- ...eeGridTernary3DPlaneCutterDualMaterial.cxx | 12 +- ...erTreeGridTernary3DPlaneCutterMaterial.cxx | 12 +- .../TestHyperTreeGridTernary3DThreshold.cxx | 13 +- ...yperTreeGridTernary3DThresholdMaterial.cxx | 13 +- ...TestHyperTreeGridTernary3DUnstructured.cxx | 12 +- ...rTreeGridTernary3DUnstructuredMaterial.cxx | 12 +- .../Cxx/TestHyperTreeGridTernaryHyperbola.cxx | 8 +- ...TestHyperTreeGridTernarySphereMaterial.cxx | 11 +- ...eeGridTernarySphereMaterialReflections.cxx | 11 +- .../Cxx/TestHyperTreeGridToDualGrid.cxx | 12 +- .../Python/TestHyperTreeGrid2DXReflection.py | 4 +- .../Python/TestHyperTreeGrid2DYReflection.py | 4 +- .../Python/TestHyperTreeGrid2DZReflection.py | 4 +- .../Python/TestHyperTreeGrid3DXReflection.py | 4 +- .../Python/TestHyperTreeGrid3DYReflection.py | 4 +- .../Python/TestHyperTreeGrid3DZReflection.py | 4 +- .../TestUniformHyperTreeGrid2DXReflection.py | 4 +- .../TestUniformHyperTreeGrid2DYReflection.py | 4 +- .../TestUniformHyperTreeGrid2DZReflection.py | 4 +- .../TestUniformHyperTreeGrid3DXReflection.py | 4 +- .../TestUniformHyperTreeGrid3DYReflection.py | 4 +- .../TestUniformHyperTreeGrid3DZReflection.py | 4 +- .../HyperTree/vtkHyperTreeGridAxisClip.cxx | 33 +- Filters/HyperTree/vtkHyperTreeGridAxisClip.h | 30 +- Filters/HyperTree/vtkHyperTreeGridAxisCut.cxx | 17 +- Filters/HyperTree/vtkHyperTreeGridAxisCut.h | 10 +- .../vtkHyperTreeGridAxisReflection.cxx | 15 +- .../vtkHyperTreeGridAxisReflection.h | 10 +- .../HyperTree/vtkHyperTreeGridCellCenters.cxx | 21 +- .../HyperTree/vtkHyperTreeGridCellCenters.h | 2 +- Filters/HyperTree/vtkHyperTreeGridContour.cxx | 36 +- Filters/HyperTree/vtkHyperTreeGridContour.h | 16 +- .../vtkHyperTreeGridDepthLimiter.cxx | 58 +- .../HyperTree/vtkHyperTreeGridDepthLimiter.h | 34 +- .../vtkHyperTreeGridEvaluateCoarse.cxx | 50 +- .../vtkHyperTreeGridEvaluateCoarse.h | 18 +- .../HyperTree/vtkHyperTreeGridGeometry.cxx | 27 +- Filters/HyperTree/vtkHyperTreeGridGeometry.h | 12 +- .../HyperTree/vtkHyperTreeGridPlaneCutter.cxx | 53 +- .../HyperTree/vtkHyperTreeGridPlaneCutter.h | 16 +- .../HyperTree/vtkHyperTreeGridThreshold.cxx | 22 +- Filters/HyperTree/vtkHyperTreeGridThreshold.h | 14 +- .../HyperTree/vtkHyperTreeGridToDualGrid.cxx | 35 +- .../HyperTree/vtkHyperTreeGridToDualGrid.h | 2 +- .../vtkHyperTreeGridToUnstructuredGrid.cxx | 25 +- .../vtkHyperTreeGridToUnstructuredGrid.h | 2 +- .../HyperTree/vtkImageDataToHyperTreeGrid.cxx | 19 +- .../HyperTree/vtkImageDataToHyperTreeGrid.h | 6 +- Filters/Imaging/vtkExtractHistogram2D.h | 30 +- .../Imaging/vtkPairwiseExtractHistogram2D.cxx | 4 +- .../Imaging/vtkPairwiseExtractHistogram2D.h | 16 +- Filters/Modeling/CMakeLists.txt | 2 + Filters/Modeling/Testing/Cxx/CMakeLists.txt | 1 + .../Testing/Cxx/TestButterflyScalars.cxx | 2 +- .../Testing/Cxx/TestLinearCellExtrusion.cxx | 2 +- .../Cxx/TestQuadRotationalExtrusion.cxx | 2 +- .../TestQuadRotationalExtrusionMultiBlock.cxx | 2 +- .../Testing/Cxx/TestRotationalExtrusion.cxx | 2 +- .../Testing/Cxx/TestRotationalExtrusion2.cxx | 119 + .../Cxx/TestVolumeOfRevolutionFilter.cxx | 2 +- ...nitTestHausdorffDistancePointSetFilter.cxx | 22 +- .../Baseline/TestImprintFilter.png.sha512 | 1 + .../Baseline/TestImprintFilter2.png.sha512 | 1 + .../Baseline/TestImprintFilter3.png.sha512 | 1 + .../Baseline/TestImprintFilter3_1.png.sha512 | 1 + .../Baseline/TestImprintFilter4.png.sha512 | 1 + .../Baseline/TestImprintFilter4_1.png.sha512 | 1 + .../Baseline/TestImprintFilter5.png.sha512 | 1 + .../Baseline/TestImprintFilter6.png.sha512 | 1 + .../Baseline/TestImprintFilter6_1.png.sha512 | 1 + .../Baseline/TestPointSampler2.png.sha512 | 1 + ...adRotationalExtrusionMultiBlock.png.sha512 | 2 +- .../TestRotationalExtrusion2.png.sha512 | 1 + .../Data/Baseline/smoothCyl2_1.png.sha512 | 1 + .../Modeling/Testing/Python/CMakeLists.txt | 7 + .../Testing/Python/TestImprintFilter.py | 88 + .../Testing/Python/TestImprintFilter2.py | 57 + .../Testing/Python/TestImprintFilter3.py | 147 + .../Testing/Python/TestImprintFilter4.py | 111 + .../Testing/Python/TestImprintFilter5.py | 75 + .../Testing/Python/TestImprintFilter6.py | 151 + .../Testing/Python/TestPointSampler2.py | 117 + Filters/Modeling/Testing/Python/smoothCyl2.py | 2 +- .../Modeling/vtkAdaptiveSubdivisionFilter.cxx | 12 +- .../Modeling/vtkAdaptiveSubdivisionFilter.h | 28 +- .../Modeling/vtkBandedPolyDataContourFilter.h | 24 +- .../vtkButterflySubdivisionFilter.cxx | 28 +- .../Modeling/vtkButterflySubdivisionFilter.h | 11 +- .../Modeling/vtkCollisionDetectionFilter.cxx | 43 +- .../Modeling/vtkCollisionDetectionFilter.h | 89 +- Filters/Modeling/vtkContourLoopExtraction.cxx | 14 +- Filters/Modeling/vtkContourLoopExtraction.h | 24 +- Filters/Modeling/vtkCookieCutter.cxx | 28 +- Filters/Modeling/vtkCookieCutter.h | 12 +- .../Modeling/vtkDijkstraGraphGeodesicPath.cxx | 24 +- .../Modeling/vtkDijkstraGraphGeodesicPath.h | 24 +- Filters/Modeling/vtkDijkstraGraphInternals.h | 4 +- .../Modeling/vtkDijkstraImageGeodesicPath.cxx | 26 +- .../Modeling/vtkDijkstraImageGeodesicPath.h | 20 +- Filters/Modeling/vtkFillHolesFilter.cxx | 8 +- Filters/Modeling/vtkFillHolesFilter.h | 8 +- Filters/Modeling/vtkFitToHeightMapFilter.cxx | 26 +- Filters/Modeling/vtkFitToHeightMapFilter.h | 20 +- Filters/Modeling/vtkGeodesicPath.cxx | 8 +- Filters/Modeling/vtkGeodesicPath.h | 4 +- Filters/Modeling/vtkGraphGeodesicPath.cxx | 6 +- Filters/Modeling/vtkGraphGeodesicPath.h | 12 +- .../vtkHausdorffDistancePointSetFilter.cxx | 9 +- .../vtkHausdorffDistancePointSetFilter.h | 16 +- .../vtkHyperTreeGridOutlineFilter.cxx | 14 +- .../Modeling/vtkHyperTreeGridOutlineFilter.h | 5 +- .../Modeling/vtkImageDataOutlineFilter.cxx | 220 + Filters/Modeling/vtkImageDataOutlineFilter.h | 81 + Filters/Modeling/vtkImprintFilter.cxx | 2740 ++ Filters/Modeling/vtkImprintFilter.h | 291 + .../Modeling/vtkLinearCellExtrusionFilter.cxx | 12 +- .../Modeling/vtkLinearCellExtrusionFilter.h | 20 +- Filters/Modeling/vtkLinearExtrusionFilter.cxx | 12 +- Filters/Modeling/vtkLinearExtrusionFilter.h | 22 +- .../Modeling/vtkLinearSubdivisionFilter.cxx | 5 + Filters/Modeling/vtkLinearSubdivisionFilter.h | 11 +- Filters/Modeling/vtkLoopSubdivisionFilter.cxx | 20 +- Filters/Modeling/vtkLoopSubdivisionFilter.h | 10 +- Filters/Modeling/vtkOutlineFilter.cxx | 18 +- Filters/Modeling/vtkOutlineFilter.h | 26 +- Filters/Modeling/vtkPolyDataPointSampler.cxx | 782 +- Filters/Modeling/vtkPolyDataPointSampler.h | 110 +- Filters/Modeling/vtkProjectedTexture.h | 38 +- .../vtkQuadRotationalExtrusionFilter.cxx | 14 +- .../vtkQuadRotationalExtrusionFilter.h | 30 +- Filters/Modeling/vtkRibbonFilter.cxx | 2 +- Filters/Modeling/vtkRibbonFilter.h | 32 +- .../Modeling/vtkRotationalExtrusionFilter.cxx | 89 +- .../Modeling/vtkRotationalExtrusionFilter.h | 38 +- Filters/Modeling/vtkRuledSurfaceFilter.h | 32 +- Filters/Modeling/vtkSectorSource.h | 30 +- Filters/Modeling/vtkSelectEnclosedPoints.cxx | 49 +- Filters/Modeling/vtkSelectEnclosedPoints.h | 28 +- Filters/Modeling/vtkSelectPolyData.cxx | 14 +- Filters/Modeling/vtkSelectPolyData.h | 28 +- Filters/Modeling/vtkSpherePuzzle.cxx | 22 +- Filters/Modeling/vtkSpherePuzzleArrows.cxx | 14 +- Filters/Modeling/vtkSpherePuzzleArrows.h | 4 +- Filters/Modeling/vtkSubdivideTetra.cxx | 6 +- Filters/Modeling/vtkSubdivideTetra.h | 2 +- .../Modeling/vtkTrimmedExtrusionFilter.cxx | 26 +- Filters/Modeling/vtkTrimmedExtrusionFilter.h | 28 +- .../Modeling/vtkVolumeOfRevolutionFilter.cxx | 10 +- .../Modeling/vtkVolumeOfRevolutionFilter.h | 20 +- .../Testing/Cxx/TestOTDensityMap.cxx | 2 +- .../Testing/Cxx/TestOTKernelSmoothing.cxx | 2 +- .../TestScatterPlotMatrixVehiclesDensity.cxx | 2 +- Filters/OpenTURNS/vtkOTDensityMap.cxx | 48 +- Filters/OpenTURNS/vtkOTDensityMap.h | 16 +- Filters/OpenTURNS/vtkOTFilter.cxx | 14 +- Filters/OpenTURNS/vtkOTFilter.h | 4 +- Filters/OpenTURNS/vtkOTKernelSmoothing.cxx | 12 +- Filters/OpenTURNS/vtkOTKernelSmoothing.h | 22 +- Filters/OpenTURNS/vtkOTScatterPlotMatrix.cxx | 16 +- Filters/OpenTURNS/vtkOTScatterPlotMatrix.h | 6 +- Filters/OpenTURNS/vtkOTUtilities.cxx | 6 +- Filters/Parallel/CMakeLists.txt | 34 +- Filters/Parallel/Testing/Cxx/CMakeLists.txt | 3 + .../Parallel/Testing/Cxx/DistributedData.cxx | 4 +- .../Testing/Cxx/DistributedDataRenderPass.cxx | 2 +- .../Testing/Cxx/PTextureMapToSphere.cxx | 2 +- .../Testing/Cxx/ParallelResampling.cxx | 2 +- .../Testing/Cxx/TestAngularPeriodicFilter.cxx | 2 +- .../Testing/Cxx/TestPOutlineFilter.cxx | 78 + .../Testing/Cxx/TestPartitionBalancer.cxx | 428 + .../Testing/Cxx/TransmitImageData.cxx | 2 +- .../Cxx/TransmitImageDataRenderPass.cxx | 2 +- .../Testing/Cxx/TransmitRectilinearGrid.cxx | 2 +- .../Testing/Cxx/TransmitStructuredGrid.cxx | 2 +- Filters/Parallel/vtk.module | 3 + .../vtkAdaptiveTemporalInterpolator.cxx | 44 +- .../Parallel/vtkAggregateDataSetFilter.cxx | 38 +- Filters/Parallel/vtkAggregateDataSetFilter.h | 18 +- Filters/Parallel/vtkAngularPeriodicFilter.cxx | 30 +- Filters/Parallel/vtkAngularPeriodicFilter.h | 24 +- Filters/Parallel/vtkCollectGraph.cxx | 12 +- Filters/Parallel/vtkCollectGraph.h | 16 +- Filters/Parallel/vtkCollectPolyData.cxx | 10 +- Filters/Parallel/vtkCollectPolyData.h | 12 +- Filters/Parallel/vtkCollectTable.cxx | 10 +- Filters/Parallel/vtkCollectTable.h | 12 +- Filters/Parallel/vtkCutMaterial.cxx | 4 +- Filters/Parallel/vtkCutMaterial.h | 20 +- Filters/Parallel/vtkDistributedDataFilter.cxx | 28 +- Filters/Parallel/vtkDistributedDataFilter.h | 18 +- Filters/Parallel/vtkDuplicatePolyData.cxx | 14 +- Filters/Parallel/vtkDuplicatePolyData.h | 16 +- Filters/Parallel/vtkExtractCTHPart.cxx | 49 +- Filters/Parallel/vtkExtractCTHPart.h | 32 +- Filters/Parallel/vtkExtractPolyDataPiece.h | 6 +- .../vtkExtractUnstructuredGridPiece.cxx | 2 +- .../vtkExtractUnstructuredGridPiece.h | 6 +- .../vtkHyperTreeGridGhostCellsGenerator.cxx | 39 +- .../vtkHyperTreeGridGhostCellsGenerator.h | 8 +- Filters/Parallel/vtkIntegrateAttributes.cxx | 54 +- Filters/Parallel/vtkIntegrateAttributes.h | 8 +- Filters/Parallel/vtkPCellDataToPointData.cxx | 8 +- Filters/Parallel/vtkPCellDataToPointData.h | 6 +- .../vtkPConvertToMultiBlockDataSet.cxx | 99 + .../Parallel/vtkPConvertToMultiBlockDataSet.h | 67 + .../vtkPExtractDataArraysOverTime.cxx | 16 +- .../Parallel/vtkPExtractDataArraysOverTime.h | 8 +- ...kPExtractExodusGlobalTemporalVariables.cxx | 8 +- ...vtkPExtractExodusGlobalTemporalVariables.h | 4 +- .../vtkPExtractSelectedArraysOverTime.cxx | 10 +- .../vtkPExtractSelectedArraysOverTime.h | 4 +- Filters/Parallel/vtkPKdTree.cxx | 38 +- Filters/Parallel/vtkPKdTree.h | 36 +- .../Parallel/vtkPLinearExtrusionFilter.cxx | 8 +- Filters/Parallel/vtkPLinearExtrusionFilter.h | 2 +- Filters/Parallel/vtkPMaskPoints.cxx | 38 +- Filters/Parallel/vtkPMaskPoints.h | 6 +- Filters/Parallel/vtkPMergeArrays.cxx | 8 +- Filters/Parallel/vtkPMergeArrays.h | 2 +- Filters/Parallel/vtkPOutlineCornerFilter.cxx | 4 +- Filters/Parallel/vtkPOutlineCornerFilter.h | 4 +- Filters/Parallel/vtkPOutlineFilter.h | 4 +- .../Parallel/vtkPOutlineFilterInternals.cxx | 165 +- Filters/Parallel/vtkPOutlineFilterInternals.h | 40 +- Filters/Parallel/vtkPPolyDataNormals.cxx | 8 +- Filters/Parallel/vtkPPolyDataNormals.h | 6 +- Filters/Parallel/vtkPProbeFilter.cxx | 12 +- Filters/Parallel/vtkPProbeFilter.h | 4 +- Filters/Parallel/vtkPProjectSphereFilter.cxx | 10 +- Filters/Parallel/vtkPReflectionFilter.cxx | 8 +- Filters/Parallel/vtkPReflectionFilter.h | 4 +- Filters/Parallel/vtkPResampleFilter.cxx | 16 +- Filters/Parallel/vtkPResampleFilter.h | 16 +- Filters/Parallel/vtkPSphereSource.cxx | 4 +- Filters/Parallel/vtkPSphereSource.h | 8 +- Filters/Parallel/vtkPTextureMapToSphere.h | 2 +- .../Parallel/vtkPYoungsMaterialInterface.cxx | 8 +- .../Parallel/vtkPYoungsMaterialInterface.h | 4 +- Filters/Parallel/vtkPartitionBalancer.cxx | 140 + Filters/Parallel/vtkPartitionBalancer.h | 151 + Filters/Parallel/vtkPassThroughFilter.cxx | 8 + Filters/Parallel/vtkPassThroughFilter.h | 6 +- Filters/Parallel/vtkPeriodicFilter.cxx | 18 +- Filters/Parallel/vtkPeriodicFilter.h | 8 +- Filters/Parallel/vtkPieceRequestFilter.cxx | 24 +- Filters/Parallel/vtkPieceRequestFilter.h | 18 +- Filters/Parallel/vtkPieceScalars.cxx | 12 +- Filters/Parallel/vtkPipelineSize.h | 2 +- Filters/Parallel/vtkProcessIdScalars.cxx | 12 +- Filters/Parallel/vtkProcessIdScalars.h | 21 +- .../vtkRectilinearGridOutlineFilter.h | 4 +- Filters/Parallel/vtkRemoveGhosts.cxx | 12 +- Filters/Parallel/vtkTransmitPolyDataPiece.cxx | 12 +- Filters/Parallel/vtkTransmitPolyDataPiece.h | 8 +- .../vtkTransmitRectilinearGridPiece.cxx | 6 +- .../vtkTransmitStructuredDataPiece.cxx | 16 +- .../Parallel/vtkTransmitStructuredDataPiece.h | 8 +- .../vtkTransmitStructuredGridPiece.cxx | 6 +- .../vtkTransmitUnstructuredGridPiece.cxx | 12 +- .../vtkTransmitUnstructuredGridPiece.h | 8 +- ...vtkUnstructuredGridGhostCellsGenerator.cxx | 15 +- .../vtkUnstructuredGridGhostCellsGenerator.h | 30 +- Filters/ParallelDIY2/CMakeLists.txt | 3 + Filters/ParallelDIY2/Testing/CMakeLists.txt | 8 +- .../ParallelDIY2/Testing/Cxx/CMakeLists.txt | 18 +- .../Testing/Cxx/TestGenerateGlobalIds.cxx | 2 +- .../Cxx/TestGenerateGlobalIdsSphere.cxx | 72 + .../Testing/Cxx/TestGhostCellsGenerator.cxx | 2835 ++ .../Cxx/TestOverlappingCellsDetector.cxx | 295 + .../Testing/Cxx/TestPResampleWithDataSet2.cxx | 3 +- .../TestPStructuredGridGhostDataGenerator.cxx | 557 + .../TestPUniformGridGhostDataGenerator.cxx | 535 + ...stPUnstructuredGridGhostCellsGenerator.cxx | 298 + .../Testing/Cxx/TestProbeLineFilter.cxx | 214 + .../TestRedistributeDataSetFilterOnIOSS.cxx | 111 + ...tRedistributeDataSetFilterWithPolyData.cxx | 123 + .../TestStructuredGridGhostDataGenerator.cxx | 531 + .../Cxx/TestUniformGridGhostDataGenerator.cxx | 382 + ...structuredGridGeometryFilterGhostCells.cxx | 0 .../TestPResampleWithDataSet2.png.sha512 | 2 +- ...ributeDataSetFilterWithPolyData.png.sha512 | 1 + Filters/ParallelDIY2/vtk.module | 3 + .../vtkAdaptiveResampleToImage.cxx | 26 +- .../ParallelDIY2/vtkAdaptiveResampleToImage.h | 12 +- .../vtkDIYAggregateDataSetFilter.cxx | 40 +- .../ParallelDIY2/vtkDIYKdTreeUtilities.cxx | 120 +- Filters/ParallelDIY2/vtkDIYKdTreeUtilities.h | 40 +- .../ParallelDIY2/vtkExtractSubsetWithSeed.cxx | 225 +- .../ParallelDIY2/vtkExtractSubsetWithSeed.h | 12 +- Filters/ParallelDIY2/vtkGenerateGlobalIds.cxx | 51 +- Filters/ParallelDIY2/vtkGenerateGlobalIds.h | 16 +- .../ParallelDIY2/vtkGhostCellsGenerator.cxx | 236 + Filters/ParallelDIY2/vtkGhostCellsGenerator.h | 128 + .../vtkOverlappingCellsDetector.cxx | 840 + .../vtkOverlappingCellsDetector.h | 164 + Filters/ParallelDIY2/vtkPResampleToImage.cxx | 67 +- Filters/ParallelDIY2/vtkPResampleToImage.h | 6 +- .../ParallelDIY2/vtkPResampleWithDataSet.cxx | 40 +- .../ParallelDIY2/vtkPResampleWithDataSet.h | 8 +- Filters/ParallelDIY2/vtkProbeLineFilter.cxx | 820 + Filters/ParallelDIY2/vtkProbeLineFilter.h | 241 + .../vtkRedistributeDataSetFilter.cxx | 702 +- .../vtkRedistributeDataSetFilter.h | 103 +- Filters/ParallelFlowPaths/CMakeLists.txt | 11 +- .../Testing/Cxx/TestPParticleTracers.cxx | 7 +- .../Testing/Cxx/TestPStream.cxx | 24 +- .../Testing/Cxx/TestPStreamAMR.cxx | 9 +- .../Testing/Cxx/TestPStreamGeometry.cxx | 6 +- .../Testing/Cxx/TestVectorFieldSource.cxx | 2 +- .../Testing/Cxx/TestVectorFieldSource.h | 4 +- .../vtkPLagrangianParticleTracker.cxx | 569 +- .../vtkPLagrangianParticleTracker.h | 41 +- .../vtkPParticlePathFilter.cxx | 2 +- .../vtkPParticlePathFilter.h | 9 +- .../ParallelFlowPaths/vtkPParticleTracer.h | 2 +- .../vtkPParticleTracerBase.cxx | 24 +- .../vtkPParticleTracerBase.h | 21 +- .../vtkPStreaklineFilter.cxx | 2 - .../ParallelFlowPaths/vtkPStreaklineFilter.h | 4 +- .../ParallelFlowPaths/vtkPStreamTracer.cxx | 104 +- Filters/ParallelFlowPaths/vtkPStreamTracer.h | 15 +- .../vtkPTemporalStreamTracer.cxx | 29 +- .../vtkPTemporalStreamTracer.h | 20 +- .../Testing/Cxx/CMakeLists.txt | 5 +- .../Testing/Cxx/ParallelConnectivity.cxx | 3 + .../TestPStructuredGridGhostDataGenerator.cxx | 557 - .../TestPUniformGridGhostDataGenerator.cxx | 534 - ...stPUnstructuredGridGhostCellsGenerator.cxx | 300 - .../vtkPConnectivityFilter.cxx | 50 +- .../vtkPDataSetGhostGenerator.cxx | 6 +- .../vtkPDataSetGhostGenerator.h | 11 +- .../vtkPDistributedDataFilter.cxx | 161 +- .../vtkPDistributedDataFilter.h | 54 +- .../vtkPStructuredGridConnectivity.h | 22 +- .../vtkPStructuredGridGhostDataGenerator.cxx | 4 + .../vtkPStructuredGridGhostDataGenerator.h | 6 +- .../vtkPUniformGridGhostDataGenerator.cxx | 4 + .../vtkPUniformGridGhostDataGenerator.h | 8 +- ...tkPUnstructuredGridGhostCellsGenerator.cxx | 65 +- .../vtkPUnstructuredGridGhostCellsGenerator.h | 10 +- Filters/ParallelImaging/CMakeLists.txt | 4 +- Filters/ParallelImaging/vtkExtractPiece.h | 4 +- .../vtkMemoryLimitImageDataStreamer.cxx | 6 +- .../vtkMemoryLimitImageDataStreamer.h | 6 +- .../vtkTransmitImageDataPiece.cxx | 6 +- .../vtkDistributedPointCloudFilter.cxx | 24 +- .../vtkDistributedPointCloudFilter.h | 4 +- Filters/ParallelMPI/vtkPExtractGrid.cxx | 2 +- Filters/ParallelMPI/vtkPExtractGrid.h | 10 +- .../vtkPExtractRectilinearGrid.cxx | 2 +- .../ParallelMPI/vtkPExtractRectilinearGrid.h | 10 +- Filters/ParallelMPI/vtkPExtractVOI.cxx | 2 +- Filters/ParallelMPI/vtkPExtractVOI.h | 10 +- .../vtkStructuredImplicitConnectivity.cxx | 22 +- Filters/ParallelStatistics/CMakeLists.txt | 4 +- .../TestRandomPContingencyStatisticsMPI.cxx | 2 +- .../Cxx/TestRandomPKMeansStatisticsMPI.cxx | 4 +- .../Cxx/TestRandomPMomentStatisticsMPI.cxx | 2 +- .../Cxx/TestRandomPOrderStatisticsMPI.cxx | 2 +- .../TestRealDataPDescriptiveStatisticsMPI.cxx | 2 +- .../vtkPAutoCorrelativeStatistics.cxx | 16 +- .../vtkPAutoCorrelativeStatistics.h | 4 +- .../vtkPBivariateLinearTableThreshold.cxx | 4 +- .../vtkPBivariateLinearTableThreshold.h | 4 +- .../vtkPContingencyStatistics.cxx | 30 +- .../vtkPContingencyStatistics.h | 4 +- .../vtkPCorrelativeStatistics.cxx | 15 +- .../vtkPCorrelativeStatistics.h | 4 +- .../vtkPDescriptiveStatistics.cxx | 13 +- .../vtkPDescriptiveStatistics.h | 4 +- .../vtkPKMeansStatistics.cxx | 19 +- .../ParallelStatistics/vtkPKMeansStatistics.h | 4 +- .../vtkPMultiCorrelativeStatistics.cxx | 23 +- .../vtkPMultiCorrelativeStatistics.h | 4 +- .../vtkPOrderStatistics.cxx | 31 +- .../ParallelStatistics/vtkPOrderStatistics.h | 4 +- .../ParallelStatistics/vtkPPCAStatistics.cxx | 17 +- .../ParallelStatistics/vtkPPCAStatistics.h | 4 +- .../Testing/Cxx/PCellSizeFilter.cxx | 2 +- .../ParallelVerdict/vtkPCellSizeFilter.cxx | 16 +- Filters/ParallelVerdict/vtkPCellSizeFilter.h | 7 +- Filters/Points/CMakeLists.txt | 3 + Filters/Points/Testing/Cxx/CMakeLists.txt | 2 + Filters/Points/Testing/Cxx/PlotSPHKernels.cxx | 4 +- .../Testing/Cxx/TestConvertToPointCloud.cxx | 94 + .../Testing/Cxx/TestPoissonDiskSampler.cxx | 58 + Filters/Points/Testing/Cxx/TestSPHKernels.cxx | 4 +- .../Points/Testing/Cxx/UnitTestKernels.cxx | 2 +- .../TestConvertToPointCloud.png.sha512 | 1 + .../TestPointSmoothingFilter.png.sha512 | 1 + .../TestPointSmoothingFilter2.png.sha512 | 1 + .../TestPointSmoothingFilter3.png.sha512 | 1 + Filters/Points/Testing/Python/CMakeLists.txt | 3 + .../Python/TestPointOccupancyFilter.py | 3 +- .../Python/TestPointSmoothingFilter.py | 352 + .../Python/TestPointSmoothingFilter2.py | 364 + .../Python/TestPointSmoothingFilter3.py | 314 + .../Python/TestSPHInterpolatorWithCutoff.py | 13 +- Filters/Points/vtkBoundedPointSource.cxx | 16 +- Filters/Points/vtkBoundedPointSource.h | 30 +- Filters/Points/vtkConnectedPointsFilter.cxx | 26 +- Filters/Points/vtkConnectedPointsFilter.h | 36 +- Filters/Points/vtkConvertToPointCloud.cxx | 103 + Filters/Points/vtkConvertToPointCloud.h | 74 + Filters/Points/vtkDensifyPointCloudFilter.cxx | 16 +- Filters/Points/vtkDensifyPointCloudFilter.h | 32 +- .../Points/vtkEllipsoidalGaussianKernel.cxx | 12 +- Filters/Points/vtkEllipsoidalGaussianKernel.h | 32 +- .../Points/vtkEuclideanClusterExtraction.cxx | 28 +- .../Points/vtkEuclideanClusterExtraction.h | 32 +- Filters/Points/vtkExtractEnclosedPoints.cxx | 24 +- Filters/Points/vtkExtractEnclosedPoints.h | 20 +- Filters/Points/vtkExtractHierarchicalBins.cxx | 14 +- Filters/Points/vtkExtractHierarchicalBins.h | 16 +- Filters/Points/vtkExtractPointCloudPiece.cxx | 8 +- Filters/Points/vtkExtractPointCloudPiece.h | 10 +- Filters/Points/vtkExtractPoints.cxx | 14 +- Filters/Points/vtkExtractPoints.h | 12 +- Filters/Points/vtkExtractSurface.cxx | 77 +- Filters/Points/vtkExtractSurface.h | 20 +- Filters/Points/vtkFitImplicitFunction.cxx | 14 +- Filters/Points/vtkFitImplicitFunction.h | 12 +- Filters/Points/vtkGaussianKernel.cxx | 10 +- Filters/Points/vtkGaussianKernel.h | 8 +- Filters/Points/vtkGeneralizedKernel.cxx | 8 +- Filters/Points/vtkGeneralizedKernel.h | 20 +- .../Points/vtkHierarchicalBinningFilter.cxx | 42 +- Filters/Points/vtkHierarchicalBinningFilter.h | 20 +- Filters/Points/vtkInterpolationKernel.cxx | 10 +- Filters/Points/vtkInterpolationKernel.h | 8 +- Filters/Points/vtkLinearKernel.cxx | 8 +- Filters/Points/vtkLinearKernel.h | 4 +- Filters/Points/vtkMaskPointsFilter.cxx | 26 +- Filters/Points/vtkMaskPointsFilter.h | 12 +- Filters/Points/vtkPCACurvatureEstimation.cxx | 12 +- Filters/Points/vtkPCACurvatureEstimation.h | 12 +- Filters/Points/vtkPCANormalEstimation.cxx | 14 +- Filters/Points/vtkPCANormalEstimation.h | 24 +- Filters/Points/vtkPointCloudFilter.cxx | 22 +- Filters/Points/vtkPointCloudFilter.h | 12 +- Filters/Points/vtkPointDensityFilter.cxx | 30 +- Filters/Points/vtkPointDensityFilter.h | 44 +- Filters/Points/vtkPointInterpolator.cxx | 36 +- Filters/Points/vtkPointInterpolator.h | 56 +- Filters/Points/vtkPointInterpolator2D.cxx | 10 +- Filters/Points/vtkPointInterpolator2D.h | 12 +- Filters/Points/vtkPointOccupancyFilter.cxx | 22 +- Filters/Points/vtkPointOccupancyFilter.h | 16 +- Filters/Points/vtkPointSmoothingFilter.cxx | 1401 + Filters/Points/vtkPointSmoothingFilter.h | 386 + Filters/Points/vtkPoissonDiskSampler.cxx | 254 + Filters/Points/vtkPoissonDiskSampler.h | 99 + .../Points/vtkProbabilisticVoronoiKernel.cxx | 8 +- .../Points/vtkProbabilisticVoronoiKernel.h | 4 +- Filters/Points/vtkRadiusOutlierRemoval.cxx | 12 +- Filters/Points/vtkRadiusOutlierRemoval.h | 16 +- Filters/Points/vtkSPHCubicKernel.cxx | 8 +- Filters/Points/vtkSPHCubicKernel.h | 12 +- Filters/Points/vtkSPHInterpolator.cxx | 58 +- Filters/Points/vtkSPHInterpolator.h | 103 +- Filters/Points/vtkSPHKernel.cxx | 14 +- Filters/Points/vtkSPHKernel.h | 32 +- Filters/Points/vtkSPHQuarticKernel.cxx | 8 +- Filters/Points/vtkSPHQuarticKernel.h | 12 +- Filters/Points/vtkSPHQuinticKernel.cxx | 8 +- Filters/Points/vtkSPHQuinticKernel.h | 12 +- Filters/Points/vtkShepardKernel.cxx | 8 +- Filters/Points/vtkShepardKernel.h | 8 +- Filters/Points/vtkSignedDistance.cxx | 28 +- Filters/Points/vtkSignedDistance.h | 20 +- .../Points/vtkStatisticalOutlierRemoval.cxx | 16 +- Filters/Points/vtkStatisticalOutlierRemoval.h | 24 +- Filters/Points/vtkUnsignedDistance.cxx | 28 +- Filters/Points/vtkUnsignedDistance.h | 40 +- Filters/Points/vtkVoronoiKernel.cxx | 10 +- Filters/Points/vtkVoronoiKernel.h | 4 +- Filters/Points/vtkVoxelGrid.cxx | 16 +- Filters/Points/vtkVoxelGrid.h | 24 +- Filters/Points/vtkWendlandQuinticKernel.cxx | 8 +- Filters/Points/vtkWendlandQuinticKernel.h | 12 +- .../vtkProgrammableAttributeDataFilter.cxx | 2 +- .../vtkProgrammableAttributeDataFilter.h | 2 +- Filters/Programmable/vtkProgrammableFilter.h | 10 +- .../Programmable/vtkProgrammableGlyphFilter.h | 20 +- Filters/Python/vtkPythonAlgorithm.cxx | 2 +- Filters/ReebGraph/CMakeLists.txt | 2 +- .../ReebGraph/Testing/Cxx/TestReebGraph.cxx | 6 +- .../vtkReebGraphSimplificationFilter.cxx | 18 +- .../vtkReebGraphSimplificationFilter.h | 4 +- .../vtkReebGraphSurfaceSkeletonFilter.cxx | 22 +- .../vtkReebGraphSurfaceSkeletonFilter.h | 12 +- .../vtkReebGraphToJoinSplitTreeFilter.cxx | 32 +- .../vtkReebGraphToJoinSplitTreeFilter.h | 8 +- .../vtkReebGraphVolumeSkeletonFilter.cxx | 22 +- .../vtkReebGraphVolumeSkeletonFilter.h | 12 +- .../vtkUnstructuredGridToReebGraphFilter.cxx | 16 +- .../vtkUnstructuredGridToReebGraphFilter.h | 4 +- Filters/SMP/CMakeLists.txt | 9 - Filters/SMP/Testing/Cxx/CMakeLists.txt | 9 - Filters/SMP/Testing/Cxx/TestSMPContour.cxx | 68 +- Filters/SMP/Testing/Cxx/TestSMPTransform.cxx | 136 - Filters/SMP/Testing/Cxx/TestSMPWarp.cxx | 268 - .../TestThreadedSynchronizedTemplates3D.cxx | 100 - ...tThreadedSynchronizedTemplatesCutter3D.cxx | 123 - Filters/SMP/vtkSMPContourGrid.cxx | 26 +- Filters/SMP/vtkSMPContourGrid.h | 4 +- Filters/SMP/vtkSMPContourGridManyPieces.cxx | 320 - Filters/SMP/vtkSMPContourGridManyPieces.h | 59 - Filters/SMP/vtkSMPMergePoints.h | 4 +- Filters/SMP/vtkSMPMergePolyDataHelper.cxx | 14 +- Filters/SMP/vtkSMPMergePolyDataHelper.h | 5 +- Filters/SMP/vtkSMPTransform.cxx | 285 - Filters/SMP/vtkSMPTransform.h | 77 - Filters/SMP/vtkSMPWarpVector.cxx | 160 - Filters/SMP/vtkSMPWarpVector.h | 54 - .../vtkThreadedSynchronizedTemplates3D.cxx | 1956 - .../SMP/vtkThreadedSynchronizedTemplates3D.h | 202 - ...kThreadedSynchronizedTemplatesCutter3D.cxx | 738 - ...vtkThreadedSynchronizedTemplatesCutter3D.h | 93 - Filters/Selection/CMakeLists.txt | 4 +- .../Cxx/TestCellDistanceSelector2D.cxx | 2 +- .../Cxx/TestCellDistanceSelector3D.cxx | 2 +- .../Testing/Cxx/TestLinearSelector2D.cxx | 2 +- .../Testing/Cxx/TestLinearSelector3D.cxx | 2 +- Filters/Selection/vtkCellDistanceSelector.cxx | 16 +- Filters/Selection/vtkCellDistanceSelector.h | 16 +- Filters/Selection/vtkKdTreeSelector.h | 24 +- Filters/Selection/vtkLinearSelector.cxx | 12 +- Filters/Selection/vtkLinearSelector.h | 32 +- Filters/Sources/CMakeLists.txt | 4 + Filters/Sources/Testing/CMakeLists.txt | 3 +- Filters/Sources/Testing/Cxx/CMakeLists.txt | 1 + .../Sources/Testing/Cxx/TestCapsuleSource.cxx | 109 +- .../Testing/Cxx/TestCellTypeSource.cxx | 14 +- .../Cxx/TestPartitionedDataSetSource.cxx | 204 + .../Baseline/TestQuadrangleCapsuleSource.vtp | 225 - .../Baseline/TestTriangularCapsuleSource.vtp | 337 - Filters/Sources/vtkArcSource.cxx | 8 +- Filters/Sources/vtkArcSource.h | 42 +- Filters/Sources/vtkArrowSource.h | 32 +- Filters/Sources/vtkButtonSource.h | 22 +- Filters/Sources/vtkCapsuleSource.cxx | 14 +- Filters/Sources/vtkCapsuleSource.h | 34 +- Filters/Sources/vtkCellTypeSource.cxx | 385 +- Filters/Sources/vtkCellTypeSource.h | 35 +- Filters/Sources/vtkConeSource.cxx | 12 +- Filters/Sources/vtkConeSource.h | 34 +- Filters/Sources/vtkCubeSource.cxx | 12 +- Filters/Sources/vtkCubeSource.h | 26 +- Filters/Sources/vtkCylinderSource.h | 28 +- Filters/Sources/vtkDiagonalMatrixSource.cxx | 11 +- Filters/Sources/vtkDiagonalMatrixSource.h | 26 +- Filters/Sources/vtkDiskSource.h | 22 +- Filters/Sources/vtkEllipseArcSource.cxx | 22 +- Filters/Sources/vtkEllipseArcSource.h | 38 +- Filters/Sources/vtkEllipticalButtonSource.cxx | 14 +- Filters/Sources/vtkEllipticalButtonSource.h | 34 +- Filters/Sources/vtkFrustumSource.cxx | 10 +- Filters/Sources/vtkFrustumSource.h | 16 +- Filters/Sources/vtkGlyphSource2D.cxx | 6 +- Filters/Sources/vtkGlyphSource2D.h | 46 +- Filters/Sources/vtkGraphToPolyData.h | 10 +- Filters/Sources/vtkHandleSource.cxx | 61 + Filters/Sources/vtkHandleSource.h | 108 + Filters/Sources/vtkHyperTreeGridSource.cxx | 81 +- Filters/Sources/vtkHyperTreeGridSource.h | 71 +- Filters/Sources/vtkLineSource.cxx | 22 +- Filters/Sources/vtkLineSource.h | 28 +- Filters/Sources/vtkOutlineCornerFilter.h | 4 +- Filters/Sources/vtkOutlineCornerSource.cxx | 7 +- Filters/Sources/vtkOutlineCornerSource.h | 6 +- Filters/Sources/vtkOutlineSource.cxx | 6 +- Filters/Sources/vtkOutlineSource.h | 26 +- .../Sources/vtkParametricFunctionSource.cxx | 16 +- Filters/Sources/vtkParametricFunctionSource.h | 32 +- .../vtkPartitionedDataSetCollectionSource.cxx | 223 + .../vtkPartitionedDataSetCollectionSource.h | 64 + .../Sources/vtkPartitionedDataSetSource.cxx | 289 + Filters/Sources/vtkPartitionedDataSetSource.h | 110 + Filters/Sources/vtkPlaneSource.cxx | 76 +- Filters/Sources/vtkPlaneSource.h | 55 +- Filters/Sources/vtkPlatonicSolidSource.h | 10 +- Filters/Sources/vtkPointHandleSource.cxx | 129 + Filters/Sources/vtkPointHandleSource.h | 84 + Filters/Sources/vtkPointSource.cxx | 12 +- Filters/Sources/vtkPointSource.h | 24 +- Filters/Sources/vtkPolyLineSource.cxx | 12 +- Filters/Sources/vtkPolyLineSource.h | 4 +- Filters/Sources/vtkPolyPointSource.cxx | 20 +- Filters/Sources/vtkPolyPointSource.h | 8 +- Filters/Sources/vtkProgrammableSource.cxx | 5 + Filters/Sources/vtkProgrammableSource.h | 7 +- .../Sources/vtkRandomHyperTreeGridSource.cxx | 6 +- .../Sources/vtkRectangularButtonSource.cxx | 8 +- Filters/Sources/vtkRectangularButtonSource.h | 30 +- Filters/Sources/vtkRegularPolygonSource.h | 34 +- Filters/Sources/vtkSelectionSource.cxx | 215 +- Filters/Sources/vtkSelectionSource.h | 80 +- Filters/Sources/vtkSphereSource.cxx | 69 +- Filters/Sources/vtkSphereSource.h | 69 +- Filters/Sources/vtkSuperquadricSource.cxx | 4 +- Filters/Sources/vtkSuperquadricSource.h | 46 +- Filters/Sources/vtkTessellatedBoxSource.cxx | 14 +- Filters/Sources/vtkTessellatedBoxSource.h | 30 +- Filters/Sources/vtkTextSource.h | 20 +- Filters/Sources/vtkTexturedSphereSource.h | 32 +- .../Sources/vtkUniformHyperTreeGridSource.cxx | 18 +- Filters/Statistics/CMakeLists.txt | 4 +- .../Testing/Cxx/TestComputeQuartiles.cxx | 2 +- .../Testing/Cxx/TestContingencyStatistics.cxx | 2 + .../Cxx/TestExtractFunctionalBagPlot.cxx | 4 +- .../TestHighestDensityRegionsStatistics.cxx | 2 +- .../Testing/Cxx/TestPCAStatistics.cxx | 2 +- Filters/Statistics/vtk.module | 2 +- .../vtkAutoCorrelativeStatistics.cxx | 19 +- .../Statistics/vtkAutoCorrelativeStatistics.h | 4 +- .../vtkBivariateLinearTableThreshold.h | 24 +- Filters/Statistics/vtkComputeQuartiles.cxx | 16 +- .../Statistics/vtkContingencyStatistics.cxx | 42 +- .../Statistics/vtkCorrelativeStatistics.cxx | 26 +- .../Statistics/vtkDescriptiveStatistics.cxx | 26 +- Filters/Statistics/vtkDescriptiveStatistics.h | 16 +- .../vtkExtractFunctionalBagPlot.cxx | 10 +- .../Statistics/vtkExtractFunctionalBagPlot.h | 4 +- .../vtkHighestDensityRegionsStatistics.cxx | 22 +- .../vtkHighestDensityRegionsStatistics.h | 4 +- Filters/Statistics/vtkKMeansAssessFunctor.h | 2 +- .../Statistics/vtkKMeansDistanceFunctor.cxx | 28 +- Filters/Statistics/vtkKMeansDistanceFunctor.h | 4 +- .../vtkKMeansDistanceFunctorCalculator.cxx | 8 +- .../vtkKMeansDistanceFunctorCalculator.h | 8 +- Filters/Statistics/vtkKMeansStatistics.cxx | 40 +- Filters/Statistics/vtkKMeansStatistics.h | 22 +- .../vtkMultiCorrelativeStatistics.cxx | 40 +- .../vtkMultiCorrelativeStatistics.h | 4 +- ...kMultiCorrelativeStatisticsAssessFunctor.h | 4 +- Filters/Statistics/vtkOrderStatistics.cxx | 39 +- Filters/Statistics/vtkOrderStatistics.h | 16 +- Filters/Statistics/vtkPCAStatistics.cxx | 60 +- Filters/Statistics/vtkPCAStatistics.h | 30 +- Filters/Statistics/vtkStatisticsAlgorithm.cxx | 40 +- Filters/Statistics/vtkStatisticsAlgorithm.h | 30 +- .../vtkStatisticsAlgorithmPrivate.h | 32 +- Filters/Statistics/vtkStrahlerMetric.cxx | 4 +- Filters/Statistics/vtkStrahlerMetric.h | 14 +- Filters/Statistics/vtkStreamingStatistics.cxx | 12 +- .../Testing/Cxx/TestScalarsToTexture.cxx | 2 +- Filters/Texture/vtkImplicitTextureCoords.h | 16 +- Filters/Texture/vtkScalarsToTextureFilter.cxx | 16 +- Filters/Texture/vtkScalarsToTextureFilter.h | 12 +- Filters/Texture/vtkTextureMapToCylinder.cxx | 2 +- Filters/Texture/vtkTextureMapToCylinder.h | 18 +- Filters/Texture/vtkTextureMapToPlane.h | 30 +- Filters/Texture/vtkTextureMapToSphere.h | 14 +- Filters/Texture/vtkThresholdTextureCoords.h | 18 +- Filters/Texture/vtkTransformTextureCoords.h | 30 +- Filters/Texture/vtkTriangularTCoords.h | 4 +- .../Topology/Testing/Cxx/TestFiberSurface.cxx | 3 +- Filters/Topology/vtkFiberSurface.cxx | 28 +- Filters/Topology/vtkFiberSurface.h | 4 +- .../Verdict/Testing/Cxx/CellSizeFilter2.cxx | 106 +- Filters/Verdict/vtkCellQuality.cxx | 4 + Filters/Verdict/vtkCellQuality.h | 20 +- Filters/Verdict/vtkCellSizeFilter.cxx | 38 +- Filters/Verdict/vtkCellSizeFilter.h | 36 +- Filters/Verdict/vtkMatrixMathFilter.cxx | 2 +- Filters/Verdict/vtkMatrixMathFilter.h | 6 +- Filters/Verdict/vtkMeshQuality.cxx | 9 +- Filters/Verdict/vtkMeshQuality.h | 36 +- GUISupport/MFC/VTKMFCSettings.cmake | 2 +- GUISupport/MFC/vtkMFCConfigure.h.in | 2 - GUISupport/Qt/CMakeLists.txt | 21 +- GUISupport/Qt/QFilterTreeProxyModel.cxx | 6 +- GUISupport/Qt/QVTKApplication.cxx | 18 +- GUISupport/Qt/QVTKInteractor.cxx | 15 +- GUISupport/Qt/QVTKInteractorAdapter.cxx | 86 +- GUISupport/Qt/QVTKOpenGLNativeWidget.cxx | 101 +- GUISupport/Qt/QVTKOpenGLNativeWidget.h | 68 +- GUISupport/Qt/QVTKOpenGLStereoWidget.cxx | 64 +- GUISupport/Qt/QVTKOpenGLStereoWidget.h | 76 +- GUISupport/Qt/QVTKOpenGLWidget.h | 6 +- GUISupport/Qt/QVTKOpenGLWindow.cxx | 121 +- GUISupport/Qt/QVTKOpenGLWindow.h | 70 +- GUISupport/Qt/QVTKRenderWindowAdapter.cxx | 277 +- GUISupport/Qt/QVTKRenderWindowAdapter.h | 30 +- GUISupport/Qt/QVTKWin32Header.h | 1 + GUISupport/Qt/Testing/Cxx/CMakeLists.txt | 26 +- .../Qt/Testing/Cxx/TestQWidgetWidget.cxx | 2 +- GUISupport/Qt/Testing/Cxx/TestQtCommon.cxx | 11 +- GUISupport/Qt/Testing/Cxx/TestQtCommon.h | 5 +- .../Qt/Testing/Cxx/TestQtDebugLeaksView.cxx | 9 +- GUISupport/Qt/Testing/Cxx/TestQtPicking.cxx | 18 +- .../Qt/Testing/Cxx/TestQtSwapWindows.cxx | 4 +- GUISupport/Qt/Testing/Cxx/TestQtWidget.cxx | 4 +- .../Cxx/TestQtWithChartHistogram2D.cxx | 110 + .../Cxx/TestQtWithDisabledInteractor.cxx | 2 +- GUISupport/Qt/Testing/Cxx/TestQtWithMSAA.cxx | 4 +- ...ativeWidgetWithChartHistogram2D.png.sha512 | 1 + ...tereoWidgetWithChartHistogram2D.png.sha512 | 1 + ...penGLWidgetWithChartHistogram2D.png.sha512 | 1 + ...penGLWindowWithChartHistogram2D.png.sha512 | 1 + ...enderWidgetWithChartHistogram2D.png.sha512 | 1 + GUISupport/Qt/vtk.module | 4 + GUISupport/Qt/vtkQWidgetRepresentation.cxx | 32 +- GUISupport/Qt/vtkQWidgetRepresentation.h | 20 +- GUISupport/Qt/vtkQWidgetTexture.cxx | 153 +- GUISupport/Qt/vtkQWidgetTexture.h | 15 +- GUISupport/Qt/vtkQWidgetWidget.cxx | 106 +- GUISupport/Qt/vtkQWidgetWidget.h | 7 +- GUISupport/Qt/vtkQtAbstractModelAdapter.h | 10 +- .../Qt/vtkQtAnnotationLayersModelAdapter.cxx | 56 +- .../Qt/vtkQtAnnotationLayersModelAdapter.h | 13 +- GUISupport/Qt/vtkQtConnection.cxx | 7 +- GUISupport/Qt/vtkQtConnection.h | 4 +- GUISupport/Qt/vtkQtDebugLeaksModel.cxx | 50 +- GUISupport/Qt/vtkQtDebugLeaksModel.h | 4 +- GUISupport/Qt/vtkQtDebugLeaksView.cxx | 50 +- GUISupport/Qt/vtkQtDebugLeaksView.h | 2 +- GUISupport/Qt/vtkQtTableModelAdapter.cxx | 86 +- GUISupport/Qt/vtkQtTableModelAdapter.h | 15 +- GUISupport/Qt/vtkQtTreeModelAdapter.cxx | 16 +- GUISupport/Qt/vtkQtTreeModelAdapter.h | 12 +- GUISupport/Qt/vtkTDxQtUnixDevices.cxx | 12 +- GUISupport/Qt/vtkTDxQtUnixDevices.h | 2 +- GUISupport/QtQuick/CMakeLists.txt | 37 + .../QtQuick/QQuickVTKInteractiveWidget.cxx | 73 + .../QtQuick/QQuickVTKInteractiveWidget.h | 83 + .../QtQuick/QQuickVTKInteractorAdapter.cxx | 136 + .../QtQuick/QQuickVTKInteractorAdapter.h | 92 + GUISupport/QtQuick/QQuickVTKRenderItem.cxx | 326 + GUISupport/QtQuick/QQuickVTKRenderItem.h | 263 + GUISupport/QtQuick/QQuickVTKRenderWindow.cxx | 396 + GUISupport/QtQuick/QQuickVTKRenderWindow.h | 295 + GUISupport/QtQuick/Testing/CMakeLists.txt | 1 + GUISupport/QtQuick/Testing/Cxx/CMakeLists.txt | 48 + .../QtQuick/Testing/Cxx/TestQQuickVTK.qrc | 7 + .../Testing/Cxx/TestQQuickVTKRenderItem.cxx | 108 + .../Cxx/TestQQuickVTKRenderItem.qml.in | 74 + .../Cxx/TestQQuickVTKRenderItemWidget.cxx | 217 + .../Cxx/TestQQuickVTKRenderItemWidget.qml.in | 89 + .../Testing/Cxx/TestQQuickVTKRenderWindow.cxx | 175 + .../Testing/Cxx/TestQQuickVTKRenderWindow.qml | 79 + .../Cxx/TestQQuickVTKRenderWindow.qml.in | 79 + .../TestQQuickVTKRenderItem.png.sha512 | 1 + .../TestQQuickVTKRenderItemWidget.png.sha512 | 1 + .../TestQQuickVTKRenderWindow.png.sha512 | 1 + GUISupport/QtQuick/qml/CMakeLists.txt | 133 + GUISupport/QtQuick/qml/QQmlVTKPlugin.cxx | 50 + GUISupport/QtQuick/qml/QQmlVTKPlugin.h | 102 + GUISupport/QtQuick/qml/plugins.qmltypes | 49 + GUISupport/QtQuick/qml/qmldir.in | 4 + GUISupport/QtQuick/vtk.module | 23 + GUISupport/QtSQL/CMakeLists.txt | 8 +- GUISupport/QtSQL/Testing/Cxx/CMakeLists.txt | 4 +- .../QtSQL/Testing/Cxx/TestQtSQLDatabase.cxx | 35 +- GUISupport/QtSQL/vtkQtSQLDatabase.cxx | 40 +- GUISupport/QtSQL/vtkQtSQLDatabase.h | 44 +- GUISupport/QtSQL/vtkQtSQLQuery.cxx | 24 +- GUISupport/QtSQL/vtkQtSQLQuery.h | 5 - GUISupport/QtSQL/vtkQtTimePointUtility.cxx | 5 + GUISupport/QtSQL/vtkQtTimePointUtility.h | 6 +- .../Testing/Cxx/TestGeoAssignCoordinates.cxx | 83 - Geovis/Core/Testing/Cxx/TestGeoGraticule.cxx | 81 - Geovis/Core/Testing/Cxx/TestGlobeSource.cxx | 126 - .../TestGeoAssignCoordinates.png.sha512 | 1 - .../Data/Baseline/TestGeoGraticule.png.sha512 | 1 - .../Data/Baseline/TestGlobeSource.png.sha512 | 1 - Geovis/Core/vtk.module | 3 - Geovis/Core/vtkCompassRepresentation.cxx | 36 +- Geovis/Core/vtkCompassRepresentation.h | 24 +- Geovis/Core/vtkCompassWidget.cxx | 2 +- Geovis/Core/vtkCompassWidget.h | 14 +- Geovis/Core/vtkGeoProjection.cxx | 55 +- Geovis/Core/vtkGeoProjection.h | 12 +- Geovis/Core/vtkGeoTransform.cxx | 28 +- Geovis/Core/vtkGeoTransform.h | 20 +- Geovis/GDAL/vtkGDALRasterConverter.cxx | 38 +- Geovis/GDAL/vtkGDALRasterConverter.h | 6 +- Geovis/GDAL/vtkGDALRasterReprojection.cxx | 12 +- Geovis/GDAL/vtkGDALRasterReprojection.h | 8 +- Geovis/GDAL/vtkRasterReprojectionFilter.cxx | 32 +- Geovis/GDAL/vtkRasterReprojectionFilter.h | 24 +- .../Core/vtkADIOS2CoreArraySelection.cxx | 14 +- IO/ADIOS2/Core/vtkADIOS2CoreArraySelection.h | 4 +- IO/ADIOS2/Testing/Cxx/CMakeLists.txt | 4 +- .../Testing/Cxx/TestIOADIOS2VTX_VTI3D.cxx | 10 +- .../Cxx/TestIOADIOS2VTX_VTI3DRendering.cxx | 28 +- .../Cxx/TestIOADIOS2VTX_VTU1DRendering.cxx | 6 +- .../Cxx/TestIOADIOS2VTX_VTU2DRendering.cxx | 6 +- .../Testing/Cxx/TestIOADIOS2VTX_VTU3D.cxx | 77 +- .../Cxx/TestIOADIOS2VTX_VTU3DRendering.cxx | 6 +- IO/ADIOS2/Testing/Cxx/UnitTestIOADIOS2VTX.cxx | 316 +- IO/ADIOS2/VTX/VTXSchemaManager.cxx | 4 +- IO/ADIOS2/VTX/common/VTXHelper.cxx | 6 +- IO/ADIOS2/VTX/schema/VTXSchema.cxx | 2 +- IO/ADIOS2/VTX/schema/vtk/VTXvtkBase.cxx | 6 +- IO/ADIOS2/VTX/schema/vtk/VTXvtkVTI.cxx | 8 +- IO/ADIOS2/VTX/schema/vtk/VTXvtkVTU.cxx | 6 +- IO/ADIOS2/vtkADIOS2CoreImageReader.cxx | 88 +- IO/ADIOS2/vtkADIOS2CoreImageReader.h | 52 +- IO/ADIOS2/vtkADIOS2VTXReader.h | 13 +- IO/AMR/CMakeLists.txt | 21 +- IO/AMR/Testing/CMakeLists.txt | 3 +- IO/AMR/Testing/Cxx/CMakeLists.txt | 3 + .../Cxx/TestAMReXGridReaderNonZeroOrigin.cxx | 42 + IO/AMR/Testing/Cxx/TestVelodyneReader.cxx | 69 + IO/AMR/vtkAMRBaseParticlesReader.cxx | 8 +- IO/AMR/vtkAMRBaseParticlesReader.h | 44 +- IO/AMR/vtkAMRBaseReader.cxx | 6 +- IO/AMR/vtkAMRBaseReader.h | 44 +- IO/AMR/vtkAMREnzoParticlesReader.h | 4 +- IO/AMR/vtkAMREnzoReader.cxx | 41 +- IO/AMR/vtkAMREnzoReader.h | 6 +- IO/AMR/vtkAMREnzoReaderInternal.cxx | 34 +- IO/AMR/vtkAMRFlashParticlesReader.h | 4 +- IO/AMR/vtkAMRFlashReader.cxx | 27 +- IO/AMR/vtkAMRFlashReader.h | 6 +- IO/AMR/vtkAMRFlashReaderInternal.cxx | 48 +- IO/AMR/vtkAMRFlashReaderInternal.h | 6 +- IO/AMR/vtkAMRVelodyneReader.cxx | 354 + IO/AMR/vtkAMRVelodyneReader.h | 114 + IO/AMR/vtkAMRVelodyneReaderInternal.cxx | 1041 + IO/AMR/vtkAMRVelodyneReaderInternal.h | 106 + IO/AMR/vtkAMReXGridReader.cxx | 89 +- IO/AMR/vtkAMReXGridReader.h | 2 +- IO/AMR/vtkAMReXGridReaderInternal.cxx | 139 +- IO/AMR/vtkAMReXGridReaderInternal.h | 75 +- IO/AMR/vtkAMReXParticlesReader.cxx | 50 +- IO/AMR/vtkAMReXParticlesReader.h | 18 +- IO/Asynchronous/vtkThreadedImageWriter.cxx | 18 +- IO/Asynchronous/vtkThreadedImageWriter.h | 2 +- IO/CGNS/CMakeLists.txt | 16 + IO/CGNS/Testing/CMakeLists.txt | 11 + IO/CGNS/Testing/Cxx/CMakeLists.txt | 9 + .../Cxx/TestCGNSNoFlowSolutionPointers.cxx | 51 + IO/CGNS/Testing/Cxx/TestCGNSReader.cxx | 98 + .../Testing/Cxx/TestCGNSReaderMeshCaching.cxx | 84 + .../Testing/Cxx/TestCGNSUnsteadyFields.cxx | 98 + IO/CGNS/Testing/Cxx/TestCGNSUnsteadyGrid.cxx | 101 + IO/CGNS/Testing/Cxx/TestReadCGNSSolution.cxx | 88 + IO/CGNS/cgio_helpers.cxx | 769 + IO/CGNS/cgio_helpers.h | 175 + IO/CGNS/resources/CGNSReader.xml | 327 + IO/CGNS/vtk.module | 24 + IO/CGNS/vtkCGNSCache.h | 120 + IO/CGNS/vtkCGNSFileSeriesReader.cxx | 498 + IO/CGNS/vtkCGNSFileSeriesReader.h | 147 + IO/CGNS/vtkCGNSReader.cxx | 5065 ++ IO/CGNS/vtkCGNSReader.h | 312 + IO/CGNS/vtkCGNSReaderInternal.cxx | 1271 + IO/CGNS/vtkCGNSReaderInternal.h | 549 + IO/CGNS/vtkFileSeriesHelper.cxx | 546 + IO/CGNS/vtkFileSeriesHelper.h | 216 + IO/CONVERGECFD/CMakeLists.txt | 6 + IO/CONVERGECFD/Testing/CMakeLists.txt | 5 + IO/CONVERGECFD/Testing/Cxx/CMakeLists.txt | 4 + .../Testing/Cxx/TestCONVERGECFDReader.cxx | 496 + IO/CONVERGECFD/vtk.module | 17 + IO/CONVERGECFD/vtkCONVERGECFDReader.cxx | 1434 + IO/CONVERGECFD/vtkCONVERGECFDReader.h | 126 + IO/Chemistry/CMakeLists.txt | 15 + IO/Chemistry/Testing/CMakeLists.txt | 12 + IO/Chemistry/Testing/Cxx/CMakeLists.txt | 17 + .../Testing/Cxx/TestCMLMoleculeReader.cxx | 0 IO/Chemistry/Testing/Cxx/TestPDBReader.cxx | 82 + .../Testing/Cxx/TestVASPAnimationReader.cxx | 0 .../Cxx/TestVASPTessellationReader.cxx | 0 .../Baseline/TestCMLMoleculeReader.png.sha512 | 0 .../TestVASPAnimationReader.png.sha512 | 0 .../TestVASPAnimationReader_1.png.sha512 | 0 .../TestVASPTessellationReader.png.sha512 | 0 .../TestVASPTessellationReader_1.png.sha512 | 0 .../Data/Baseline/TestXYZMol.png.sha512 | 1 + .../Testing/Data/Baseline/caffeine.png.sha512 | 1 + .../caffeine_notrailingwhitespaces.png.sha512 | 1 + .../Data/VASP/NPT_Z_ANIMATE.out.sha512 | 0 .../Data/VASP/NPT_Z_TESSELLATE.out.sha512 | 0 IO/Chemistry/Testing/Python/CMakeLists.txt | 13 + IO/Chemistry/Testing/Python/MoleculeXYZ.py | 38 + .../Testing/Python/TestXYZMol.py | 0 .../Testing/Python/caffeine.py | 0 .../Python/caffeine_notrailingwhitespaces.py | 0 IO/Chemistry/vtk.module | 27 + IO/Chemistry/vtkCMLMoleculeReader.cxx | 325 + IO/Chemistry/vtkCMLMoleculeReader.h | 67 + IO/Chemistry/vtkGaussianCubeReader.cxx | 395 + IO/Chemistry/vtkGaussianCubeReader.h | 64 + IO/Chemistry/vtkGaussianCubeReader2.cxx | 324 + IO/Chemistry/vtkGaussianCubeReader2.h | 77 + IO/Chemistry/vtkMoleculeReaderBase.cxx | 428 + IO/Chemistry/vtkMoleculeReaderBase.h | 145 + IO/Chemistry/vtkPDBReader.cxx | 200 + IO/Chemistry/vtkPDBReader.h | 51 + .../Chemistry/vtkVASPAnimationReader.cxx | 0 IO/Chemistry/vtkVASPAnimationReader.h | 90 + IO/Chemistry/vtkVASPTessellationReader.cxx | 624 + IO/Chemistry/vtkVASPTessellationReader.h | 93 + IO/Chemistry/vtkXYZMolReader.cxx | 356 + IO/Chemistry/vtkXYZMolReader.h | 90 + IO/Chemistry/vtkXYZMolReader2.cxx | 220 + IO/Chemistry/vtkXYZMolReader2.h | 76 + IO/CityGML/vtkCityGMLReader.cxx | 85 +- IO/CityGML/vtkCityGMLReader.h | 40 +- IO/Core/Testing/Cxx/TestArrayDataWriter.cxx | 4 +- IO/Core/Testing/Cxx/TestArrayDenormalized.cxx | 2 +- .../Testing/Cxx/TestArraySerialization.cxx | 35 +- IO/Core/Testing/Cxx/TestNumberToString.cxx | 4 +- IO/Core/Testing/Cxx/vtkFortran.h | 4 +- IO/Core/vtkASCIITextCodec.cxx | 58 +- IO/Core/vtkASCIITextCodec.h | 22 +- IO/Core/vtkAbstractParticleWriter.cxx | 12 +- IO/Core/vtkAbstractParticleWriter.h | 20 +- IO/Core/vtkAbstractPolyDataReader.cxx | 1 - IO/Core/vtkAbstractPolyDataReader.h | 8 +- IO/Core/vtkArrayDataReader.cxx | 6 +- IO/Core/vtkArrayDataReader.h | 19 +- IO/Core/vtkArrayDataWriter.cxx | 2 +- IO/Core/vtkArrayDataWriter.h | 16 +- IO/Core/vtkArrayReader.cxx | 32 +- IO/Core/vtkArrayReader.h | 19 +- IO/Core/vtkArrayWriter.cxx | 5 +- IO/Core/vtkArrayWriter.h | 16 +- IO/Core/vtkBase64InputStream.cxx | 18 +- IO/Core/vtkBase64OutputStream.cxx | 20 +- IO/Core/vtkBase64Utilities.cxx | 28 +- IO/Core/vtkBase64Utilities.h | 6 +- IO/Core/vtkDataCompressor.cxx | 14 +- IO/Core/vtkDataCompressor.h | 2 +- IO/Core/vtkDelimitedTextWriter.cxx | 28 +- IO/Core/vtkDelimitedTextWriter.h | 26 +- IO/Core/vtkGlobFileNames.cxx | 16 +- IO/Core/vtkGlobFileNames.h | 32 +- IO/Core/vtkInputStream.cxx | 16 +- IO/Core/vtkInputStream.h | 4 +- IO/Core/vtkJavaScriptDataWriter.cxx | 20 +- IO/Core/vtkJavaScriptDataWriter.h | 16 +- IO/Core/vtkLZ4DataCompressor.cxx | 16 +- IO/Core/vtkLZMADataCompressor.cxx | 16 +- IO/Core/vtkNumberToString.cxx | 4 +- IO/Core/vtkOutputStream.cxx | 14 +- IO/Core/vtkOutputStream.h | 4 +- IO/Core/vtkSortFileNames.cxx | 41 +- IO/Core/vtkSortFileNames.h | 20 +- IO/Core/vtkTextCodec.cxx | 73 +- IO/Core/vtkTextCodec.h | 31 +- IO/Core/vtkTextCodecFactory.h | 8 +- IO/Core/vtkUTF16TextCodec.cxx | 74 +- IO/Core/vtkUTF16TextCodec.h | 11 +- IO/Core/vtkUTF8TextCodec.cxx | 76 +- IO/Core/vtkUTF8TextCodec.h | 12 +- IO/Core/vtkWriter.h | 4 +- IO/Core/vtkZLibDataCompressor.cxx | 16 +- IO/Core/vtkZLibDataCompressor.h | 4 +- IO/EnSight/Testing/CMakeLists.txt | 5 +- .../Baseline/EnSightGoldAsymTensor.png.sha512 | 1 + .../EnSightGoldAsymTensorBin.png.sha512 | 1 + .../Baseline/EnSightGoldFortran.png.sha512 | 1 + IO/EnSight/Testing/Python/CMakeLists.txt | 5 + IO/EnSight/Testing/Python/EnSight6Elements.py | 2 +- .../Testing/Python/EnSightGoldAsymTensor.py | 36 + .../Python/EnSightGoldAsymTensorBin.py | 36 + .../Testing/Python/EnSightGoldFortran.py | 29 + .../Python/EnSightGoldUndefAndPartialAscii.py | 26 + .../Python/EnSightGoldUndefAndPartialBin.py | 28 + IO/EnSight/vtkEnSight6BinaryReader.cxx | 119 +- IO/EnSight/vtkEnSight6BinaryReader.h | 16 +- IO/EnSight/vtkEnSight6Reader.cxx | 151 +- IO/EnSight/vtkEnSight6Reader.h | 12 + IO/EnSight/vtkEnSightGoldBinaryReader.cxx | 1894 +- IO/EnSight/vtkEnSightGoldBinaryReader.h | 54 +- IO/EnSight/vtkEnSightGoldReader.cxx | 1221 +- IO/EnSight/vtkEnSightGoldReader.h | 41 +- IO/EnSight/vtkEnSightMasterServerReader.cxx | 17 +- IO/EnSight/vtkEnSightMasterServerReader.h | 14 +- IO/EnSight/vtkEnSightReader.cxx | 177 +- IO/EnSight/vtkEnSightReader.h | 50 +- IO/EnSight/vtkGenericEnSightReader.cxx | 229 +- IO/EnSight/vtkGenericEnSightReader.h | 116 +- IO/Exodus/Testing/Cxx/CMakeLists.txt | 22 +- .../Testing/Cxx/TestExodusIgnoreFileTime.cxx | 1 + IO/Exodus/Testing/Cxx/TestExodusWedge18.cxx | 67 + IO/Exodus/Testing/Cxx/TestInSituExodus.cxx | 6 +- .../Baseline/TestExodusWedge18.png.sha512 | 1 + IO/Exodus/vtkCPExodusIIElementBlock.cxx | 2 +- IO/Exodus/vtkCPExodusIIInSituReader.cxx | 6 +- IO/Exodus/vtkCPExodusIIInSituReader.h | 16 +- .../vtkCPExodusIINodalCoordinatesTemplate.h | 8 +- IO/Exodus/vtkCPExodusIIResultsArrayTemplate.h | 16 +- IO/Exodus/vtkExodusIICache.h | 9 +- IO/Exodus/vtkExodusIIReader.cxx | 373 +- IO/Exodus/vtkExodusIIReader.h | 110 +- IO/Exodus/vtkExodusIIReaderParser.cxx | 27 +- IO/Exodus/vtkExodusIIReaderParser.h | 23 +- IO/Exodus/vtkExodusIIReaderPrivate.h | 39 +- IO/Exodus/vtkExodusIIReaderVariableCheck.cxx | 2 +- IO/Exodus/vtkExodusIIWriter.cxx | 109 +- IO/Exodus/vtkExodusIIWriter.h | 12 +- IO/Exodus/vtkModelMetadata.h | 36 +- .../Cxx/TestJSONRenderWindowExporter.cxx | 18 +- IO/Export/Testing/Cxx/TestLinePlotGL2PS.cxx | 2 +- .../Testing/Cxx/TestSVGContextExport.cxx | 24 +- IO/Export/Testing/Cxx/X3DTest.cxx | 3 +- IO/Export/vtk.module | 1 + IO/Export/vtkExporter.h | 12 +- IO/Export/vtkGLTFExporter.cxx | 143 +- IO/Export/vtkGLTFExporter.h | 23 +- IO/Export/vtkIVExporter.h | 8 +- IO/Export/vtkJSONDataSetWriter.cxx | 85 +- IO/Export/vtkJSONDataSetWriter.h | 47 +- IO/Export/vtkJSONRenderWindowExporter.cxx | 22 +- IO/Export/vtkJSONRenderWindowExporter.h | 18 +- IO/Export/vtkJSONSceneExporter.cxx | 325 +- IO/Export/vtkJSONSceneExporter.h | 51 +- IO/Export/vtkOBJExporter.cxx | 4 +- IO/Export/vtkOBJExporter.h | 16 +- IO/Export/vtkOOGLExporter.h | 8 +- IO/Export/vtkPOVExporter.cxx | 20 +- IO/Export/vtkPOVExporter.h | 8 +- IO/Export/vtkRIBExporter.cxx | 4 +- IO/Export/vtkRIBExporter.h | 32 +- IO/Export/vtkRIBProperty.h | 34 +- IO/Export/vtkSVGContextDevice2D.cxx | 30 +- IO/Export/vtkSVGExporter.h | 57 +- IO/Export/vtkSingleVTPExporter.h | 10 +- IO/Export/vtkVRMLExporter.h | 12 +- IO/Export/vtkX3DExporter.cxx | 26 +- IO/Export/vtkX3DExporter.h | 28 +- IO/Export/vtkX3DExporterFIWriter.cxx | 111 +- IO/Export/vtkX3DExporterFIWriter.h | 4 +- IO/Export/vtkX3DExporterFIWriterHelper.h | 4 +- IO/Export/vtkX3DExporterWriter.cxx | 8 +- IO/Export/vtkX3DExporterWriter.h | 12 +- IO/Export/vtkX3DExporterXMLWriter.cxx | 46 +- .../Cxx/TestGL2PSBillboardTextActor3D.cxx | 2 +- .../Testing/Cxx/TestGL2PSContext.cxx | 4 +- .../Testing/Cxx/TestGL2PSTextActor.cxx | 2 +- .../Testing/Cxx/TestGL2PSTextActor3D.cxx | 2 +- .../Testing/Cxx/TestGL2PSTextMapper.cxx | 2 +- .../Testing/Cxx/TestStackedPlotGL2PS.cxx | 2 +- .../TestGL2PSTextActor3D-rasterRef.png.sha512 | 2 +- .../Baseline/TestGL2PSTextActor3D.png.sha512 | 2 +- IO/ExportGL2PS/vtkGL2PSExporter.h | 84 +- .../Testing/Cxx/TestPDFContextExport.cxx | 2 +- .../Testing/Cxx/TestPDFTransformedText.cxx | 2 +- ...PDFTransformedText-rasterPDFRef.png.sha512 | 2 +- .../TestPDFTransformedText.png.sha512 | 2 +- IO/ExportPDF/vtkPDFContextDevice2D.cxx | 19 +- IO/ExportPDF/vtkPDFContextDevice2D.h | 2 +- IO/ExportPDF/vtkPDFExporter.h | 4 +- IO/FFMPEG/vtkFFMPEGVideoSource.cxx | 131 +- IO/FFMPEG/vtkFFMPEGVideoSource.h | 32 +- IO/FFMPEG/vtkFFMPEGWriter.cxx | 40 +- IO/FFMPEG/vtkFFMPEGWriter.h | 24 +- IO/Fides/CMakeLists.txt | 7 + IO/Fides/Testing/CMakeLists.txt | 9 + IO/Fides/Testing/Python/CMakeLists.txt | 4 + IO/Fides/Testing/Python/TestFidesBasic.py | 133 + IO/Fides/vtk.module | 13 + IO/Fides/vtkFidesReader.cxx | 515 + IO/Fides/vtkFidesReader.h | 172 + IO/GDAL/CMakeLists.txt | 4 +- IO/GDAL/Testing/Cxx/TestGDALRasterReader.cxx | 4 +- IO/GDAL/vtkGDAL.cxx | 9 + IO/GDAL/vtkGDAL.h | 2 +- IO/GDAL/vtkGDALRasterReader.cxx | 75 +- IO/GDAL/vtkGDALRasterReader.h | 18 +- IO/GDAL/vtkGDALVectorReader.cxx | 48 +- IO/GDAL/vtkGDALVectorReader.h | 16 +- IO/GeoJSON/vtkGeoJSONFeature.cxx | 52 +- IO/GeoJSON/vtkGeoJSONFeature.h | 23 +- IO/GeoJSON/vtkGeoJSONReader.cxx | 27 +- IO/GeoJSON/vtkGeoJSONReader.h | 34 +- IO/GeoJSON/vtkGeoJSONWriter.h | 28 +- IO/Geometry/CMakeLists.txt | 8 +- IO/Geometry/Testing/CMakeLists.txt | 84 +- IO/Geometry/Testing/Cxx/CMakeLists.txt | 18 +- IO/Geometry/Testing/Cxx/TestDataObjectIO.cxx | 4 +- IO/Geometry/Testing/Cxx/TestGLTFWriter.cxx | 207 + .../Cxx/TestIncrementalOctreePointLocator.cxx | 900 - .../Testing/Cxx/TestOBJReaderRelative.cxx | 4 +- .../Cxx/TestOBJReaderSingleTexture.cxx | 2 +- .../Testing/Cxx/TestOBJWriterMultiTexture.cxx | 158 + .../Cxx/TestOpenFOAMReader64BitFloats.cxx | 74 - .../TestOpenFOAMReaderDimensionedFields.cxx | 74 + .../Cxx/TestOpenFOAMReaderFaceZone.cxx | 145 + .../TestOpenFOAMReaderLagrangianSerial.cxx | 113 + .../Cxx/TestOpenFOAMReaderLargePolyhedral.cxx | 94 + .../Cxx/TestOpenFOAMReaderPrecision.cxx | 76 + .../Testing/Cxx/TestOpenFOAMReaderRegEx.cxx | 2 +- .../Cxx/TestOpenFOAMReaderValuePointPatch.cxx | 120 + .../Testing/Cxx/TestTecplotReader2.cxx | 10 +- IO/Geometry/Testing/Cxx/UnitTestSTLWriter.cxx | 13 +- .../Baseline/TestGLTFWriterCityGML.png.sha512 | 1 + .../Baseline/TestGLTFWriterObj.png.sha512 | 1 + .../TestOpenFOAMReader64BitFloats.png.sha512 | 1 - .../TestOpenFOAMReaderFaceZone.png.sha512 | 1 + .../TestOpenFOAMReaderPrecision.png.sha512 | 1 + ...stOpenFOAMReaderValuePointPatch.png.sha512 | 1 + .../Data/Baseline/TestXYZMol.png.sha512 | 1 - .../Testing/Data/Baseline/caffeine.png.sha512 | 1 - .../caffeine_notrailingwhitespaces.png.sha512 | 1 - IO/Geometry/Testing/Python/CMakeLists.txt | 3 - IO/Geometry/vtk.module | 4 +- IO/Geometry/vtkAVSucdReader.cxx | 64 +- IO/Geometry/vtkAVSucdReader.h | 44 +- IO/Geometry/vtkBYUReader.cxx | 2 +- IO/Geometry/vtkBYUReader.h | 54 +- IO/Geometry/vtkBYUWriter.h | 48 +- IO/Geometry/vtkCGMWriter.h | 20 +- IO/Geometry/vtkChacoReader.cxx | 63 +- IO/Geometry/vtkChacoReader.h | 8 +- IO/Geometry/vtkFLUENTReader.cxx | 132 +- IO/Geometry/vtkFLUENTReader.h | 28 +- IO/Geometry/vtkFacetWriter.cxx | 16 +- IO/Geometry/vtkFacetWriter.h | 8 +- IO/Geometry/vtkGAMBITReader.cxx | 38 +- IO/Geometry/vtkGAMBITReader.h | 20 +- IO/Geometry/vtkGLTFDocumentLoader.cxx | 170 +- IO/Geometry/vtkGLTFDocumentLoader.h | 47 +- .../vtkGLTFDocumentLoaderInternals.cxx | 78 +- IO/Geometry/vtkGLTFReader.cxx | 171 +- IO/Geometry/vtkGLTFReader.h | 36 +- IO/Geometry/vtkGLTFUtils.cxx | 42 +- IO/Geometry/vtkGLTFWriter.cxx | 792 + IO/Geometry/vtkGLTFWriter.h | 140 + IO/Geometry/vtkGLTFWriterUtils.cxx | 128 + IO/Geometry/vtkGLTFWriterUtils.h | 71 + IO/Geometry/vtkGaussianCubeReader.cxx | 381 - IO/Geometry/vtkGaussianCubeReader.h | 64 - IO/Geometry/vtkHoudiniPolyDataWriter.cxx | 10 +- IO/Geometry/vtkHoudiniPolyDataWriter.h | 8 +- IO/Geometry/vtkIVWriter.cxx | 12 +- IO/Geometry/vtkIVWriter.h | 12 +- IO/Geometry/vtkMCubesReader.cxx | 7 +- IO/Geometry/vtkMCubesReader.h | 40 +- IO/Geometry/vtkMCubesWriter.cxx | 5 +- IO/Geometry/vtkMCubesWriter.h | 20 +- IO/Geometry/vtkMFIXReader.cxx | 75 +- IO/Geometry/vtkMFIXReader.h | 42 +- IO/Geometry/vtkMoleculeReaderBase.cxx | 730 - IO/Geometry/vtkMoleculeReaderBase.h | 104 - IO/Geometry/vtkOBJReader.cxx | 65 +- IO/Geometry/vtkOBJReader.h | 4 +- IO/Geometry/vtkOBJWriter.cxx | 232 +- IO/Geometry/vtkOBJWriter.h | 22 +- IO/Geometry/vtkOpenFOAMReader.cxx | 11813 +++-- IO/Geometry/vtkOpenFOAMReader.h | 98 +- IO/Geometry/vtkPDBReader.cxx | 177 - IO/Geometry/vtkPDBReader.h | 51 - IO/Geometry/vtkPTSReader.cxx | 12 +- IO/Geometry/vtkPTSReader.h | 36 +- IO/Geometry/vtkParticleReader.cxx | 35 +- IO/Geometry/vtkParticleReader.h | 39 +- IO/Geometry/vtkProStarReader.cxx | 14 +- IO/Geometry/vtkProStarReader.h | 12 +- IO/Geometry/vtkSTLReader.cxx | 55 +- IO/Geometry/vtkSTLReader.h | 12 +- IO/Geometry/vtkSTLWriter.cxx | 8 +- IO/Geometry/vtkSTLWriter.h | 24 +- IO/Geometry/vtkTecplotReader.cxx | 108 +- IO/Geometry/vtkTecplotReader.h | 6 +- IO/Geometry/vtkWindBladeReader.cxx | 134 +- IO/Geometry/vtkWindBladeReader.h | 8 +- IO/Geometry/vtkXYZMolReader.cxx | 348 - IO/Geometry/vtkXYZMolReader.h | 90 - IO/H5Rage/CMakeLists.txt | 6 + IO/H5Rage/H5RageAdaptor.cxx | 866 + IO/H5Rage/H5RageAdaptor.h | 90 + IO/H5Rage/vtk.module | 22 + IO/H5Rage/vtkH5RageReader.cxx | 341 + IO/H5Rage/vtkH5RageReader.h | 123 + IO/H5part/vtkH5PartReader.cxx | 62 +- IO/H5part/vtkH5PartReader.h | 40 +- IO/HDF/CMakeLists.txt | 11 + IO/HDF/Testing/CMakeLists.txt | 13 + IO/HDF/Testing/Cxx/CMakeLists.txt | 5 + IO/HDF/Testing/Cxx/TestHDFReader.cxx | 275 + IO/HDF/vtk.module | 21 + IO/HDF/vtkHDFReader.cxx | 557 + IO/HDF/vtkHDFReader.h | 200 + IO/HDF/vtkHDFReaderImplementation.cxx | 883 + IO/HDF/vtkHDFReaderImplementation.h | 207 + IO/HDF/vtkHDFReaderVersion.h | 27 + IO/IOSS/CMakeLists.txt | 10 + IO/IOSS/Testing/CMakeLists.txt | 28 + IO/IOSS/Testing/Cxx/CMakeLists.txt | 25 + .../Cxx/TestIOSSApplyDisplacementsCGNS.cxx | 80 + IO/IOSS/Testing/Cxx/TestIOSSAssemblies.cxx | 117 + IO/IOSS/Testing/Cxx/TestIOSSAttributes.cxx | 76 + IO/IOSS/Testing/Cxx/TestIOSSCGNS.cxx | 102 + IO/IOSS/Testing/Cxx/TestIOSSExodus.cxx | 69 + .../Cxx/TestIOSSExodusParitionedFiles.cxx | 140 + .../Testing/Cxx/TestIOSSExodusRestarts.cxx | 96 + .../Cxx/TestIOSSFilePatternMatching.cxx | 24 + .../Testing/Cxx/TestIOSSNoElementBlocks.cxx | 70 + IO/IOSS/Testing/Cxx/TestIOSSSuperelements.cxx | 66 + IO/IOSS/Testing/Cxx/TestIOSSTri6.cxx | 86 + IO/IOSS/Testing/Cxx/TestIOSSUnsupported.cxx | 48 + .../TestIOSSApplyDisplacementsCGNS.png.sha512 | 1 + .../Data/Baseline/TestIOSSCGNS.png.sha512 | 1 + .../TestIOSSExodusParitionedFiles.png.sha512 | 1 + .../Data/Baseline/TestIOSSTri6.png.sha512 | 1 + IO/IOSS/vtk.module | 30 + IO/IOSS/vtkIOSSFilesScanner.cxx | 252 + IO/IOSS/vtkIOSSFilesScanner.h | 78 + IO/IOSS/vtkIOSSReader.cxx | 2906 ++ IO/IOSS/vtkIOSSReader.h | 511 + IO/IOSS/vtkIOSSUtilities.cxx | 884 + IO/IOSS/vtkIOSSUtilities.h | 252 + IO/Image/CMakeLists.txt | 7 +- IO/Image/Testing/CMakeLists.txt | 4 +- IO/Image/Testing/Cxx/CMakeLists.txt | 4 + IO/Image/Testing/Cxx/TestDataObjectIO.cxx | 4 +- .../{TestHDRReader.cpp => TestHDRReader.cxx} | 0 IO/Image/Testing/Cxx/TestMetaIO.cxx | 2 + IO/Image/Testing/Cxx/TestNrrdReader.cxx | 33 +- IO/Image/Testing/Cxx/TestSEPReader.cxx | 46 +- IO/Image/Testing/Cxx/TestTGAReader.cxx | 73 + .../Data/Baseline/TestNrrdReader.png.sha512 | 2 +- .../Data/Baseline/TestTGAReader.png.sha512 | 1 + IO/Image/Testing/Python/TestPNGTextChunks.py | 8 + IO/Image/Testing/Python/TestTIFFReader.py | 2 +- IO/Image/vtkBMPReader.cxx | 22 +- IO/Image/vtkBMPReader.h | 14 +- IO/Image/vtkBMPWriter.cxx | 2 +- IO/Image/vtkBMPWriter.h | 8 +- IO/Image/vtkDEMReader.cxx | 4 +- IO/Image/vtkDEMReader.h | 68 +- IO/Image/vtkDICOMImageReader.cxx | 57 +- IO/Image/vtkDICOMImageReader.h | 22 +- IO/Image/vtkGESignaReader.cxx | 14 +- IO/Image/vtkGESignaReader.h | 6 +- IO/Image/vtkHDRReader.cxx | 37 +- IO/Image/vtkHDRReader.h | 22 +- IO/Image/vtkImageExport.cxx | 28 +- IO/Image/vtkImageExport.h | 28 +- IO/Image/vtkImageImport.cxx | 30 +- IO/Image/vtkImageImport.h | 96 +- IO/Image/vtkImageImportExecutive.cxx | 8 +- IO/Image/vtkImageImportExecutive.h | 5 +- IO/Image/vtkImageReader.cxx | 22 +- IO/Image/vtkImageReader.h | 18 +- IO/Image/vtkImageReader2.cxx | 67 +- IO/Image/vtkImageReader2.h | 92 +- IO/Image/vtkImageReader2Collection.cxx | 2 +- IO/Image/vtkImageReader2Collection.h | 4 +- IO/Image/vtkImageReader2Factory.cxx | 86 +- IO/Image/vtkImageReader2Factory.h | 22 +- IO/Image/vtkImageWriter.cxx | 20 +- IO/Image/vtkImageWriter.h | 28 +- IO/Image/vtkJPEGReader.cxx | 39 +- IO/Image/vtkJPEGReader.h | 9 +- IO/Image/vtkJPEGWriter.cxx | 3 +- IO/Image/vtkJPEGWriter.h | 16 +- IO/Image/vtkJSONImageWriter.cxx | 13 +- IO/Image/vtkJSONImageWriter.h | 16 +- IO/Image/vtkMRCReader.h | 6 +- IO/Image/vtkMedicalImageProperties.cxx | 96 +- IO/Image/vtkMedicalImageProperties.h | 136 +- IO/Image/vtkMedicalImageReader2.cxx | 36 +- IO/Image/vtkMedicalImageReader2.h | 8 +- IO/Image/vtkMetaImageReader.cxx | 15 +- IO/Image/vtkMetaImageReader.h | 6 +- IO/Image/vtkMetaImageWriter.cxx | 16 +- IO/Image/vtkMetaImageWriter.h | 14 +- IO/Image/vtkNIFTIImageHeader.cxx | 28 +- IO/Image/vtkNIFTIImageHeader.h | 60 +- IO/Image/vtkNIFTIImagePrivate.h | 4 +- IO/Image/vtkNIFTIImageReader.cxx | 27 +- IO/Image/vtkNIFTIImageReader.h | 26 +- IO/Image/vtkNIFTIImageWriter.cxx | 20 +- IO/Image/vtkNIFTIImageWriter.h | 50 +- IO/Image/vtkNrrdReader.cxx | 176 +- IO/Image/vtkNrrdReader.h | 11 +- IO/Image/vtkOMETIFFReader.cxx | 22 +- IO/Image/vtkOMETIFFReader.h | 6 +- IO/Image/vtkPNGReader.cxx | 44 +- IO/Image/vtkPNGReader.h | 6 +- IO/Image/vtkPNGWriter.cxx | 19 +- IO/Image/vtkPNGWriter.h | 22 +- IO/Image/vtkPNMReader.cxx | 2 +- IO/Image/vtkPNMReader.h | 6 +- IO/Image/vtkPNMWriter.cxx | 10 +- IO/Image/vtkPNMWriter.h | 4 +- IO/Image/vtkPostScriptWriter.cxx | 2 +- IO/Image/vtkPostScriptWriter.h | 4 +- IO/Image/vtkSEPReader.cxx | 547 +- IO/Image/vtkSEPReader.h | 139 +- IO/Image/vtkSLCReader.h | 6 +- IO/Image/vtkTGAReader.cxx | 196 + IO/Image/vtkTGAReader.h | 66 + IO/Image/vtkTIFFReader.cxx | 59 +- IO/Image/vtkTIFFReader.h | 20 +- IO/Image/vtkTIFFReaderInternal.h | 2 +- IO/Image/vtkTIFFWriter.cxx | 72 +- IO/Image/vtkTIFFWriter.h | 6 +- IO/Image/vtkVolume16Reader.cxx | 42 +- IO/Image/vtkVolume16Reader.h | 24 +- IO/Image/vtkVolumeReader.h | 28 +- IO/Import/Testing/Cxx/CMakeLists.txt | 16 +- IO/Import/Testing/Cxx/TestGLTFImporter.cxx | 7 +- IO/Import/Testing/Cxx/TestImportExportOBJ.cxx | 6 +- .../TestGLTFImporterCamera.png.sha512 | 1 + ...stGLTFImporterKHRLightsPunctual.png.sha512 | 2 +- .../Baseline/TestGLTFImporterUnlit.png.sha512 | 1 + .../TestOBJImporter-DuplicateMaps.png.sha512 | 2 +- .../Data/glTF/Cameras/Cameras.gltf.sha512 | 1 + .../Data/glTF/UnlitTest/UnlitTest.glb.sha512 | 1 + IO/Import/mtlsyntax.cxx | 10 +- IO/Import/vtk3DS.h | 61 +- IO/Import/vtk3DSImporter.cxx | 6 +- IO/Import/vtk3DSImporter.h | 12 +- IO/Import/vtkGLTFImporter.cxx | 325 +- IO/Import/vtkGLTFImporter.h | 69 +- IO/Import/vtkImporter.cxx | 12 +- IO/Import/vtkImporter.h | 51 +- IO/Import/vtkOBJImporter.cxx | 114 +- IO/Import/vtkOBJImporter.h | 17 +- IO/Import/vtkOBJImporterInternals.cxx | 32 +- IO/Import/vtkOBJImporterInternals.h | 17 +- IO/Import/vtkVRMLImporter.cxx | 40 +- IO/Import/vtkVRMLImporter.h | 16 +- IO/Import/vtkVRMLImporter_Yacc.h | 4 +- .../Testing/Cxx/TestDelimitedTextReader2.cxx | 8 +- .../Testing/Cxx/TestPhyloXMLTreeReadWrite.cxx | 18 +- IO/Infovis/vtkBiomTableReader.cxx | 42 +- IO/Infovis/vtkBiomTableReader.h | 6 +- IO/Infovis/vtkChacoGraphReader.h | 8 +- IO/Infovis/vtkDIMACSGraphReader.cxx | 2 +- IO/Infovis/vtkDIMACSGraphReader.h | 16 +- IO/Infovis/vtkDIMACSGraphWriter.h | 12 +- IO/Infovis/vtkDelimitedTextReader.cxx | 14 +- IO/Infovis/vtkDelimitedTextReader.h | 96 +- IO/Infovis/vtkFixedWidthTextReader.cxx | 14 +- IO/Infovis/vtkFixedWidthTextReader.h | 20 +- IO/Infovis/vtkISIReader.cxx | 10 +- IO/Infovis/vtkISIReader.h | 16 +- IO/Infovis/vtkMultiNewickTreeReader.cxx | 16 +- IO/Infovis/vtkMultiNewickTreeReader.h | 6 +- IO/Infovis/vtkNewickTreeReader.cxx | 22 +- IO/Infovis/vtkNewickTreeReader.h | 6 +- IO/Infovis/vtkNewickTreeWriter.cxx | 14 +- IO/Infovis/vtkNewickTreeWriter.h | 14 +- IO/Infovis/vtkPhyloXMLTreeReader.cxx | 86 +- IO/Infovis/vtkPhyloXMLTreeReader.h | 4 +- IO/Infovis/vtkPhyloXMLTreeWriter.cxx | 72 +- IO/Infovis/vtkPhyloXMLTreeWriter.h | 14 +- IO/Infovis/vtkRISReader.cxx | 10 +- IO/Infovis/vtkRISReader.h | 16 +- IO/Infovis/vtkTemporalDelimitedTextReader.cxx | 38 +- IO/Infovis/vtkTemporalDelimitedTextReader.h | 14 +- IO/Infovis/vtkTulipReader.cxx | 2 +- IO/Infovis/vtkTulipReader.h | 8 +- IO/Infovis/vtkXGMLReader.h | 8 +- IO/Infovis/vtkXMLTreeReader.cxx | 6 +- IO/Infovis/vtkXMLTreeReader.h | 36 +- IO/LAS/vtkLASReader.cxx | 10 +- IO/LAS/vtkLASReader.h | 6 +- IO/LSDyna/LSDynaFamily.cxx | 56 +- IO/LSDyna/LSDynaFamily.h | 2 +- IO/LSDyna/LSDynaMetaData.cxx | 10 +- IO/LSDyna/LSDynaMetaData.h | 6 +- IO/LSDyna/vtkLSDynaPart.cxx | 74 +- IO/LSDyna/vtkLSDynaPartCollection.cxx | 54 +- IO/LSDyna/vtkLSDynaReader.cxx | 73 +- IO/LSDyna/vtkLSDynaReader.h | 99 +- IO/LSDyna/vtkLSDynaSummaryParser.cxx | 16 +- IO/LSDyna/vtkLSDynaSummaryParser.h | 4 +- .../Testing/Cxx/TestLegacyArrayMetaData.cxx | 20 +- IO/Legacy/Testing/Python/CMakeLists.txt | 1 + IO/Legacy/Testing/Python/TestVTKLegacy.py | 301 + IO/Legacy/vtkCompositeDataReader.cxx | 36 +- IO/Legacy/vtkCompositeDataReader.h | 6 +- IO/Legacy/vtkCompositeDataWriter.cxx | 30 +- IO/Legacy/vtkCompositeDataWriter.h | 8 +- IO/Legacy/vtkDataObjectReader.cxx | 8 +- IO/Legacy/vtkDataObjectReader.h | 6 +- IO/Legacy/vtkDataObjectWriter.h | 8 +- IO/Legacy/vtkDataReader.cxx | 152 +- IO/Legacy/vtkDataReader.h | 174 +- IO/Legacy/vtkDataSetReader.cxx | 4 +- IO/Legacy/vtkDataSetReader.h | 12 +- IO/Legacy/vtkDataSetWriter.h | 8 +- IO/Legacy/vtkDataWriter.cxx | 239 +- IO/Legacy/vtkDataWriter.h | 125 +- IO/Legacy/vtkGenericDataObjectReader.cxx | 11 +- IO/Legacy/vtkGenericDataObjectReader.h | 12 +- IO/Legacy/vtkGraphReader.cxx | 26 +- IO/Legacy/vtkGraphReader.h | 6 +- IO/Legacy/vtkGraphWriter.h | 8 +- IO/Legacy/vtkPixelExtentIO.cxx | 10 +- IO/Legacy/vtkPixelExtentIO.h | 13 +- IO/Legacy/vtkPolyDataReader.cxx | 22 +- IO/Legacy/vtkPolyDataReader.h | 6 +- IO/Legacy/vtkPolyDataWriter.h | 8 +- IO/Legacy/vtkRectilinearGridReader.cxx | 30 +- IO/Legacy/vtkRectilinearGridReader.h | 8 +- IO/Legacy/vtkRectilinearGridWriter.h | 10 +- IO/Legacy/vtkSimplePointsReader.cxx | 8 +- IO/Legacy/vtkSimplePointsReader.h | 8 +- IO/Legacy/vtkSimplePointsWriter.h | 2 +- IO/Legacy/vtkStructuredGridReader.cxx | 26 +- IO/Legacy/vtkStructuredGridReader.h | 8 +- IO/Legacy/vtkStructuredGridWriter.h | 10 +- IO/Legacy/vtkStructuredPointsReader.cxx | 21 +- IO/Legacy/vtkStructuredPointsReader.h | 8 +- IO/Legacy/vtkStructuredPointsWriter.h | 10 +- IO/Legacy/vtkTableReader.cxx | 20 +- IO/Legacy/vtkTableReader.h | 6 +- IO/Legacy/vtkTableWriter.h | 8 +- IO/Legacy/vtkTreeReader.cxx | 20 +- IO/Legacy/vtkTreeReader.h | 6 +- IO/Legacy/vtkTreeWriter.cxx | 10 +- IO/Legacy/vtkTreeWriter.h | 8 +- IO/Legacy/vtkUnstructuredGridReader.cxx | 20 +- IO/Legacy/vtkUnstructuredGridReader.h | 6 +- IO/Legacy/vtkUnstructuredGridWriter.cxx | 48 +- IO/Legacy/vtkUnstructuredGridWriter.h | 16 +- IO/MINC/vtkMINCImageAttributes.cxx | 75 +- IO/MINC/vtkMINCImageAttributes.h | 44 +- IO/MINC/vtkMINCImageReader.cxx | 53 +- IO/MINC/vtkMINCImageReader.h | 20 +- IO/MINC/vtkMINCImageWriter.cxx | 84 +- IO/MINC/vtkMINCImageWriter.h | 22 +- IO/MINC/vtkMNIObjectReader.cxx | 42 +- IO/MINC/vtkMNIObjectReader.h | 10 +- IO/MINC/vtkMNIObjectWriter.cxx | 44 +- IO/MINC/vtkMNIObjectWriter.h | 28 +- IO/MINC/vtkMNITagPointReader.cxx | 42 +- IO/MINC/vtkMNITagPointReader.h | 10 +- IO/MINC/vtkMNITagPointWriter.cxx | 26 +- IO/MINC/vtkMNITagPointWriter.h | 32 +- IO/MINC/vtkMNITransformReader.cxx | 47 +- IO/MINC/vtkMNITransformReader.h | 10 +- IO/MINC/vtkMNITransformWriter.cxx | 28 +- IO/MINC/vtkMNITransformWriter.h | 16 +- IO/MPIImage/CMakeLists.txt | 4 +- IO/MPIImage/Testing/Cxx/ParallelIso.cxx | 10 +- IO/MPIImage/Testing/Cxx/ParallelIso2.cxx | 10 +- IO/MPIImage/vtkMPIImageReader.cxx | 21 +- IO/MPIImage/vtkMPIImageReader.h | 12 +- IO/MPIImage/vtkPNrrdReader.cxx | 28 +- IO/MPIImage/vtkPNrrdReader.h | 16 +- IO/MPIParallel/CMakeLists.txt | 4 +- .../Testing/Cxx/TestPWindBladeReader.cxx | 15 +- .../vtkMPIMultiBlockPLOT3DReader.cxx | 22 +- IO/MPIParallel/vtkMPIMultiBlockPLOT3DReader.h | 17 +- IO/MPIParallel/vtkPWindBladeReader.cxx | 40 +- IO/MPIParallel/vtkPWindBladeReader.h | 18 +- IO/MotionFX/Testing/CMakeLists.txt | 3 +- IO/MotionFX/Testing/Cxx/CMakeLists.txt | 1 + .../Cxx/TestMotionFXCFGReader2Gears.cxx | 2 +- .../Cxx/TestMotionFXCFGReaderClover.cxx | 37 + .../Cxx/TestMotionFXCFGReaderPlanetary.cxx | 2 +- .../Cxx/TestMotionFXCFGReaderPositionFile.cxx | 2 +- .../TestMotionFXCFGReaderClover.png.sha512 | 1 + IO/MotionFX/vtkMotionFXCFGGrammar.h | 55 +- IO/MotionFX/vtkMotionFXCFGReader.cxx | 291 +- IO/MotionFX/vtkMotionFXCFGReader.h | 12 +- IO/Movie/CMakeLists.txt | 74 +- IO/Movie/Testing/Cxx/CMakeLists.txt | 14 +- IO/Movie/Testing/Cxx/TestAVIWriter.cxx | 10 + IO/Movie/Testing/Cxx/TestMP4Writer.cxx | 114 + IO/Movie/vtk.module | 1 + IO/Movie/vtkAVIWriter.cxx | 14 +- IO/Movie/vtkAVIWriter.h | 20 +- IO/Movie/vtkGenericMovieWriter.cxx | 8 +- IO/Movie/vtkGenericMovieWriter.h | 18 +- IO/Movie/vtkIOMovieConfigure.h.in | 24 + IO/Movie/vtkMP4Writer.cxx | 400 + IO/Movie/vtkMP4Writer.h | 84 + IO/Movie/vtkTestMicrosoftMediaFoundation.cxx | 11 + {CMake => IO/Movie}/vtkTestvfw32.cxx | 0 IO/MySQL/Testing/Cxx/TestMySQLDatabase.cxx | 1 - .../Testing/Cxx/TestMySQLTableReadWrite.cxx | 1 - IO/MySQL/vtkIOMySQL_AutoInit.cxx | 2 +- IO/MySQL/vtkMySQLDatabase.cxx | 72 +- IO/MySQL/vtkMySQLDatabase.h | 30 +- IO/MySQL/vtkMySQLQuery.cxx | 94 +- IO/MySQL/vtkMySQLQuery.h | 12 +- IO/MySQL/vtkMySQLToTableReader.cxx | 24 +- IO/MySQL/vtkTableToMySQLWriter.cxx | 25 +- IO/MySQL/vtkTableToMySQLWriter.h | 4 +- .../Testing/Python/NetCDFCFSetOutputType.py | 12 +- .../Testing/Python/NetCDFCFSphericalCoords.py | 3 +- IO/NetCDF/Testing/Python/NetCDFReader.py | 4 +- IO/NetCDF/vtkMPASReader.cxx | 221 +- IO/NetCDF/vtkMPASReader.h | 48 +- IO/NetCDF/vtkNetCDFCAMReader.cxx | 40 +- IO/NetCDF/vtkNetCDFCAMReader.h | 30 +- IO/NetCDF/vtkNetCDFCFReader.cxx | 84 +- IO/NetCDF/vtkNetCDFCFReader.h | 32 +- IO/NetCDF/vtkNetCDFPOPReader.cxx | 20 +- IO/NetCDF/vtkNetCDFPOPReader.h | 20 +- IO/NetCDF/vtkNetCDFReader.cxx | 56 +- IO/NetCDF/vtkNetCDFReader.h | 26 +- IO/NetCDF/vtkSLACParticleReader.cxx | 10 +- IO/NetCDF/vtkSLACParticleReader.h | 6 +- IO/NetCDF/vtkSLACReader.cxx | 75 +- IO/NetCDF/vtkSLACReader.h | 81 +- IO/ODBC/Testing/Cxx/TestODBCDatabase.cxx | 1 - IO/ODBC/vtkIOODBC_AutoInit.cxx | 2 +- IO/ODBC/vtkODBCDatabase.cxx | 64 +- IO/ODBC/vtkODBCDatabase.h | 8 +- IO/ODBC/vtkODBCQuery.cxx | 128 +- IO/ODBC/vtkODBCQuery.h | 16 +- IO/OMF/CMakeLists.txt | 19 + IO/OMF/Testing/CMakeLists.txt | 4 + IO/OMF/Testing/Cxx/CMakeLists.txt | 5 + IO/OMF/Testing/Cxx/TestOMFReader.cxx | 140 + .../Data/Baseline/TestOMFReader.png.sha512 | 1 + IO/OMF/core/OMFElement.cxx | 619 + IO/OMF/core/OMFElement.h | 115 + IO/OMF/core/OMFFile.cxx | 397 + IO/OMF/core/OMFFile.h | 60 + IO/OMF/core/OMFHelpers.cxx | 215 + IO/OMF/core/OMFHelpers.h | 87 + IO/OMF/core/OMFProject.cxx | 286 + IO/OMF/core/OMFProject.h | 55 + IO/OMF/vtk.module | 23 + IO/OMF/vtkOMFReader.cxx | 164 + IO/OMF/vtkOMFReader.h | 115 + IO/OggTheora/Testing/CMakeLists.txt | 1 + IO/OggTheora/Testing/Cxx/CMakeLists.txt | 6 + .../Testing/Cxx/TestOggTheoraWriter.cxx | 0 IO/OggTheora/vtk.module | 7 + IO/OggTheora/vtkOggTheoraWriter.cxx | 32 +- IO/OggTheora/vtkOggTheoraWriter.h | 16 +- IO/OpenVDB/CMakeLists.txt | 18 + IO/OpenVDB/Testing/CMakeLists.txt | 3 + IO/OpenVDB/Testing/Python/CMakeLists.txt | 19 + IO/OpenVDB/Testing/Python/SaveOpenVDBFile.py | 45 + IO/OpenVDB/vtk.module | 14 + IO/OpenVDB/vtkOpenVDBWriter.cxx | 932 + IO/OpenVDB/vtkOpenVDBWriter.h | 151 + IO/PDAL/vtkPDALReader.cxx | 17 +- IO/PDAL/vtkPDALReader.h | 6 +- IO/PIO/BHTree.cxx | 18 +- IO/PIO/PIOAdaptor.cxx | 1536 +- IO/PIO/PIOAdaptor.h | 62 +- IO/PIO/PIOData.cxx | 201 +- IO/PIO/PIOData.h | 4 +- IO/PIO/Testing/Python/CMakeLists.txt | 4 +- IO/PIO/Testing/Python/TestPIOReader.py | 37 +- IO/PIO/vtkPIOReader.cxx | 158 +- IO/PIO/vtkPIOReader.h | 65 +- IO/PLY/vtkPLY.cxx | 125 +- IO/PLY/vtkPLY.h | 9 +- IO/PLY/vtkPLYReader.cxx | 2 +- IO/PLY/vtkPLYReader.h | 6 +- IO/PLY/vtkPLYWriter.cxx | 4 +- IO/PLY/vtkPLYWriter.h | 56 +- IO/Parallel/CMakeLists.txt | 2 +- IO/Parallel/Testing/Cxx/CMakeLists.txt | 12 + .../Testing/Cxx/TestPOpenFOAMReader.cxx | 188 +- .../TestPOpenFOAMReaderLagrangianSerial.cxx | 157 + ...estPOpenFOAMReaderLagrangianUncollated.cxx | 156 + IO/Parallel/vtk.module | 1 + IO/Parallel/vtkEnSightWriter.cxx | 64 +- IO/Parallel/vtkEnSightWriter.h | 52 +- IO/Parallel/vtkMultiBlockPLOT3DReader.cxx | 147 +- IO/Parallel/vtkMultiBlockPLOT3DReader.h | 112 +- .../vtkMultiBlockPLOT3DReaderInternals.cxx | 25 +- .../vtkMultiBlockPLOT3DReaderInternals.h | 14 +- IO/Parallel/vtkPChacoReader.cxx | 21 +- IO/Parallel/vtkPDataSetReader.cxx | 38 +- IO/Parallel/vtkPDataSetReader.h | 16 +- IO/Parallel/vtkPDataSetWriter.cxx | 20 +- IO/Parallel/vtkPDataSetWriter.h | 30 +- IO/Parallel/vtkPImageWriter.cxx | 16 +- IO/Parallel/vtkPImageWriter.h | 4 +- IO/Parallel/vtkPOpenFOAMReader.cxx | 481 +- IO/Parallel/vtkPOpenFOAMReader.h | 8 +- IO/Parallel/vtkPlot3DMetaReader.cxx | 36 +- IO/Parallel/vtkPlot3DMetaReader.h | 8 +- IO/ParallelExodus/vtk.module | 1 + IO/ParallelExodus/vtkPExodusIIReader.cxx | 111 +- IO/ParallelExodus/vtkPExodusIIReader.h | 34 +- IO/ParallelExodus/vtkPExodusIIWriter.cxx | 14 +- IO/ParallelExodus/vtkPExodusIIWriter.h | 2 +- IO/ParallelLSDyna/vtkPLSDynaReader.cxx | 16 +- IO/ParallelLSDyna/vtkPLSDynaReader.h | 6 +- .../Testing/Cxx/TestPNetCDFPOPReader.cxx | 2 +- IO/ParallelNetCDF/vtkPNetCDFPOPReader.cxx | 44 +- IO/ParallelNetCDF/vtkPNetCDFPOPReader.h | 18 +- IO/ParallelNetCDF/vtkPSLACReader.cxx | 58 +- IO/ParallelNetCDF/vtkPSLACReader.h | 16 +- IO/ParallelXML/CMakeLists.txt | 18 +- IO/ParallelXML/Testing/CMakeLists.txt | 6 + IO/ParallelXML/Testing/Cxx/CMakeLists.txt | 17 +- .../Cxx/TestParallelPartitionedDataSetIO.cxx | 282 + .../Cxx/TestParallelUnstructuredGridIO.cxx | 87 +- .../TestXMLReaderChangingBlocksOverTime.cxx | 50 + IO/ParallelXML/Testing/Python/CMakeLists.txt | 2 + .../Python/TestXMLPartitionedDataSet.py | 60 + .../TestXMLPartitionedDataSetCollection.py | 40 + IO/ParallelXML/vtk.module | 3 +- .../vtkXMLCompositeDataSetWriterHelper.cxx | 105 + .../vtkXMLCompositeDataSetWriterHelper.h | 89 + IO/ParallelXML/vtkXMLDataWriterHelper.cxx | 119 + IO/ParallelXML/vtkXMLDataWriterHelper.h | 110 + IO/ParallelXML/vtkXMLPDataObjectWriter.cxx | 34 +- IO/ParallelXML/vtkXMLPDataObjectWriter.h | 28 +- IO/ParallelXML/vtkXMLPDataSetWriter.cxx | 18 +- IO/ParallelXML/vtkXMLPDataWriter.cxx | 16 +- .../vtkXMLPHierarchicalBoxDataWriter.cxx | 8 +- IO/ParallelXML/vtkXMLPHyperTreeGridWriter.cxx | 26 +- IO/ParallelXML/vtkXMLPImageDataWriter.cxx | 18 +- .../vtkXMLPMultiBlockDataWriter.cxx | 22 +- IO/ParallelXML/vtkXMLPMultiBlockDataWriter.h | 16 +- .../vtkXMLPPartitionedDataSetWriter.cxx | 39 + .../vtkXMLPPartitionedDataSetWriter.h | 70 + IO/ParallelXML/vtkXMLPPolyDataWriter.cxx | 16 +- .../vtkXMLPRectilinearGridWriter.cxx | 16 +- .../vtkXMLPStructuredDataWriter.cxx | 18 +- IO/ParallelXML/vtkXMLPStructuredDataWriter.h | 2 +- .../vtkXMLPStructuredGridWriter.cxx | 18 +- IO/ParallelXML/vtkXMLPTableWriter.cxx | 26 +- .../vtkXMLPUniformGridAMRWriter.cxx | 12 +- IO/ParallelXML/vtkXMLPUniformGridAMRWriter.h | 4 +- .../vtkXMLPUnstructuredDataWriter.cxx | 12 +- .../vtkXMLPUnstructuredGridWriter.cxx | 16 +- ...kXMLPartitionedDataSetCollectionWriter.cxx | 260 + ...vtkXMLPartitionedDataSetCollectionWriter.h | 77 + .../vtkXMLPartitionedDataSetWriter.cxx | 202 + .../vtkXMLPartitionedDataSetWriter.h | 78 + IO/ParallelXML/vtkXMLWriter2.cxx | 223 + IO/ParallelXML/vtkXMLWriter2.h | 164 + IO/ParallelXdmf3/Testing/Cxx/CMakeLists.txt | 4 +- .../Testing/Cxx/TestXdmf3Parallel.cxx | 13 +- IO/ParallelXdmf3/vtkPXdmf3Writer.cxx | 16 +- .../Testing/Cxx/TestPostgreSQLDatabase.cxx | 1 - .../Cxx/TestPostgreSQLTableReadWrite.cxx | 1 - IO/PostgreSQL/vtkIOPostgreSQL_AutoInit.cxx | 2 +- IO/PostgreSQL/vtkPostgreSQLDatabase.cxx | 110 +- IO/PostgreSQL/vtkPostgreSQLDatabase.h | 30 +- IO/PostgreSQL/vtkPostgreSQLQuery.cxx | 90 +- IO/PostgreSQL/vtkPostgreSQLQuery.h | 4 +- IO/PostgreSQL/vtkPostgreSQLToTableReader.cxx | 24 +- IO/PostgreSQL/vtkTableToPostgreSQLWriter.cxx | 25 +- IO/PostgreSQL/vtkTableToPostgreSQLWriter.h | 4 +- IO/SQL/Testing/Cxx/CMakeLists.txt | 1 + IO/SQL/vtkDatabaseToTableReader.cxx | 12 +- IO/SQL/vtkRowQuery.h | 4 +- IO/SQL/vtkRowQueryToTable.h | 4 +- IO/SQL/vtkSQLDatabase.cxx | 54 +- IO/SQL/vtkSQLDatabase.h | 14 +- IO/SQL/vtkSQLDatabaseGraphSource.cxx | 12 +- IO/SQL/vtkSQLDatabaseGraphSource.h | 16 +- IO/SQL/vtkSQLDatabaseSchema.cxx | 87 +- IO/SQL/vtkSQLDatabaseSchema.h | 30 +- IO/SQL/vtkSQLDatabaseTableSource.cxx | 10 +- IO/SQL/vtkSQLDatabaseTableSource.h | 12 +- IO/SQL/vtkSQLGraphReader.h | 40 +- IO/SQL/vtkSQLQuery.cxx | 2 +- IO/SQL/vtkSQLQuery.h | 8 +- IO/SQL/vtkSQLiteDatabase.cxx | 32 +- IO/SQL/vtkSQLiteDatabase.h | 22 +- IO/SQL/vtkSQLiteQuery.cxx | 76 +- IO/SQL/vtkSQLiteQuery.h | 12 +- IO/SQL/vtkSQLiteToTableReader.cxx | 12 +- IO/SQL/vtkTableToDatabaseWriter.cxx | 12 +- IO/SQL/vtkTableToDatabaseWriter.h | 4 +- IO/SQL/vtkTableToSQLiteWriter.cxx | 18 +- IO/SQL/vtkTableToSQLiteWriter.h | 4 +- IO/SegY/CMakeLists.txt | 16 +- IO/SegY/vtkSegYIOUtils.cxx | 30 +- IO/SegY/vtkSegYReader.cxx | 20 +- IO/SegY/vtkSegYReader.h | 24 +- IO/SegY/vtkSegYReaderInternal.cxx | 20 +- IO/SegY/vtkSegYTraceReader.cxx | 14 +- IO/TRUCHAS/vtkTRUCHASReader.cxx | 49 +- IO/TRUCHAS/vtkTRUCHASReader.h | 22 +- IO/TecplotTable/vtkTecplotTableReader.cxx | 19 +- IO/TecplotTable/vtkTecplotTableReader.h | 36 +- IO/VPIC/vtkVPICReader.cxx | 59 +- IO/VPIC/vtkVPICReader.h | 24 +- IO/VeraOut/vtkVeraOutReader.cxx | 48 +- IO/VeraOut/vtkVeraOutReader.h | 6 +- IO/Video/CMakeLists.txt | 41 +- IO/Video/vtkIOVideoConfigure.h.in | 26 + IO/Video/vtkMILVideoSource.cxx | 1148 - IO/Video/vtkMILVideoSource.h | 322 - {CMake => IO/Video}/vtkTestvfw32Capture.cxx | 0 IO/Video/vtkVideoSource.cxx | 104 +- IO/Video/vtkVideoSource.h | 77 +- IO/Video/vtkWin32VideoSource.cxx | 79 +- IO/Video/vtkWin32VideoSource.h | 12 +- IO/XML/CMakeLists.txt | 3 +- IO/XML/Testing/CMakeLists.txt | 11 +- IO/XML/Testing/Cxx/CMakeLists.txt | 13 + IO/XML/Testing/Cxx/TestAMRXMLIO.cxx | 83 + IO/XML/Testing/Cxx/TestDataObjectXMLIO.cxx | 31 +- .../Cxx/TestSettingTimeArrayInReader.cxx | 86 + .../Testing/Cxx/TestXMLHyperTreeGridIO2.cxx | 398 + .../Cxx/TestXMLHyperTreeGridIOReduction.cxx | 168 + .../Cxx/TestXMLLegacyFileReadIdTypeArrays.cxx | 65 + .../Cxx/TestXMLMappedUnstructuredGridIO.cxx | 22 +- .../Testing/Cxx/TestXMLPieceDistribution.cxx | 108 + .../Cxx/TestXMLUnstructuredGridReader.cxx | 96 +- .../TestXMLWriterWithDataArrayFallback.cxx | 2 +- .../TestXMLPieceDistribution.png.sha512 | 1 + IO/XML/Testing/Python/CMakeLists.txt | 4 +- IO/XML/Testing/Python/TestEmptyXML.py | 3 + ...iteRandomHyperTreeGridAppendBinaryMode1.py | 17 + ...eadRandomHyperTreeGridAppendBinaryMode1.py | 24 + IO/XML/Testing/Python/TestXMLHyperTreeGrid.py | 12 +- .../Python/TestXMLPartitionedDataSet.py | 58 - .../TestXMLPartitionedDataSetCollection.py | 66 - IO/XML/vtkRTXMLPolyDataReader.cxx | 24 +- IO/XML/vtkRTXMLPolyDataReader.h | 14 +- IO/XML/vtkXMLCompositeDataReader.cxx | 204 +- IO/XML/vtkXMLCompositeDataReader.h | 46 +- IO/XML/vtkXMLCompositeDataWriter.cxx | 72 +- IO/XML/vtkXMLCompositeDataWriter.h | 12 +- IO/XML/vtkXMLDataObjectWriter.cxx | 22 +- IO/XML/vtkXMLDataReader.cxx | 53 +- IO/XML/vtkXMLDataReader.h | 1 + IO/XML/vtkXMLDataSetWriter.cxx | 12 +- IO/XML/vtkXMLDataSetWriter.h | 1 + IO/XML/vtkXMLFileReadTester.cxx | 12 +- IO/XML/vtkXMLFileReadTester.h | 8 +- IO/XML/vtkXMLGenericDataObjectReader.cxx | 195 +- IO/XML/vtkXMLGenericDataObjectReader.h | 17 +- ...vtkXMLHierarchicalBoxDataFileConverter.cxx | 20 +- .../vtkXMLHierarchicalBoxDataFileConverter.h | 18 +- IO/XML/vtkXMLHierarchicalBoxDataReader.cxx | 6 +- IO/XML/vtkXMLHierarchicalBoxDataWriter.cxx | 6 +- IO/XML/vtkXMLHierarchicalDataReader.cxx | 6 +- IO/XML/vtkXMLHyperTreeGridReader.cxx | 606 +- IO/XML/vtkXMLHyperTreeGridReader.h | 44 +- IO/XML/vtkXMLHyperTreeGridWriter.cxx | 470 +- IO/XML/vtkXMLHyperTreeGridWriter.h | 45 +- IO/XML/vtkXMLImageDataReader.cxx | 22 +- IO/XML/vtkXMLImageDataReader.h | 4 +- IO/XML/vtkXMLImageDataWriter.cxx | 18 +- IO/XML/vtkXMLMultiBlockDataReader.cxx | 68 +- IO/XML/vtkXMLMultiBlockDataReader.h | 2 + IO/XML/vtkXMLMultiBlockDataWriter.cxx | 10 +- IO/XML/vtkXMLMultiGroupDataReader.cxx | 6 +- IO/XML/vtkXMLPDataObjectReader.cxx | 22 +- IO/XML/vtkXMLPDataObjectReader.h | 12 +- IO/XML/vtkXMLPDataReader.cxx | 65 +- IO/XML/vtkXMLPDataReader.h | 6 +- IO/XML/vtkXMLPHyperTreeGridReader.cxx | 78 +- IO/XML/vtkXMLPHyperTreeGridReader.h | 4 +- IO/XML/vtkXMLPImageDataReader.cxx | 30 +- IO/XML/vtkXMLPImageDataReader.h | 4 +- IO/XML/vtkXMLPPolyDataReader.cxx | 42 +- IO/XML/vtkXMLPPolyDataReader.h | 7 +- IO/XML/vtkXMLPRectilinearGridReader.cxx | 30 +- IO/XML/vtkXMLPRectilinearGridReader.h | 4 +- IO/XML/vtkXMLPStructuredDataReader.cxx | 44 +- IO/XML/vtkXMLPStructuredDataReader.h | 7 +- IO/XML/vtkXMLPStructuredGridReader.cxx | 30 +- IO/XML/vtkXMLPTableReader.cxx | 70 +- IO/XML/vtkXMLPTableReader.h | 8 +- IO/XML/vtkXMLPUnstructuredDataReader.cxx | 60 +- IO/XML/vtkXMLPUnstructuredDataReader.h | 3 +- IO/XML/vtkXMLPUnstructuredGridReader.cxx | 46 +- IO/XML/vtkXMLPUnstructuredGridReader.h | 7 +- ...kXMLPartitionedDataSetCollectionReader.cxx | 70 +- ...kXMLPartitionedDataSetCollectionWriter.cxx | 108 - ...vtkXMLPartitionedDataSetCollectionWriter.h | 58 - IO/XML/vtkXMLPartitionedDataSetReader.cxx | 20 +- IO/XML/vtkXMLPartitionedDataSetWriter.cxx | 90 - IO/XML/vtkXMLPartitionedDataSetWriter.h | 57 - IO/XML/vtkXMLPolyDataReader.cxx | 42 +- IO/XML/vtkXMLPolyDataReader.h | 8 +- IO/XML/vtkXMLPolyDataWriter.cxx | 32 +- IO/XML/vtkXMLReader.cxx | 329 +- IO/XML/vtkXMLReader.h | 105 +- IO/XML/vtkXMLRectilinearGridReader.cxx | 28 +- IO/XML/vtkXMLRectilinearGridReader.h | 4 +- IO/XML/vtkXMLRectilinearGridWriter.cxx | 28 +- IO/XML/vtkXMLStructuredDataReader.cxx | 36 +- IO/XML/vtkXMLStructuredDataReader.h | 4 +- IO/XML/vtkXMLStructuredDataWriter.cxx | 38 +- IO/XML/vtkXMLStructuredDataWriter.h | 16 +- IO/XML/vtkXMLStructuredGridReader.cxx | 24 +- IO/XML/vtkXMLStructuredGridReader.h | 4 +- IO/XML/vtkXMLStructuredGridWriter.cxx | 28 +- IO/XML/vtkXMLTableReader.cxx | 52 +- IO/XML/vtkXMLTableReader.h | 4 +- IO/XML/vtkXMLTableWriter.cxx | 46 +- IO/XML/vtkXMLTableWriter.h | 8 +- IO/XML/vtkXMLUniformGridAMRReader.cxx | 56 +- IO/XML/vtkXMLUniformGridAMRReader.h | 7 +- IO/XML/vtkXMLUniformGridAMRWriter.cxx | 10 +- IO/XML/vtkXMLUnstructuredDataReader.cxx | 107 +- IO/XML/vtkXMLUnstructuredDataWriter.cxx | 84 +- IO/XML/vtkXMLUnstructuredDataWriter.h | 12 +- IO/XML/vtkXMLUnstructuredGridReader.cxx | 34 +- IO/XML/vtkXMLUnstructuredGridReader.h | 4 +- IO/XML/vtkXMLUnstructuredGridWriter.cxx | 32 +- IO/XML/vtkXMLWriter.cxx | 517 +- IO/XML/vtkXMLWriter.h | 234 +- IO/XML/vtkXMLWriterBase.cxx | 273 + IO/XML/vtkXMLWriterBase.h | 278 + IO/XML/vtkXMLWriterC.cxx | 6 +- IO/XMLParser/vtkXMLDataHeaderPrivate.h | 2 +- IO/XMLParser/vtkXMLDataParser.cxx | 93 +- IO/XMLParser/vtkXMLDataParser.h | 16 +- IO/XMLParser/vtkXMLParser.cxx | 58 +- IO/XMLParser/vtkXMLParser.h | 32 +- IO/XMLParser/vtkXMLUtilities.cxx | 35 +- IO/XMLParser/vtkXMLUtilities.h | 19 +- .../Cxx/TestTemporalXdmfReaderWriter.cxx | 4 +- IO/Xdmf2/Testing/Cxx/XdmfTestVTKIO.cxx | 3 +- IO/Xdmf2/vtkSILBuilder.cxx | 22 +- IO/Xdmf2/vtkSILBuilder.h | 12 +- IO/Xdmf2/vtkXdmfDataArray.cxx | 46 +- IO/Xdmf2/vtkXdmfHeavyData.cxx | 83 +- IO/Xdmf2/vtkXdmfHeavyData.h | 4 +- IO/Xdmf2/vtkXdmfReader.cxx | 116 +- IO/Xdmf2/vtkXdmfReader.h | 57 +- IO/Xdmf2/vtkXdmfReaderInternal.cxx | 74 +- IO/Xdmf2/vtkXdmfReaderInternal.h | 22 +- IO/Xdmf2/vtkXdmfWriter.cxx | 46 +- IO/Xdmf2/vtkXdmfWriter.h | 36 +- IO/Xdmf3/vtkXdmf3ArraySelection.cxx | 14 +- IO/Xdmf3/vtkXdmf3ArraySelection.h | 4 +- IO/Xdmf3/vtkXdmf3DataSet.cxx | 62 +- IO/Xdmf3/vtkXdmf3DataSet.h | 8 +- IO/Xdmf3/vtkXdmf3LightDataHandler.h | 4 +- IO/Xdmf3/vtkXdmf3Reader.cxx | 90 +- IO/Xdmf3/vtkXdmf3Reader.h | 41 +- IO/Xdmf3/vtkXdmf3SILBuilder.h | 8 +- IO/Xdmf3/vtkXdmf3Writer.cxx | 39 +- IO/Xdmf3/vtkXdmf3Writer.h | 22 +- Imaging/Color/vtkImageHSIToRGB.cxx | 6 +- Imaging/Color/vtkImageHSIToRGB.h | 6 +- Imaging/Color/vtkImageHSVToRGB.cxx | 6 +- Imaging/Color/vtkImageHSVToRGB.h | 6 +- Imaging/Color/vtkImageLuminance.cxx | 14 +- Imaging/Color/vtkImageLuminance.h | 5 +- Imaging/Color/vtkImageMapToRGBA.cxx | 5 + Imaging/Color/vtkImageMapToRGBA.h | 7 +- .../Color/vtkImageMapToWindowLevelColors.cxx | 11 +- .../Color/vtkImageMapToWindowLevelColors.h | 10 +- Imaging/Color/vtkImageQuantizeRGBToIndex.cxx | 2 +- Imaging/Color/vtkImageQuantizeRGBToIndex.h | 16 +- Imaging/Color/vtkImageRGBToHSI.cxx | 6 +- Imaging/Color/vtkImageRGBToHSI.h | 6 +- Imaging/Color/vtkImageRGBToHSV.cxx | 6 +- Imaging/Color/vtkImageRGBToHSV.h | 2 +- Imaging/Color/vtkImageRGBToYIQ.cxx | 6 +- Imaging/Color/vtkImageRGBToYIQ.h | 2 +- Imaging/Color/vtkImageYIQToRGB.cxx | 6 +- Imaging/Color/vtkImageYIQToRGB.h | 2 +- Imaging/Core/CMakeLists.txt | 3 +- Imaging/Core/Testing/Cxx/CMakeLists.txt | 1 + ...ImageGenericInterpolateSlidingWindow3D.cxx | 125 + .../Testing/Cxx/ImageHistogramStatistics.cxx | 86 +- .../Core/Testing/Cxx/TestImageStencilData.cxx | 6 +- .../Cxx/TestImageStencilDataMethods.cxx | 2 +- .../Testing/Cxx/TestImageStencilIterator.cxx | 10 +- ...nericInterpolateSlidingWindow3D.png.sha512 | 1 + Imaging/Core/vtkAbstractImageInterpolator.cxx | 99 +- Imaging/Core/vtkAbstractImageInterpolator.h | 55 +- Imaging/Core/vtkExtractVOI.cxx | 19 +- Imaging/Core/vtkExtractVOI.h | 12 +- Imaging/Core/vtkGenericImageInterpolator.cxx | 981 + Imaging/Core/vtkGenericImageInterpolator.h | 77 + Imaging/Core/vtkImageAppendComponents.cxx | 20 +- Imaging/Core/vtkImageAppendComponents.h | 15 +- Imaging/Core/vtkImageBSplineCoefficients.cxx | 30 +- Imaging/Core/vtkImageBSplineCoefficients.h | 20 +- Imaging/Core/vtkImageBSplineInternals.h | 12 +- Imaging/Core/vtkImageBSplineInterpolator.cxx | 60 +- Imaging/Core/vtkImageBSplineInterpolator.h | 18 +- Imaging/Core/vtkImageBlend.cxx | 44 +- Imaging/Core/vtkImageBlend.h | 30 +- Imaging/Core/vtkImageCacheFilter.cxx | 14 +- Imaging/Core/vtkImageCacheFilter.h | 4 +- Imaging/Core/vtkImageCast.cxx | 12 +- Imaging/Core/vtkImageCast.h | 10 +- Imaging/Core/vtkImageChangeInformation.cxx | 12 +- Imaging/Core/vtkImageChangeInformation.h | 36 +- Imaging/Core/vtkImageClip.cxx | 16 +- Imaging/Core/vtkImageClip.h | 10 +- Imaging/Core/vtkImageConstantPad.cxx | 6 +- Imaging/Core/vtkImageConstantPad.h | 6 +- Imaging/Core/vtkImageDataStreamer.cxx | 6 +- Imaging/Core/vtkImageDataStreamer.h | 8 +- Imaging/Core/vtkImageDecomposeFilter.cxx | 10 +- Imaging/Core/vtkImageDecomposeFilter.h | 14 +- Imaging/Core/vtkImageDifference.cxx | 18 +- Imaging/Core/vtkImageDifference.h | 24 +- Imaging/Core/vtkImageExtractComponents.cxx | 14 +- Imaging/Core/vtkImageExtractComponents.h | 10 +- Imaging/Core/vtkImageFlip.cxx | 6 +- Imaging/Core/vtkImageFlip.h | 14 +- Imaging/Core/vtkImageInterpolator.cxx | 64 +- Imaging/Core/vtkImageInterpolator.h | 18 +- Imaging/Core/vtkImageInterpolatorInternals.h | 111 +- Imaging/Core/vtkImageIterateFilter.cxx | 20 +- Imaging/Core/vtkImageIterateFilter.h | 4 +- Imaging/Core/vtkImageMagnify.cxx | 10 +- Imaging/Core/vtkImageMagnify.h | 10 +- Imaging/Core/vtkImageMapToColors.cxx | 16 +- Imaging/Core/vtkImageMapToColors.h | 22 +- Imaging/Core/vtkImageMask.cxx | 16 +- Imaging/Core/vtkImageMask.h | 10 +- Imaging/Core/vtkImageMirrorPad.cxx | 12 +- Imaging/Core/vtkImageMirrorPad.h | 7 +- Imaging/Core/vtkImagePadFilter.cxx | 12 +- Imaging/Core/vtkImagePadFilter.h | 12 +- Imaging/Core/vtkImagePermute.h | 6 +- Imaging/Core/vtkImagePointDataIterator.cxx | 16 +- Imaging/Core/vtkImagePointDataIterator.h | 4 +- Imaging/Core/vtkImagePointIterator.cxx | 6 +- Imaging/Core/vtkImagePointIterator.h | 20 +- Imaging/Core/vtkImageProbeFilter.h | 8 +- Imaging/Core/vtkImageResample.cxx | 16 +- Imaging/Core/vtkImageResample.h | 14 +- Imaging/Core/vtkImageResize.cxx | 32 +- Imaging/Core/vtkImageResize.h | 36 +- Imaging/Core/vtkImageReslice.cxx | 140 +- Imaging/Core/vtkImageReslice.h | 124 +- Imaging/Core/vtkImageResliceToColors.cxx | 14 +- Imaging/Core/vtkImageResliceToColors.h | 8 +- Imaging/Core/vtkImageShiftScale.cxx | 14 +- Imaging/Core/vtkImageShiftScale.h | 16 +- Imaging/Core/vtkImageShrink3D.cxx | 12 +- Imaging/Core/vtkImageShrink3D.h | 14 +- Imaging/Core/vtkImageSincInterpolator.cxx | 80 +- Imaging/Core/vtkImageSincInterpolator.h | 20 +- Imaging/Core/vtkImageStencilAlgorithm.cxx | 22 +- Imaging/Core/vtkImageStencilAlgorithm.h | 4 +- Imaging/Core/vtkImageStencilData.cxx | 85 +- Imaging/Core/vtkImageStencilData.h | 40 +- Imaging/Core/vtkImageStencilIterator.h | 20 +- Imaging/Core/vtkImageStencilSource.cxx | 10 +- Imaging/Core/vtkImageStencilSource.h | 16 +- Imaging/Core/vtkImageThreshold.cxx | 22 +- Imaging/Core/vtkImageThreshold.h | 28 +- Imaging/Core/vtkImageTranslateExtent.cxx | 10 +- Imaging/Core/vtkImageTranslateExtent.h | 6 +- Imaging/Core/vtkImageWrapPad.cxx | 12 +- Imaging/Core/vtkImageWrapPad.h | 9 +- Imaging/Core/vtkRTAnalyticSource.cxx | 16 +- Imaging/Core/vtkRTAnalyticSource.h | 48 +- Imaging/Fourier/CMakeLists.txt | 3 +- .../Fourier/vtkImageButterworthHighPass.cxx | 10 +- Imaging/Fourier/vtkImageButterworthHighPass.h | 16 +- .../Fourier/vtkImageButterworthLowPass.cxx | 10 +- Imaging/Fourier/vtkImageButterworthLowPass.h | 16 +- Imaging/Fourier/vtkImageFFT.cxx | 16 +- Imaging/Fourier/vtkImageFFT.h | 7 +- Imaging/Fourier/vtkImageFourierCenter.cxx | 12 +- Imaging/Fourier/vtkImageFourierCenter.h | 5 +- Imaging/Fourier/vtkImageFourierFilter.cxx | 18 +- Imaging/Fourier/vtkImageFourierFilter.h | 20 +- Imaging/Fourier/vtkImageIdealHighPass.cxx | 10 +- Imaging/Fourier/vtkImageIdealHighPass.h | 12 +- Imaging/Fourier/vtkImageIdealLowPass.cxx | 10 +- Imaging/Fourier/vtkImageIdealLowPass.h | 12 +- Imaging/Fourier/vtkImageRFFT.cxx | 14 +- Imaging/Fourier/vtkImageRFFT.h | 7 +- Imaging/Fourier/vtkTableFFT.cxx | 113 - Imaging/Fourier/vtkTableFFT.h | 70 - Imaging/General/CMakeLists.txt | 6 +- .../vtkImageAnisotropicDiffusion2D.cxx | 10 +- .../General/vtkImageAnisotropicDiffusion2D.h | 24 +- .../vtkImageAnisotropicDiffusion3D.cxx | 10 +- .../General/vtkImageAnisotropicDiffusion3D.h | 26 +- Imaging/General/vtkImageCheckerboard.cxx | 6 +- Imaging/General/vtkImageCheckerboard.h | 8 +- Imaging/General/vtkImageCityBlockDistance.cxx | 14 +- Imaging/General/vtkImageCityBlockDistance.h | 5 +- Imaging/General/vtkImageConvolve.cxx | 52 +- Imaging/General/vtkImageConvolve.h | 20 +- Imaging/General/vtkImageCorrelation.cxx | 10 +- Imaging/General/vtkImageCorrelation.h | 8 +- Imaging/General/vtkImageEuclideanDistance.cxx | 20 +- Imaging/General/vtkImageEuclideanDistance.h | 20 +- Imaging/General/vtkImageEuclideanToPolar.cxx | 6 +- Imaging/General/vtkImageEuclideanToPolar.h | 6 +- Imaging/General/vtkImageGaussianSmooth.cxx | 20 +- Imaging/General/vtkImageGaussianSmooth.h | 12 +- Imaging/General/vtkImageGradient.cxx | 12 +- Imaging/General/vtkImageGradient.h | 10 +- Imaging/General/vtkImageGradientMagnitude.cxx | 12 +- Imaging/General/vtkImageGradientMagnitude.h | 12 +- Imaging/General/vtkImageHybridMedian2D.cxx | 8 +- Imaging/General/vtkImageHybridMedian2D.h | 4 +- Imaging/General/vtkImageLaplacian.cxx | 10 +- Imaging/General/vtkImageLaplacian.h | 6 +- Imaging/General/vtkImageMedian3D.cxx | 14 +- Imaging/General/vtkImageMedian3D.h | 6 +- Imaging/General/vtkImageNormalize.cxx | 14 +- Imaging/General/vtkImageNormalize.h | 7 +- Imaging/General/vtkImageRange3D.cxx | 16 +- Imaging/General/vtkImageRange3D.h | 2 +- .../General/vtkImageSeparableConvolution.cxx | 10 +- Imaging/General/vtkImageSlab.cxx | 20 +- Imaging/General/vtkImageSlab.h | 24 +- Imaging/General/vtkImageSlabReslice.cxx | 8 +- Imaging/General/vtkImageSlabReslice.h | 16 +- Imaging/General/vtkImageSobel2D.cxx | 10 +- Imaging/General/vtkImageSobel2D.h | 2 +- Imaging/General/vtkImageSobel3D.cxx | 10 +- Imaging/General/vtkImageSobel3D.h | 2 +- Imaging/General/vtkImageSpatialAlgorithm.cxx | 12 +- Imaging/General/vtkImageSpatialAlgorithm.h | 10 +- Imaging/General/vtkImageVariance3D.cxx | 16 +- Imaging/General/vtkImageVariance3D.h | 2 +- .../General/vtkSimpleImageFilterExample.cxx | 9 + Imaging/General/vtkSimpleImageFilterExample.h | 9 +- Imaging/Hybrid/vtkBooleanTexture.cxx | 2 +- Imaging/Hybrid/vtkBooleanTexture.h | 50 +- Imaging/Hybrid/vtkCheckerboardSplatter.cxx | 26 +- Imaging/Hybrid/vtkCheckerboardSplatter.h | 66 +- Imaging/Hybrid/vtkFastSplatter.cxx | 14 +- Imaging/Hybrid/vtkFastSplatter.h | 20 +- Imaging/Hybrid/vtkGaussianSplatter.cxx | 26 +- Imaging/Hybrid/vtkGaussianSplatter.h | 62 +- Imaging/Hybrid/vtkImageCursor3D.cxx | 6 +- Imaging/Hybrid/vtkImageCursor3D.h | 14 +- Imaging/Hybrid/vtkImageRectilinearWipe.cxx | 8 +- Imaging/Hybrid/vtkImageRectilinearWipe.h | 16 +- Imaging/Hybrid/vtkImageToPoints.cxx | 26 +- Imaging/Hybrid/vtkImageToPoints.h | 8 +- Imaging/Hybrid/vtkPointLoad.cxx | 7 + Imaging/Hybrid/vtkPointLoad.h | 34 +- Imaging/Hybrid/vtkSampleFunction.cxx | 28 +- Imaging/Hybrid/vtkSampleFunction.h | 38 +- Imaging/Hybrid/vtkShepardMethod.cxx | 18 +- Imaging/Hybrid/vtkShepardMethod.h | 28 +- Imaging/Hybrid/vtkSliceCubes.h | 24 +- .../Hybrid/vtkSurfaceReconstructionFilter.cxx | 6 +- .../Hybrid/vtkSurfaceReconstructionFilter.h | 10 +- Imaging/Hybrid/vtkTriangularTexture.cxx | 2 +- Imaging/Hybrid/vtkTriangularTexture.h | 18 +- Imaging/Hybrid/vtkVoxelModeller.h | 24 +- Imaging/Math/vtkImageDivergence.cxx | 13 +- Imaging/Math/vtkImageDivergence.h | 5 +- Imaging/Math/vtkImageDotProduct.cxx | 14 +- Imaging/Math/vtkImageDotProduct.h | 7 +- Imaging/Math/vtkImageLogarithmicScale.cxx | 6 +- Imaging/Math/vtkImageLogarithmicScale.h | 6 +- Imaging/Math/vtkImageLogic.cxx | 12 +- Imaging/Math/vtkImageLogic.h | 10 +- Imaging/Math/vtkImageMagnitude.cxx | 12 +- Imaging/Math/vtkImageMagnitude.h | 9 +- Imaging/Math/vtkImageMaskBits.cxx | 4 +- Imaging/Math/vtkImageMaskBits.h | 10 +- Imaging/Math/vtkImageMathematics.cxx | 16 +- Imaging/Math/vtkImageMathematics.h | 20 +- Imaging/Math/vtkImageWeightedSum.cxx | 18 +- Imaging/Math/vtkImageWeightedSum.h | 8 +- Imaging/Morphological/CMakeLists.txt | 2 +- .../vtkImageConnectivityFilter.cxx | 79 +- .../vtkImageConnectivityFilter.h | 40 +- Imaging/Morphological/vtkImageConnector.cxx | 16 +- Imaging/Morphological/vtkImageConnector.h | 4 +- .../vtkImageContinuousDilate3D.cxx | 14 +- .../vtkImageContinuousDilate3D.h | 6 +- .../vtkImageContinuousErode3D.cxx | 14 +- .../Morphological/vtkImageContinuousErode3D.h | 6 +- .../Morphological/vtkImageDilateErode3D.cxx | 14 +- Imaging/Morphological/vtkImageDilateErode3D.h | 10 +- .../Morphological/vtkImageIslandRemoval2D.cxx | 8 +- .../Morphological/vtkImageIslandRemoval2D.h | 27 +- .../vtkImageNonMaximumSuppression.cxx | 10 +- .../vtkImageNonMaximumSuppression.h | 16 +- Imaging/Morphological/vtkImageOpenClose3D.cxx | 32 +- Imaging/Morphological/vtkImageOpenClose3D.h | 20 +- .../vtkImageSeedConnectivity.cxx | 16 +- .../Morphological/vtkImageSeedConnectivity.h | 24 +- Imaging/Morphological/vtkImageSkeleton2D.cxx | 10 +- Imaging/Morphological/vtkImageSkeleton2D.h | 6 +- .../vtkImageThresholdConnectivity.cxx | 43 +- .../vtkImageThresholdConnectivity.h | 48 +- Imaging/OpenGL2/vtkOpenGLImageGradient.cxx | 18 +- Imaging/Sources/vtkImageCanvasSource2D.cxx | 62 +- Imaging/Sources/vtkImageCanvasSource2D.h | 28 +- Imaging/Sources/vtkImageEllipsoidSource.cxx | 16 +- Imaging/Sources/vtkImageEllipsoidSource.h | 24 +- Imaging/Sources/vtkImageGaussianSource.cxx | 8 +- Imaging/Sources/vtkImageGaussianSource.h | 14 +- Imaging/Sources/vtkImageGridSource.cxx | 10 +- Imaging/Sources/vtkImageGridSource.h | 34 +- Imaging/Sources/vtkImageMandelbrotSource.cxx | 30 +- Imaging/Sources/vtkImageMandelbrotSource.h | 36 +- Imaging/Sources/vtkImageNoiseSource.cxx | 6 +- Imaging/Sources/vtkImageNoiseSource.h | 10 +- Imaging/Sources/vtkImageSinusoidSource.cxx | 10 +- Imaging/Sources/vtkImageSinusoidSource.h | 18 +- Imaging/Statistics/vtkImageAccumulate.cxx | 26 +- Imaging/Statistics/vtkImageAccumulate.h | 28 +- Imaging/Statistics/vtkImageHistogram.cxx | 62 +- Imaging/Statistics/vtkImageHistogram.h | 40 +- .../vtkImageHistogramStatistics.cxx | 8 +- .../Statistics/vtkImageHistogramStatistics.h | 12 +- Imaging/Stencil/vtkImageStencil.cxx | 28 +- Imaging/Stencil/vtkImageStencil.h | 20 +- Imaging/Stencil/vtkImageStencilToImage.cxx | 14 +- Imaging/Stencil/vtkImageStencilToImage.h | 12 +- Imaging/Stencil/vtkImageToImageStencil.cxx | 24 +- Imaging/Stencil/vtkImageToImageStencil.h | 8 +- .../vtkImplicitFunctionToImageStencil.cxx | 10 +- .../vtkImplicitFunctionToImageStencil.h | 8 +- Imaging/Stencil/vtkLassoStencilSource.cxx | 34 +- Imaging/Stencil/vtkLassoStencilSource.h | 16 +- Imaging/Stencil/vtkPolyDataToImageStencil.cxx | 27 +- Imaging/Stencil/vtkPolyDataToImageStencil.h | 8 +- Imaging/Stencil/vtkROIStencilSource.cxx | 24 +- Imaging/Stencil/vtkROIStencilSource.h | 8 +- .../Testing/Cxx/TestVariantSerialization.cxx | 9 +- Infovis/Boost/vtkVariantBoostSerialization.h | 20 +- .../Testing/Cxx/BoostArrayLogWeighting.cxx | 1 + .../Cxx/BoostArrayRandomSparseArraySource.cxx | 1 + .../Cxx/TestBoostDividedEdgeBundling.cxx | 26 +- .../vtkBoostBetweennessClustering.cxx | 31 +- .../vtkBoostBetweennessClustering.h | 20 +- .../vtkBoostBiconnectedComponents.cxx | 6 +- .../vtkBoostBiconnectedComponents.h | 4 +- .../vtkBoostBrandesCentrality.cxx | 10 +- .../vtkBoostBrandesCentrality.h | 8 +- .../vtkBoostBreadthFirstSearch.cxx | 18 +- .../vtkBoostBreadthFirstSearch.h | 30 +- .../vtkBoostBreadthFirstSearchTree.cxx | 4 +- .../vtkBoostBreadthFirstSearchTree.h | 12 +- .../vtkBoostConnectedComponents.cxx | 4 +- .../vtkBoostDividedEdgeBundling.cxx | 24 +- .../vtkBoostDividedEdgeBundling.h | 2 +- .../vtkBoostExtractLargestComponent.h | 6 +- .../vtkBoostKruskalMinimumSpanningTree.cxx | 12 +- .../vtkBoostKruskalMinimumSpanningTree.h | 12 +- .../vtkBoostLogWeighting.cxx | 3 +- .../vtkBoostLogWeighting.h | 8 +- .../vtkBoostPrimMinimumSpanningTree.cxx | 18 +- .../vtkBoostPrimMinimumSpanningTree.h | 16 +- .../vtkBoostRandomSparseArraySource.cxx | 17 +- .../vtkBoostRandomSparseArraySource.h | 24 +- .../vtkBoostSplitTableField.cxx | 2 +- .../Testing/Cxx/ArrayDotProductSimilarity.cxx | 6 +- .../Testing/Cxx/ArraySparseArrayToTable.cxx | 3 +- Infovis/Core/Testing/Cxx/ArrayToTable.cxx | 6 +- .../Core/Testing/Cxx/ArrayTransposeMatrix.cxx | 3 +- Infovis/Core/Testing/Cxx/CMakeLists.txt | 2 +- Infovis/Core/Testing/Cxx/TestArrayNorm.cxx | 1 + .../Cxx/TestCollapseVerticesByArray.cxx | 4 +- .../Testing/Cxx/TestContinuousScatterPlot.cxx | 3 +- .../Testing/Cxx/TestExtractSelectedTree.cxx | 4 +- .../Core/Testing/Cxx/TestPruneTreeFilter.cxx | 2 +- Infovis/Core/Testing/Cxx/TestReduceTable.cxx | 2 +- Infovis/Core/Testing/Cxx/TestTableToArray.cxx | 1 + .../Testing/Cxx/TestTreeDifferenceFilter.cxx | 2 +- .../Core/Testing/Cxx/UnitTestWordCloud.cxx | 4 +- Infovis/Core/vtkAddMembershipArray.cxx | 10 +- Infovis/Core/vtkAddMembershipArray.h | 8 +- .../Core/vtkAdjacencyMatrixToEdgeTable.cxx | 12 +- Infovis/Core/vtkAdjacencyMatrixToEdgeTable.h | 16 +- Infovis/Core/vtkArrayNorm.cxx | 2 + Infovis/Core/vtkArrayNorm.h | 20 +- Infovis/Core/vtkArrayToTable.cxx | 13 +- Infovis/Core/vtkCollapseVerticesByArray.cxx | 13 +- Infovis/Core/vtkCollapseVerticesByArray.h | 28 +- Infovis/Core/vtkContinuousScatterplot.cxx | 28 +- Infovis/Core/vtkContinuousScatterplot.h | 8 +- Infovis/Core/vtkDataObjectToTable.cxx | 10 +- Infovis/Core/vtkDataObjectToTable.h | 4 +- Infovis/Core/vtkDotProductSimilarity.cxx | 14 +- Infovis/Core/vtkDotProductSimilarity.h | 36 +- Infovis/Core/vtkEdgeCenters.h | 6 +- Infovis/Core/vtkExpandSelectedGraph.h | 16 +- Infovis/Core/vtkExtractSelectedGraph.cxx | 16 +- Infovis/Core/vtkExtractSelectedGraph.h | 4 +- Infovis/Core/vtkExtractSelectedTree.cxx | 8 +- Infovis/Core/vtkGenerateIndexArray.h | 16 +- .../Core/vtkGraphHierarchicalBundleEdges.h | 10 +- Infovis/Core/vtkGroupLeafVertices.cxx | 23 +- Infovis/Core/vtkGroupLeafVertices.h | 4 +- Infovis/Core/vtkKCoreDecomposition.cxx | 6 +- Infovis/Core/vtkKCoreDecomposition.h | 16 +- Infovis/Core/vtkMergeColumns.cxx | 3 + Infovis/Core/vtkMergeColumns.h | 4 +- Infovis/Core/vtkMergeGraphs.cxx | 16 +- Infovis/Core/vtkMergeGraphs.h | 12 +- Infovis/Core/vtkMergeTables.cxx | 8 +- Infovis/Core/vtkMergeTables.h | 16 +- Infovis/Core/vtkMutableGraphHelper.cxx | 24 +- Infovis/Core/vtkMutableGraphHelper.h | 4 +- Infovis/Core/vtkNetworkHierarchy.cxx | 2 +- Infovis/Core/vtkNetworkHierarchy.h | 4 +- Infovis/Core/vtkPipelineGraphSource.cxx | 11 +- Infovis/Core/vtkPipelineGraphSource.h | 8 +- Infovis/Core/vtkPruneTreeFilter.cxx | 8 +- Infovis/Core/vtkPruneTreeFilter.h | 8 +- Infovis/Core/vtkRandomGraphSource.cxx | 18 +- Infovis/Core/vtkRandomGraphSource.h | 56 +- Infovis/Core/vtkReduceTable.cxx | 28 +- Infovis/Core/vtkReduceTable.h | 14 +- Infovis/Core/vtkRemoveIsolatedVertices.cxx | 8 +- Infovis/Core/vtkSparseArrayToTable.cxx | 10 +- Infovis/Core/vtkSparseArrayToTable.h | 4 +- Infovis/Core/vtkStreamGraph.cxx | 8 +- Infovis/Core/vtkStreamGraph.h | 12 +- Infovis/Core/vtkStringToCategory.cxx | 6 +- Infovis/Core/vtkStringToCategory.h | 4 +- Infovis/Core/vtkStringToNumeric.cxx | 7 +- Infovis/Core/vtkStringToNumeric.h | 28 +- Infovis/Core/vtkTableToArray.cxx | 17 +- Infovis/Core/vtkTableToGraph.cxx | 50 +- Infovis/Core/vtkTableToGraph.h | 8 +- Infovis/Core/vtkTableToSparseArray.cxx | 13 +- Infovis/Core/vtkTableToSparseArray.h | 14 +- Infovis/Core/vtkThresholdGraph.cxx | 16 +- Infovis/Core/vtkThresholdGraph.h | 8 +- Infovis/Core/vtkThresholdTable.h | 12 +- Infovis/Core/vtkTransferAttributes.cxx | 4 +- Infovis/Core/vtkTransferAttributes.h | 24 +- Infovis/Core/vtkTransposeMatrix.cxx | 1 + Infovis/Core/vtkTreeDifferenceFilter.cxx | 16 +- Infovis/Core/vtkTreeDifferenceFilter.h | 16 +- Infovis/Core/vtkTreeFieldAggregator.h | 16 +- Infovis/Core/vtkTreeLevelsFilter.h | 2 +- Infovis/Core/vtkVertexDegree.h | 4 +- Infovis/Core/vtkWordCloud.cxx | 58 +- Infovis/Core/vtkWordCloud.h | 118 +- .../Cxx/TestIncrementalForceLayout.cxx | 2 +- Infovis/Layout/vtkArcParallelEdgeStrategy.h | 4 +- Infovis/Layout/vtkAreaLayout.h | 12 +- Infovis/Layout/vtkAreaLayoutStrategy.h | 6 +- Infovis/Layout/vtkAssignCoordinates.h | 16 +- .../vtkAssignCoordinatesLayoutStrategy.h | 12 +- ...vtkAttributeClustering2DLayoutStrategy.cxx | 13 +- .../vtkAttributeClustering2DLayoutStrategy.h | 28 +- .../vtkCirclePackFrontChainLayoutStrategy.cxx | 10 +- .../vtkCirclePackFrontChainLayoutStrategy.h | 4 +- Infovis/Layout/vtkCirclePackLayout.h | 8 +- Infovis/Layout/vtkCirclePackToPolyData.h | 4 +- .../Layout/vtkClustering2DLayoutStrategy.cxx | 8 +- .../Layout/vtkClustering2DLayoutStrategy.h | 29 +- .../Layout/vtkCommunity2DLayoutStrategy.cxx | 8 +- Infovis/Layout/vtkCommunity2DLayoutStrategy.h | 37 +- Infovis/Layout/vtkConeLayoutStrategy.h | 12 +- .../Layout/vtkConstrained2DLayoutStrategy.cxx | 8 +- .../Layout/vtkConstrained2DLayoutStrategy.h | 33 +- .../Layout/vtkCosmicTreeLayoutStrategy.cxx | 4 +- Infovis/Layout/vtkCosmicTreeLayoutStrategy.h | 16 +- Infovis/Layout/vtkEdgeLayout.cxx | 12 +- Infovis/Layout/vtkEdgeLayout.h | 8 +- Infovis/Layout/vtkEdgeLayoutStrategy.h | 4 +- Infovis/Layout/vtkFast2DLayoutStrategy.cxx | 8 +- Infovis/Layout/vtkFast2DLayoutStrategy.h | 29 +- .../Layout/vtkForceDirectedLayoutStrategy.h | 46 +- Infovis/Layout/vtkGeoEdgeStrategy.h | 14 +- Infovis/Layout/vtkGeoMath.cxx | 10 +- Infovis/Layout/vtkGeoMath.h | 2 +- Infovis/Layout/vtkGraphLayout.cxx | 14 +- Infovis/Layout/vtkGraphLayout.h | 16 +- Infovis/Layout/vtkGraphLayoutStrategy.h | 8 +- Infovis/Layout/vtkIncrementalForceLayout.cxx | 2 +- Infovis/Layout/vtkIncrementalForceLayout.h | 36 +- Infovis/Layout/vtkKCoreLayout.cxx | 3 +- Infovis/Layout/vtkKCoreLayout.h | 36 +- .../Layout/vtkPassThroughLayoutStrategy.cxx | 8 +- .../Layout/vtkPerturbCoincidentVertices.cxx | 14 +- Infovis/Layout/vtkPerturbCoincidentVertices.h | 4 +- Infovis/Layout/vtkRandomLayoutStrategy.h | 16 +- Infovis/Layout/vtkSimple2DLayoutStrategy.cxx | 8 +- Infovis/Layout/vtkSimple2DLayoutStrategy.h | 33 +- Infovis/Layout/vtkSimple3DCirclesStrategy.h | 52 +- Infovis/Layout/vtkSpanTreeLayoutStrategy.cxx | 11 +- Infovis/Layout/vtkSpanTreeLayoutStrategy.h | 4 +- Infovis/Layout/vtkSplineGraphEdges.h | 12 +- Infovis/Layout/vtkStackedTreeLayoutStrategy.h | 28 +- Infovis/Layout/vtkTreeLayoutStrategy.h | 28 +- Infovis/Layout/vtkTreeMapLayout.h | 8 +- Infovis/Layout/vtkTreeMapToPolyData.h | 8 +- Infovis/Layout/vtkTreeOrbitLayoutStrategy.h | 12 +- Infovis/Layout/vtkTreeRingToPolyData.h | 4 +- Interaction/Image/vtkImageViewer.cxx | 30 +- Interaction/Image/vtkImageViewer.h | 36 +- Interaction/Image/vtkImageViewer2.cxx | 74 +- Interaction/Image/vtkImageViewer2.h | 40 +- Interaction/Image/vtkResliceImageViewer.cxx | 50 +- Interaction/Image/vtkResliceImageViewer.h | 52 +- .../vtkResliceImageViewerMeasurements.cxx | 40 +- .../Image/vtkResliceImageViewerMeasurements.h | 24 +- .../TestStyleTrackballCamera.png.sha512 | 2 +- .../Style/Testing/Python/CMakeLists.txt | 3 +- .../Style/vtkInteractorStyleDrawPolygon.cxx | 18 +- .../Style/vtkInteractorStyleDrawPolygon.h | 8 +- .../Style/vtkInteractorStyleFlight.cxx | 67 +- Interaction/Style/vtkInteractorStyleFlight.h | 36 +- Interaction/Style/vtkInteractorStyleImage.cxx | 50 +- Interaction/Style/vtkInteractorStyleImage.h | 16 +- .../Style/vtkInteractorStyleJoystickActor.cxx | 34 +- .../Style/vtkInteractorStyleJoystickActor.h | 4 +- .../vtkInteractorStyleJoystickCamera.cxx | 36 +- .../Style/vtkInteractorStyleJoystickCamera.h | 4 +- .../vtkInteractorStyleMultiTouchCamera.cxx | 24 +- .../vtkInteractorStyleMultiTouchCamera.h | 4 +- .../Style/vtkInteractorStyleRubberBand2D.cxx | 26 +- .../Style/vtkInteractorStyleRubberBand2D.h | 12 +- .../Style/vtkInteractorStyleRubberBand3D.cxx | 26 +- .../Style/vtkInteractorStyleRubberBand3D.h | 12 +- .../vtkInteractorStyleRubberBandPick.cxx | 20 +- .../Style/vtkInteractorStyleRubberBandPick.h | 4 +- .../vtkInteractorStyleRubberBandZoom.cxx | 68 +- .../Style/vtkInteractorStyleRubberBandZoom.h | 27 +- .../Style/vtkInteractorStyleSwitch.cxx | 28 +- Interaction/Style/vtkInteractorStyleSwitch.h | 8 +- .../Style/vtkInteractorStyleTerrain.cxx | 32 +- Interaction/Style/vtkInteractorStyleTerrain.h | 8 +- .../Style/vtkInteractorStyleTrackball.cxx | 6 +- .../vtkInteractorStyleTrackballActor.cxx | 34 +- .../Style/vtkInteractorStyleTrackballActor.h | 4 +- .../vtkInteractorStyleTrackballCamera.cxx | 36 +- .../Style/vtkInteractorStyleTrackballCamera.h | 8 +- .../Style/vtkInteractorStyleUnicam.cxx | 52 +- Interaction/Style/vtkInteractorStyleUnicam.h | 31 +- Interaction/Style/vtkInteractorStyleUser.cxx | 40 +- Interaction/Style/vtkInteractorStyleUser.h | 36 +- .../vtkParallelCoordinatesInteractorStyle.cxx | 42 +- .../vtkParallelCoordinatesInteractorStyle.h | 24 +- Interaction/Widgets/CMakeLists.txt | 14 + .../Widgets/Testing/Cxx/CMakeLists.txt | 6 + .../Widgets/Testing/Cxx/ImagePlaneWidget.cxx | 2 +- .../Widgets/Testing/Cxx/TestButtonWidget.cxx | 2 +- .../Cxx/TestButtonWidgetMultipleViewports.cxx | 2 +- .../Testing/Cxx/TestButtonWidgetPlacement.cxx | 151 + .../Cxx/TestCellCentersPointPlacer.cxx | 25 +- .../Cxx/TestCoincidentHandleWidgets.cxx | 1 + .../Testing/Cxx/TestEqualizerContextItem.cxx | 51 + .../Widgets/Testing/Cxx/TestHandleWidget.cxx | 6 +- .../Widgets/Testing/Cxx/TestLineWidget.cxx | 2 +- .../Widgets/Testing/Cxx/TestLineWidget2.cxx | 2 +- .../Widgets/Testing/Cxx/TestOrthoPlanes.cxx | 2 +- .../Testing/Cxx/TestParallelopipedWidget.cxx | 2 +- .../Cxx/TestPickingManagerSeedWidget.cxx | 12 +- .../Cxx/TestPickingManagerSeedWidget2.cxx | 8 +- .../Testing/Cxx/TestPickingManagerWidgets.cxx | 4 +- .../Cxx/TestPointHandleRepresentation3D.cxx | 1 + .../Widgets/Testing/Cxx/TestPolyPlane.cxx | 4 +- .../Testing/Cxx/TestPolylineWidget.cxx | 2 +- .../Cxx/TestProp3DButtonRepresentation.cxx | 6 +- .../Testing/Cxx/TestResliceCursorWidget2.cxx | 4 +- .../Testing/Cxx/TestResliceCursorWidget3.cxx | 4 +- .../Cxx/TestTextRepresentationWithBorders.cxx | 99 + .../TestTextWidgetBackgroundInteractive.cxx | 117 + .../Testing/Cxx/vtkBalloonWidgetTest1.cxx | 2 +- .../Cxx/vtkCameraPathRepresentationTest1.cxx | 346 + .../vtkResliceCursorRepresentationTest1.cxx | 108 + .../Cxx/vtkSplineRepresentationTest1.cxx | 43 +- .../Data/Baseline/TestBorderWidget.png.sha512 | 2 +- .../TestButtonWidgetPlacement.png.sha512 | 1 + .../TestCameraOrientationWidget.png.sha512 | 1 + .../TestEqualizerContextItem.png.sha512 | 1 + ...TestImplicitImageRepresentation.png.sha512 | 1 + .../Baseline/TestMagnifierWidget.png.sha512 | 1 + .../TestOrientationMarkerWidget_4.png.sha512 | 2 +- .../TestOrientationMarkerWidget_5.png.sha512 | 1 + .../Baseline/TestPointCloudWidget.png.sha512 | 1 + .../Baseline/TestPointCloudWidget2.png.sha512 | 1 + .../TestResliceCursorWidget2.png.sha512 | 2 +- .../TestResliceCursorWidget3.png.sha512 | 2 +- .../Data/Baseline/TestTensorWidget.png.sha512 | 1 + .../Baseline/TestTensorWidget2.png.sha512 | 1 + ...stTextRepresentationWithBorders.png.sha512 | 1 + ...TextWidgetBackgroundInteractive.png.sha512 | 1 + .../Widgets/Testing/Python/CMakeLists.txt | 8 + .../Python/TestCameraOrientationWidget.py | 227 + .../Python/TestImplicitImageRepresentation.py | 746 + .../Testing/Python/TestMagnifierWidget.py | 525 + .../Testing/Python/TestPointCloudWidget.py | 271 + .../Testing/Python/TestPointCloudWidget2.py | 271 + .../Testing/Python/TestTensorWidget.py | 819 + .../Testing/Python/TestTensorWidget2.py | 810 + Interaction/Widgets/vtk.module | 4 + Interaction/Widgets/vtk3DWidget.cxx | 22 +- Interaction/Widgets/vtk3DWidget.h | 20 +- ...bstractPolygonalHandleRepresentation3D.cxx | 72 +- ...kAbstractPolygonalHandleRepresentation3D.h | 46 +- .../vtkAbstractSplineRepresentation.cxx | 162 + .../Widgets/vtkAbstractSplineRepresentation.h | 105 + Interaction/Widgets/vtkAbstractWidget.cxx | 16 +- Interaction/Widgets/vtkAbstractWidget.h | 21 +- .../Widgets/vtkAffineRepresentation.cxx | 8 +- Interaction/Widgets/vtkAffineRepresentation.h | 8 +- .../Widgets/vtkAffineRepresentation2D.cxx | 46 +- .../Widgets/vtkAffineRepresentation2D.h | 28 +- Interaction/Widgets/vtkAffineWidget.cxx | 20 +- Interaction/Widgets/vtkAffineWidget.h | 4 +- .../Widgets/vtkAngleRepresentation.cxx | 18 +- Interaction/Widgets/vtkAngleRepresentation.h | 32 +- .../Widgets/vtkAngleRepresentation2D.cxx | 32 +- .../Widgets/vtkAngleRepresentation2D.h | 16 +- .../Widgets/vtkAngleRepresentation3D.cxx | 46 +- .../Widgets/vtkAngleRepresentation3D.h | 20 +- Interaction/Widgets/vtkAngleWidget.cxx | 30 +- Interaction/Widgets/vtkAngleWidget.h | 8 +- .../vtkAxesTransformRepresentation.cxx | 38 +- .../Widgets/vtkAxesTransformRepresentation.h | 36 +- .../Widgets/vtkAxesTransformWidget.cxx | 18 +- Interaction/Widgets/vtkAxesTransformWidget.h | 4 +- .../Widgets/vtkBalloonRepresentation.cxx | 22 +- .../Widgets/vtkBalloonRepresentation.h | 48 +- Interaction/Widgets/vtkBalloonWidget.cxx | 40 +- Interaction/Widgets/vtkBalloonWidget.h | 20 +- .../vtkBezierContourLineInterpolator.cxx | 10 +- .../vtkBezierContourLineInterpolator.h | 12 +- .../vtkBiDimensionalRepresentation.cxx | 48 +- .../Widgets/vtkBiDimensionalRepresentation.h | 44 +- .../vtkBiDimensionalRepresentation2D.cxx | 37 +- .../vtkBiDimensionalRepresentation2D.h | 24 +- .../Widgets/vtkBiDimensionalWidget.cxx | 28 +- Interaction/Widgets/vtkBiDimensionalWidget.h | 8 +- .../Widgets/vtkBorderRepresentation.cxx | 422 +- Interaction/Widgets/vtkBorderRepresentation.h | 223 +- Interaction/Widgets/vtkBorderWidget.cxx | 38 +- Interaction/Widgets/vtkBorderWidget.h | 13 +- .../Widgets/vtkBoundedPlanePointPlacer.cxx | 36 +- .../Widgets/vtkBoundedPlanePointPlacer.h | 20 +- Interaction/Widgets/vtkBoxRepresentation.cxx | 84 +- Interaction/Widgets/vtkBoxRepresentation.h | 64 +- Interaction/Widgets/vtkBoxWidget.h | 36 +- Interaction/Widgets/vtkBoxWidget2.cxx | 73 +- Interaction/Widgets/vtkBoxWidget2.h | 8 +- Interaction/Widgets/vtkBrokenLineWidget.cxx | 2 +- Interaction/Widgets/vtkBrokenLineWidget.h | 36 +- .../Widgets/vtkButtonRepresentation.cxx | 16 +- Interaction/Widgets/vtkButtonRepresentation.h | 20 +- Interaction/Widgets/vtkButtonWidget.cxx | 14 +- Interaction/Widgets/vtkButtonWidget.h | 6 +- Interaction/Widgets/vtkCameraHandleSource.cxx | 233 + Interaction/Widgets/vtkCameraHandleSource.h | 101 + .../vtkCameraOrientationRepresentation.cxx | 891 + .../vtkCameraOrientationRepresentation.h | 348 + .../Widgets/vtkCameraOrientationWidget.cxx | 494 + .../Widgets/vtkCameraOrientationWidget.h | 152 + .../Widgets/vtkCameraPathRepresentation.cxx | 517 + .../Widgets/vtkCameraPathRepresentation.h | 151 + Interaction/Widgets/vtkCameraPathWidget.cxx | 330 + Interaction/Widgets/vtkCameraPathWidget.h | 87 + .../Widgets/vtkCameraRepresentation.cxx | 26 +- Interaction/Widgets/vtkCameraRepresentation.h | 28 +- Interaction/Widgets/vtkCameraWidget.cxx | 10 +- Interaction/Widgets/vtkCameraWidget.h | 4 +- .../Widgets/vtkCaptionRepresentation.cxx | 36 +- .../Widgets/vtkCaptionRepresentation.h | 24 +- Interaction/Widgets/vtkCaptionWidget.cxx | 20 +- Interaction/Widgets/vtkCaptionWidget.h | 8 +- .../Widgets/vtkCellCentersPointPlacer.cxx | 26 +- .../Widgets/vtkCellCentersPointPlacer.h | 12 +- .../vtkCenteredSliderRepresentation.cxx | 34 +- .../Widgets/vtkCenteredSliderRepresentation.h | 28 +- .../Widgets/vtkCenteredSliderWidget.cxx | 2 +- Interaction/Widgets/vtkCenteredSliderWidget.h | 6 +- .../Widgets/vtkCheckerboardRepresentation.cxx | 22 +- .../Widgets/vtkCheckerboardRepresentation.h | 24 +- Interaction/Widgets/vtkCheckerboardWidget.cxx | 16 +- Interaction/Widgets/vtkCheckerboardWidget.h | 4 +- .../Widgets/vtkClosedSurfacePointPlacer.cxx | 31 +- .../Widgets/vtkClosedSurfacePointPlacer.h | 8 +- ...tkConstrainedPointHandleRepresentation.cxx | 76 +- .../vtkConstrainedPointHandleRepresentation.h | 52 +- .../Widgets/vtkContinuousValueWidget.h | 10 +- ...vtkContinuousValueWidgetRepresentation.cxx | 8 +- .../vtkContinuousValueWidgetRepresentation.h | 8 +- .../Widgets/vtkContourLineInterpolator.cxx | 10 +- .../Widgets/vtkContourLineInterpolator.h | 4 +- .../Widgets/vtkContourRepresentation.cxx | 124 +- .../Widgets/vtkContourRepresentation.h | 68 +- Interaction/Widgets/vtkContourWidget.cxx | 34 +- Interaction/Widgets/vtkContourWidget.h | 24 +- .../Widgets/vtkCurveRepresentation.cxx | 291 +- Interaction/Widgets/vtkCurveRepresentation.h | 146 +- ...tkDijkstraImageContourLineInterpolator.cxx | 10 +- .../vtkDijkstraImageContourLineInterpolator.h | 12 +- .../Widgets/vtkDistanceRepresentation.cxx | 20 +- .../Widgets/vtkDistanceRepresentation.h | 44 +- .../Widgets/vtkDistanceRepresentation2D.cxx | 38 +- .../Widgets/vtkDistanceRepresentation2D.h | 16 +- .../Widgets/vtkDistanceRepresentation3D.cxx | 52 +- .../Widgets/vtkDistanceRepresentation3D.h | 40 +- Interaction/Widgets/vtkDistanceWidget.cxx | 74 +- Interaction/Widgets/vtkDistanceWidget.h | 8 +- .../vtkEllipsoidTensorProbeRepresentation.cxx | 20 +- .../vtkEllipsoidTensorProbeRepresentation.h | 8 +- .../Widgets/vtkEqualizerContextItem.cxx | 482 + Interaction/Widgets/vtkEqualizerContextItem.h | 151 + Interaction/Widgets/vtkEvent.cxx | 4 +- Interaction/Widgets/vtkEvent.h | 24 +- .../Widgets/vtkFinitePlaneRepresentation.cxx | 74 +- .../Widgets/vtkFinitePlaneRepresentation.h | 58 +- Interaction/Widgets/vtkFinitePlaneWidget.cxx | 18 +- Interaction/Widgets/vtkFinitePlaneWidget.h | 4 +- .../vtkFixedSizeHandleRepresentation3D.cxx | 14 +- .../vtkFixedSizeHandleRepresentation3D.h | 16 +- .../vtkFocalPlaneContourRepresentation.cxx | 20 +- .../vtkFocalPlaneContourRepresentation.h | 4 +- .../Widgets/vtkFocalPlanePointPlacer.cxx | 16 +- .../Widgets/vtkFocalPlanePointPlacer.h | 16 +- .../Widgets/vtkHandleRepresentation.cxx | 36 +- Interaction/Widgets/vtkHandleRepresentation.h | 54 +- Interaction/Widgets/vtkHandleWidget.cxx | 82 +- Interaction/Widgets/vtkHandleWidget.h | 24 +- Interaction/Widgets/vtkHoverWidget.cxx | 14 +- Interaction/Widgets/vtkHoverWidget.h | 12 +- .../Widgets/vtkImageActorPointPlacer.cxx | 20 +- .../Widgets/vtkImageActorPointPlacer.h | 14 +- .../Widgets/vtkImageCroppingRegionsWidget.cxx | 80 +- .../Widgets/vtkImageCroppingRegionsWidget.h | 44 +- Interaction/Widgets/vtkImageOrthoPlanes.cxx | 30 +- Interaction/Widgets/vtkImageOrthoPlanes.h | 4 +- Interaction/Widgets/vtkImagePlaneWidget.cxx | 181 +- Interaction/Widgets/vtkImagePlaneWidget.h | 121 +- Interaction/Widgets/vtkImageTracerWidget.cxx | 4 +- Interaction/Widgets/vtkImageTracerWidget.h | 56 +- .../vtkImplicitCylinderRepresentation.cxx | 102 +- .../vtkImplicitCylinderRepresentation.h | 110 +- .../Widgets/vtkImplicitCylinderWidget.cxx | 26 +- .../Widgets/vtkImplicitCylinderWidget.h | 4 +- .../vtkImplicitImageRepresentation.cxx | 473 + .../Widgets/vtkImplicitImageRepresentation.h | 186 + .../vtkImplicitPlaneRepresentation.cxx | 182 +- .../Widgets/vtkImplicitPlaneRepresentation.h | 153 +- .../Widgets/vtkImplicitPlaneWidget.cxx | 83 +- Interaction/Widgets/vtkImplicitPlaneWidget.h | 62 +- .../Widgets/vtkImplicitPlaneWidget2.cxx | 81 +- Interaction/Widgets/vtkImplicitPlaneWidget2.h | 8 +- .../Widgets/vtkLightRepresentation.cxx | 46 +- Interaction/Widgets/vtkLightRepresentation.h | 36 +- Interaction/Widgets/vtkLightWidget.cxx | 18 +- Interaction/Widgets/vtkLineRepresentation.cxx | 86 +- Interaction/Widgets/vtkLineRepresentation.h | 76 +- Interaction/Widgets/vtkLineWidget.cxx | 68 +- Interaction/Widgets/vtkLineWidget.h | 20 +- Interaction/Widgets/vtkLineWidget2.cxx | 24 +- Interaction/Widgets/vtkLineWidget2.h | 4 +- .../vtkLinearContourLineInterpolator.cxx | 8 +- .../vtkLinearContourLineInterpolator.h | 4 +- Interaction/Widgets/vtkLogoRepresentation.cxx | 16 +- Interaction/Widgets/vtkLogoRepresentation.h | 16 +- Interaction/Widgets/vtkLogoWidget.cxx | 8 +- Interaction/Widgets/vtkLogoWidget.h | 4 +- .../Widgets/vtkMagnifierRepresentation.cxx | 317 + .../Widgets/vtkMagnifierRepresentation.h | 195 + Interaction/Widgets/vtkMagnifierWidget.cxx | 145 + Interaction/Widgets/vtkMagnifierWidget.h | 132 + ...kMeasurementCubeHandleRepresentation3D.cxx | 62 +- ...vtkMeasurementCubeHandleRepresentation3D.h | 68 +- .../Widgets/vtkOrientationMarkerWidget.cxx | 264 +- .../Widgets/vtkOrientationMarkerWidget.h | 81 +- .../vtkOrientedGlyphContourRepresentation.cxx | 66 +- .../vtkOrientedGlyphContourRepresentation.h | 36 +- ...edGlyphFocalPlaneContourRepresentation.cxx | 54 +- ...ntedGlyphFocalPlaneContourRepresentation.h | 32 +- ...rientedPolygonalHandleRepresentation3D.cxx | 8 +- ...kOrientedPolygonalHandleRepresentation3D.h | 4 +- .../vtkParallelopipedRepresentation.cxx | 70 +- .../Widgets/vtkParallelopipedRepresentation.h | 40 +- .../Widgets/vtkParallelopipedWidget.cxx | 34 +- Interaction/Widgets/vtkParallelopipedWidget.h | 8 +- Interaction/Widgets/vtkPlaneWidget.cxx | 48 +- Interaction/Widgets/vtkPlaneWidget.h | 46 +- .../Widgets/vtkPlaybackRepresentation.cxx | 18 +- .../Widgets/vtkPlaybackRepresentation.h | 12 +- Interaction/Widgets/vtkPlaybackWidget.cxx | 10 +- Interaction/Widgets/vtkPlaybackWidget.h | 4 +- .../Widgets/vtkPointCloudRepresentation.cxx | 501 + .../Widgets/vtkPointCloudRepresentation.h | 264 + Interaction/Widgets/vtkPointCloudWidget.cxx | 162 + Interaction/Widgets/vtkPointCloudWidget.h | 107 + .../vtkPointHandleRepresentation2D.cxx | 42 +- .../Widgets/vtkPointHandleRepresentation2D.h | 22 +- .../vtkPointHandleRepresentation3D.cxx | 66 +- .../Widgets/vtkPointHandleRepresentation3D.h | 37 +- Interaction/Widgets/vtkPointPlacer.cxx | 20 +- Interaction/Widgets/vtkPointPlacer.h | 12 +- Interaction/Widgets/vtkPointWidget.h | 16 +- .../vtkPolyDataContourLineInterpolator.cxx | 6 +- .../vtkPolyDataContourLineInterpolator.h | 8 +- .../Widgets/vtkPolyDataPointPlacer.cxx | 26 +- Interaction/Widgets/vtkPolyDataPointPlacer.h | 8 +- .../Widgets/vtkPolyDataSourceWidget.cxx | 9 +- .../Widgets/vtkPolyLineRepresentation.cxx | 244 +- .../Widgets/vtkPolyLineRepresentation.h | 42 +- Interaction/Widgets/vtkPolyLineWidget.cxx | 22 +- .../vtkPolygonalHandleRepresentation3D.cxx | 6 +- .../vtkPolygonalHandleRepresentation3D.h | 10 +- ...olygonalSurfaceContourLineInterpolator.cxx | 12 +- ...kPolygonalSurfaceContourLineInterpolator.h | 10 +- .../vtkPolygonalSurfacePointPlacer.cxx | 26 +- .../Widgets/vtkPolygonalSurfacePointPlacer.h | 24 +- .../Widgets/vtkProgressBarRepresentation.cxx | 114 +- .../Widgets/vtkProgressBarRepresentation.h | 56 +- Interaction/Widgets/vtkProgressBarWidget.cxx | 8 +- Interaction/Widgets/vtkProgressBarWidget.h | 4 +- .../Widgets/vtkProp3DButtonRepresentation.cxx | 34 +- .../Widgets/vtkProp3DButtonRepresentation.h | 20 +- .../vtkRectilinearWipeRepresentation.cxx | 26 +- .../vtkRectilinearWipeRepresentation.h | 28 +- .../Widgets/vtkRectilinearWipeWidget.cxx | 16 +- .../Widgets/vtkRectilinearWipeWidget.h | 4 +- Interaction/Widgets/vtkResliceCursor.cxx | 89 +- Interaction/Widgets/vtkResliceCursor.h | 46 +- Interaction/Widgets/vtkResliceCursorActor.cxx | 30 +- Interaction/Widgets/vtkResliceCursorActor.h | 12 +- .../vtkResliceCursorLineRepresentation.cxx | 83 +- .../vtkResliceCursorLineRepresentation.h | 16 +- .../Widgets/vtkResliceCursorPicker.cxx | 22 +- Interaction/Widgets/vtkResliceCursorPicker.h | 10 +- .../vtkResliceCursorPolyDataAlgorithm.cxx | 36 +- .../vtkResliceCursorPolyDataAlgorithm.h | 20 +- .../vtkResliceCursorRepresentation.cxx | 175 +- .../Widgets/vtkResliceCursorRepresentation.h | 95 +- ...tkResliceCursorThickLineRepresentation.cxx | 10 +- .../vtkResliceCursorThickLineRepresentation.h | 4 +- .../Widgets/vtkResliceCursorWidget.cxx | 32 +- Interaction/Widgets/vtkResliceCursorWidget.h | 8 +- .../Widgets/vtkScalarBarRepresentation.cxx | 35 +- .../Widgets/vtkScalarBarRepresentation.h | 20 +- Interaction/Widgets/vtkScalarBarWidget.cxx | 18 +- Interaction/Widgets/vtkScalarBarWidget.h | 8 +- Interaction/Widgets/vtkSeedRepresentation.cxx | 34 +- Interaction/Widgets/vtkSeedRepresentation.h | 24 +- Interaction/Widgets/vtkSeedWidget.cxx | 36 +- Interaction/Widgets/vtkSeedWidget.h | 8 +- .../Widgets/vtkSliderRepresentation.cxx | 12 +- Interaction/Widgets/vtkSliderRepresentation.h | 52 +- .../Widgets/vtkSliderRepresentation2D.cxx | 34 +- .../Widgets/vtkSliderRepresentation2D.h | 32 +- .../Widgets/vtkSliderRepresentation3D.cxx | 46 +- .../Widgets/vtkSliderRepresentation3D.h | 44 +- Interaction/Widgets/vtkSliderWidget.cxx | 14 +- Interaction/Widgets/vtkSliderWidget.h | 14 +- .../Widgets/vtkSphereHandleRepresentation.cxx | 64 +- .../Widgets/vtkSphereHandleRepresentation.h | 28 +- .../Widgets/vtkSphereRepresentation.cxx | 64 +- Interaction/Widgets/vtkSphereRepresentation.h | 68 +- Interaction/Widgets/vtkSphereWidget.cxx | 44 +- Interaction/Widgets/vtkSphereWidget.h | 40 +- Interaction/Widgets/vtkSphereWidget2.cxx | 22 +- Interaction/Widgets/vtkSphereWidget2.h | 8 +- .../Widgets/vtkSplineRepresentation.cxx | 421 +- Interaction/Widgets/vtkSplineRepresentation.h | 117 +- Interaction/Widgets/vtkSplineWidget.cxx | 6 +- Interaction/Widgets/vtkSplineWidget.h | 44 +- Interaction/Widgets/vtkSplineWidget2.cxx | 24 +- .../Widgets/vtkTensorProbeRepresentation.cxx | 22 +- .../Widgets/vtkTensorProbeRepresentation.h | 16 +- Interaction/Widgets/vtkTensorProbeWidget.cxx | 14 +- Interaction/Widgets/vtkTensorProbeWidget.h | 4 +- .../Widgets/vtkTensorRepresentation.cxx | 1965 + Interaction/Widgets/vtkTensorRepresentation.h | 467 + Interaction/Widgets/vtkTensorWidget.cxx | 570 + Interaction/Widgets/vtkTensorWidget.h | 191 + .../vtkTerrainContourLineInterpolator.cxx | 12 +- .../vtkTerrainContourLineInterpolator.h | 12 +- .../Widgets/vtkTerrainDataPointPlacer.cxx | 20 +- .../Widgets/vtkTerrainDataPointPlacer.h | 12 +- Interaction/Widgets/vtkTextRepresentation.cxx | 87 +- Interaction/Widgets/vtkTextRepresentation.h | 82 +- Interaction/Widgets/vtkTextWidget.cxx | 46 +- Interaction/Widgets/vtkTextWidget.h | 19 +- .../vtkTexturedButtonRepresentation.cxx | 52 +- .../Widgets/vtkTexturedButtonRepresentation.h | 36 +- .../vtkTexturedButtonRepresentation2D.cxx | 38 +- .../vtkTexturedButtonRepresentation2D.h | 28 +- .../Widgets/vtkWidgetCallbackMapper.cxx | 22 +- Interaction/Widgets/vtkWidgetCallbackMapper.h | 12 +- Interaction/Widgets/vtkWidgetEvent.cxx | 7 +- Interaction/Widgets/vtkWidgetEvent.h | 15 +- .../Widgets/vtkWidgetEventTranslator.cxx | 40 +- .../Widgets/vtkWidgetEventTranslator.h | 20 +- .../Widgets/vtkWidgetRepresentation.cxx | 49 +- Interaction/Widgets/vtkWidgetRepresentation.h | 36 +- Interaction/Widgets/vtkWidgetSet.cxx | 16 +- Interaction/Widgets/vtkWidgetSet.h | 12 +- .../Widgets/vtkXYPlotRepresentation.cxx | 140 +- Interaction/Widgets/vtkXYPlotRepresentation.h | 36 +- Interaction/Widgets/vtkXYPlotWidget.cxx | 22 +- Interaction/Widgets/vtkXYPlotWidget.h | 4 +- Parallel/Core/CMakeLists.txt | 5 +- .../Testing/Cxx/TestThreadedTaskQueue.cxx | 2 +- Parallel/Core/vtkCommunicator.cxx | 222 +- Parallel/Core/vtkCommunicator.h | 108 +- Parallel/Core/vtkDummyCommunicator.cxx | 2 +- Parallel/Core/vtkDummyCommunicator.h | 4 +- Parallel/Core/vtkDummyController.cxx | 6 +- Parallel/Core/vtkDummyController.h | 4 +- Parallel/Core/vtkMultiProcessController.cxx | 180 +- Parallel/Core/vtkMultiProcessController.h | 122 +- Parallel/Core/vtkMultiProcessStream.cxx | 108 +- Parallel/Core/vtkMultiProcessStream.h | 20 +- .../Core/vtkMultiProcessStreamSerialization.h | 184 + Parallel/Core/vtkPDirectory.cxx | 277 +- Parallel/Core/vtkPDirectory.h | 32 +- Parallel/Core/vtkPSystemTools.cxx | 24 +- Parallel/Core/vtkPSystemTools.h | 27 +- Parallel/Core/vtkProcess.cxx | 10 +- Parallel/Core/vtkProcessGroup.cxx | 20 +- Parallel/Core/vtkProcessGroup.h | 12 +- Parallel/Core/vtkSocketCommunicator.cxx | 64 +- Parallel/Core/vtkSocketCommunicator.h | 41 +- Parallel/Core/vtkSocketController.cxx | 20 +- Parallel/Core/vtkSubCommunicator.cxx | 10 +- Parallel/Core/vtkSubCommunicator.h | 8 +- Parallel/Core/vtkThreadedTaskQueue.h | 6 +- Parallel/Core/vtkThreadedTaskQueue.txx | 10 +- Parallel/DIY/CMakeLists.txt | 13 +- Parallel/DIY/Testing/CMakeLists.txt | 1 + Parallel/DIY/Testing/Cxx/CMakeLists.txt | 9 + .../DIY/Testing/Cxx/TestDIYDataExchanger.cxx | 84 + Parallel/DIY/Testing/Cxx/TestDIYUtilities.cxx | 189 + Parallel/DIY/vtk.module | 7 + Parallel/DIY/vtkDIYDataExchanger.cxx | 191 + Parallel/DIY/vtkDIYDataExchanger.h | 99 + Parallel/DIY/vtkDIYExplicitAssigner.cxx | 6 +- Parallel/DIY/vtkDIYGhostUtilities.cxx | 6049 +++ Parallel/DIY/vtkDIYGhostUtilities.h | 911 + Parallel/DIY/vtkDIYGhostUtilities.txx | 380 + Parallel/DIY/vtkDIYUtilities.cxx | 370 +- Parallel/DIY/vtkDIYUtilities.h | 83 +- Parallel/DIY/vtkDIYUtilities.txx | 64 + .../Cxx/ExerciseMultiProcessController.cxx | 148 +- .../MPI/Testing/Cxx/GenericCommunicator.cxx | 4 +- Parallel/MPI/Testing/Cxx/MPIController.cxx | 11 +- Parallel/MPI/Testing/Cxx/TestProcess.cxx | 2 +- Parallel/MPI/vtkMPICommunicator.cxx | 174 +- Parallel/MPI/vtkMPICommunicator.h | 58 +- Parallel/MPI/vtkMPIController.cxx | 52 +- Parallel/MPI/vtkMPIController.h | 20 +- Parallel/MPI/vtkMPIEventLog.h | 10 +- Parallel/MPI/vtkMPIUtilities.cxx | 2 +- Parallel/MPI4Py/vtkMPI4PyCommunicator.cxx | 10 +- Parallel/MPI4Py/vtkMPI4PyCommunicator.h | 4 +- README.md | 24 +- Remote/MomentInvariants.remote.cmake | 2 +- Remote/RenderingLookingGlass.remote.cmake | 9 + .../Testing/Cxx/TestAxisActor3D.cxx | 2 +- .../Testing/Cxx/TestBarChartActor.cxx | 2 +- .../Annotation/Testing/Cxx/TestCubeAxes3.cxx | 2 +- .../Testing/Cxx/TestCubeAxesInnerGridAll.cxx | 2 +- .../Cxx/TestCubeAxesInnerGridClosest.cxx | 2 +- .../Cxx/TestCubeAxesInnerGridFurthest.cxx | 2 +- .../Cxx/TestCubeAxesIntersectionPoint.cxx | 2 +- .../Cxx/TestCubeAxesOrientedBoundingBox.cxx | 2 +- .../Testing/Cxx/TestCubeAxesSticky.cxx | 2 +- .../Cxx/TestCubeAxesStickyCentered.cxx | 2 +- .../Testing/Cxx/TestCubeAxesWithGridLines.cxx | 2 +- .../Cxx/TestCubeAxesWithXInnerGrids.cxx | 2 +- .../Cxx/TestCubeAxesWithXInnerPolys.cxx | 2 +- .../Testing/Cxx/TestCubeAxesWithXLines.cxx | 2 +- .../Cxx/TestCubeAxesWithYInnerGrids.cxx | 2 +- .../Cxx/TestCubeAxesWithYInnerPolys.cxx | 2 +- .../Testing/Cxx/TestCubeAxesWithYLines.cxx | 2 +- .../Cxx/TestCubeAxesWithZInnerGrids.cxx | 2 +- .../Cxx/TestCubeAxesWithZInnerPolys.cxx | 2 +- .../Testing/Cxx/TestCubeAxesWithZLines.cxx | 2 +- .../Testing/Cxx/TestLegendBoxActor.cxx | 2 +- .../Testing/Cxx/TestLegendBoxActor2.cxx | 2 +- .../Testing/Cxx/TestLegendScaleActor.cxx | 2 +- .../Testing/Cxx/TestPieChartActor.cxx | 2 +- .../Annotation/Testing/Cxx/TestPolarAxes.cxx | 2 +- .../Annotation/Testing/Cxx/TestScalarBar.cxx | 55 +- .../Testing/Cxx/TestSpiderPlotActor.cxx | 2 +- .../Data/Baseline/TestScalarBar.png.sha512 | 2 +- .../Annotation/vtkAnnotatedCubeActor.cxx | 56 +- Rendering/Annotation/vtkAnnotatedCubeActor.h | 36 +- Rendering/Annotation/vtkArcPlotter.h | 36 +- Rendering/Annotation/vtkAxesActor.cxx | 54 +- Rendering/Annotation/vtkAxesActor.h | 64 +- Rendering/Annotation/vtkAxisActor.cxx | 178 +- Rendering/Annotation/vtkAxisActor.h | 236 +- Rendering/Annotation/vtkAxisActor2D.cxx | 39 +- Rendering/Annotation/vtkAxisActor2D.h | 100 +- Rendering/Annotation/vtkAxisFollower.cxx | 104 +- Rendering/Annotation/vtkAxisFollower.h | 46 +- Rendering/Annotation/vtkBarChartActor.cxx | 28 +- Rendering/Annotation/vtkBarChartActor.h | 52 +- Rendering/Annotation/vtkCaptionActor2D.cxx | 24 +- Rendering/Annotation/vtkCaptionActor2D.h | 52 +- Rendering/Annotation/vtkConvexHull2D.cxx | 20 +- Rendering/Annotation/vtkConvexHull2D.h | 28 +- Rendering/Annotation/vtkCornerAnnotation.cxx | 32 +- Rendering/Annotation/vtkCornerAnnotation.h | 68 +- Rendering/Annotation/vtkCubeAxesActor.cxx | 45 +- Rendering/Annotation/vtkCubeAxesActor.h | 168 +- Rendering/Annotation/vtkCubeAxesActor2D.cxx | 48 +- Rendering/Annotation/vtkCubeAxesActor2D.h | 80 +- .../vtkGraphAnnotationLayersFilter.cxx | 31 +- .../vtkGraphAnnotationLayersFilter.h | 4 +- Rendering/Annotation/vtkLeaderActor2D.cxx | 24 +- Rendering/Annotation/vtkLeaderActor2D.h | 48 +- Rendering/Annotation/vtkLegendBoxActor.cxx | 46 +- Rendering/Annotation/vtkLegendBoxActor.h | 44 +- Rendering/Annotation/vtkLegendScaleActor.cxx | 26 +- Rendering/Annotation/vtkLegendScaleActor.h | 56 +- .../vtkParallelCoordinatesActor.cxx | 26 +- .../Annotation/vtkParallelCoordinatesActor.h | 28 +- Rendering/Annotation/vtkPieChartActor.cxx | 34 +- Rendering/Annotation/vtkPieChartActor.h | 48 +- Rendering/Annotation/vtkPolarAxesActor.cxx | 89 +- Rendering/Annotation/vtkPolarAxesActor.h | 308 +- .../Annotation/vtkProp3DAxisFollower.cxx | 42 +- Rendering/Annotation/vtkProp3DAxisFollower.h | 40 +- Rendering/Annotation/vtkScalarBarActor.cxx | 191 +- Rendering/Annotation/vtkScalarBarActor.h | 188 +- .../Annotation/vtkScalarBarActorInternal.h | 11 +- Rendering/Annotation/vtkSpiderPlotActor.cxx | 42 +- Rendering/Annotation/vtkSpiderPlotActor.h | 56 +- Rendering/Annotation/vtkXYPlotActor.cxx | 207 +- Rendering/Annotation/vtkXYPlotActor.h | 220 +- .../Context2D/Testing/Cxx/CMakeLists.txt | 1 + .../Context2D/Testing/Cxx/TestBlockItem.cxx | 78 + .../Context2D/Testing/Cxx/TestContext2D.cxx | 10 +- .../Data/Baseline/TestBlockItem.png.sha512 | 1 + .../Context2D/vtkAbstractContextBufferId.cxx | 8 +- .../Context2D/vtkAbstractContextBufferId.h | 20 +- .../Context2D/vtkAbstractContextItem.cxx | 70 +- Rendering/Context2D/vtkAbstractContextItem.h | 16 +- Rendering/Context2D/vtkBlockItem.cxx | 161 +- Rendering/Context2D/vtkBlockItem.h | 127 +- Rendering/Context2D/vtkBrush.cxx | 42 +- Rendering/Context2D/vtkBrush.h | 16 +- Rendering/Context2D/vtkContext2D.cxx | 206 +- Rendering/Context2D/vtkContext2D.h | 63 +- Rendering/Context2D/vtkContext3D.h | 8 +- Rendering/Context2D/vtkContextActor.cxx | 18 +- Rendering/Context2D/vtkContextActor.h | 4 +- Rendering/Context2D/vtkContextClip.cxx | 12 +- Rendering/Context2D/vtkContextDevice2D.cxx | 26 +- Rendering/Context2D/vtkContextDevice2D.h | 23 +- Rendering/Context2D/vtkContextDevice3D.cxx | 2 +- Rendering/Context2D/vtkContextDevice3D.h | 4 +- Rendering/Context2D/vtkContextItem.cxx | 12 +- Rendering/Context2D/vtkContextItem.h | 22 +- Rendering/Context2D/vtkContextKeyEvent.cxx | 4 +- Rendering/Context2D/vtkContextMapper2D.cxx | 12 +- Rendering/Context2D/vtkContextMapper2D.h | 4 +- Rendering/Context2D/vtkContextMouseEvent.h | 2 +- Rendering/Context2D/vtkContextScene.cxx | 82 +- Rendering/Context2D/vtkContextScene.h | 62 +- Rendering/Context2D/vtkContextScenePrivate.h | 28 +- Rendering/Context2D/vtkContextTransform.cxx | 32 +- Rendering/Context2D/vtkContextTransform.h | 40 +- Rendering/Context2D/vtkImageItem.cxx | 12 +- Rendering/Context2D/vtkImageItem.h | 12 +- .../vtkLabeledContourPolyDataItem.cxx | 16 +- .../Context2D/vtkLabeledContourPolyDataItem.h | 16 +- Rendering/Context2D/vtkMarkerUtilities.cxx | 9 +- Rendering/Context2D/vtkPen.cxx | 38 +- Rendering/Context2D/vtkPen.h | 12 +- Rendering/Context2D/vtkPolyDataItem.cxx | 8 +- Rendering/Context2D/vtkPropItem.cxx | 2 +- Rendering/Context2D/vtkTooltipItem.cxx | 22 +- Rendering/Context2D/vtkTooltipItem.h | 26 +- .../ContextOpenGL2/vtkOpenGLContextActor.cxx | 12 +- .../vtkOpenGLContextBufferId.cxx | 24 +- .../ContextOpenGL2/vtkOpenGLContextBufferId.h | 4 +- .../vtkOpenGLContextDevice2D.cxx | 163 +- .../ContextOpenGL2/vtkOpenGLContextDevice2D.h | 32 +- .../vtkOpenGLContextDevice2DPrivate.h | 39 +- .../vtkOpenGLContextDevice3D.cxx | 20 +- .../ContextOpenGL2/vtkOpenGLContextDevice3D.h | 8 +- .../ContextOpenGL2/vtkOpenGLPropItem.cxx | 7 +- Rendering/ContextOpenGL2/vtkOpenGLPropItem.h | 1 + Rendering/Core/CMakeLists.txt | 3 + Rendering/Core/Testing/CMakeLists.txt | 2 + Rendering/Core/Testing/Cxx/CMakeLists.txt | 57 +- Rendering/Core/Testing/Cxx/RGrid.cxx | 5 - .../Core/Testing/Cxx/TestBackfaceTexture.cxx | 89 + .../Core/Testing/Cxx/TestBlockVisibility.cxx | 125 - .../TestCompositeDataDisplayAttributes.cxx | 55 + .../Cxx/TestCompositeDataPointGaussian.cxx | 143 - ...estCompositeDataPointGaussianSelection.cxx | 164 - .../Cxx/TestCompositePolyDataMapper2.cxx | 200 - ...estCompositePolyDataMapper2CellScalars.cxx | 183 - ...olyDataMapper2MixedGeometryCellScalars.cxx | 203 - ...ositePolyDataMapper2MixedGeometryEdges.cxx | 203 - .../TestCompositePolyDataMapper2Picking.cxx | 321 - .../TestCompositePolyDataMapper2Scalars.cxx | 177 - ...TestDiscretizableColorTransferFunction.cxx | 2 +- ...cretizableColorTransferFunctionOpacity.cxx | 4 +- .../Core/Testing/Cxx/TestFollowerPicking.cxx | 6 +- .../Testing/Cxx/TestGlyph3DMapperMasking.cxx | 2 +- .../Testing/Cxx/TestGlyph3DMapperPicking.cxx | 7 +- .../Testing/Cxx/TestImageAndAnnotations.cxx | 26 + .../Testing/Cxx/TestLabeledContourMapper.cxx | 2 +- ...estLabeledContourMapperWithActorMatrix.cxx | 2 +- .../Core/Testing/Cxx/TestPickingManager.cxx | 8 +- .../Cxx/TestResetCameraScreenSpace.cxx | 71 + .../Cxx/TestResizingWindowToImageFilter.cxx | 112 + .../Core/Testing/Cxx/TestTextureWrap.cxx | 101 + .../Cxx/TestValuePassFloatingPoint.cxx | 293 - .../Baseline/TestBackfaceTexture.png.sha512 | 1 + .../TestCompositePolyDataMapper2.png.sha512 | 1 - ...ositePolyDataMapper2CellScalars.png.sha512 | 1 - ...Mapper2MixedGeometryCellScalars.png.sha512 | 1 - ...lyDataMapper2MixedGeometryEdges.png.sha512 | 1 - ...CompositePolyDataMapper2Picking.png.sha512 | 1 - ...CompositePolyDataMapper2Scalars.png.sha512 | 1 - .../TestResetCameraScreenSpace.png.sha512 | 1 + ...TestResizingWindowToImageFilter.png.sha512 | 1 + ...stResizingWindowToImageFilter_1.png.sha512 | 1 + ...stResizingWindowToImageFilter_2.png.sha512 | 1 + ...stResizingWindowToImageFilter_3.png.sha512 | 1 + .../Data/Baseline/TestTextureWrap.png.sha512 | 1 + Rendering/Core/vtk.module | 9 +- .../Core/vtkAbstractHyperTreeGridMapper.cxx | 27 +- .../Core/vtkAbstractHyperTreeGridMapper.h | 20 +- Rendering/Core/vtkAbstractMapper.h | 12 +- Rendering/Core/vtkAbstractMapper3D.h | 6 +- Rendering/Core/vtkAbstractPicker.h | 16 +- Rendering/Core/vtkAbstractPropPicker.cxx | 2 +- Rendering/Core/vtkAbstractPropPicker.h | 4 +- Rendering/Core/vtkAbstractRenderDevice.h | 1 + Rendering/Core/vtkAbstractVolumeMapper.cxx | 2 +- Rendering/Core/vtkAbstractVolumeMapper.h | 20 +- Rendering/Core/vtkActor.cxx | 29 +- Rendering/Core/vtkActor.h | 32 +- Rendering/Core/vtkActor2D.cxx | 34 +- Rendering/Core/vtkActor2D.h | 24 +- Rendering/Core/vtkActor2DCollection.cxx | 5 + Rendering/Core/vtkActor2DCollection.h | 13 +- Rendering/Core/vtkActorCollection.cxx | 2 +- Rendering/Core/vtkActorCollection.h | 8 +- Rendering/Core/vtkAreaPicker.cxx | 22 +- Rendering/Core/vtkAreaPicker.h | 16 +- Rendering/Core/vtkAssembly.h | 12 +- Rendering/Core/vtkAssemblyNode.cxx | 12 +- Rendering/Core/vtkAssemblyNode.h | 8 +- Rendering/Core/vtkAssemblyPaths.cxx | 5 + Rendering/Core/vtkAssemblyPaths.h | 6 +- Rendering/Core/vtkAvatar.h | 8 +- Rendering/Core/vtkBackgroundColorMonitor.cxx | 10 +- Rendering/Core/vtkBackgroundColorMonitor.h | 2 +- Rendering/Core/vtkBillboardTextActor3D.cxx | 33 + Rendering/Core/vtkBillboardTextActor3D.h | 16 + Rendering/Core/vtkCIEDE2000.cxx | 22 +- Rendering/Core/vtkCamera.cxx | 260 +- Rendering/Core/vtkCamera.h | 202 +- Rendering/Core/vtkCameraActor.cxx | 22 +- Rendering/Core/vtkCameraActor.h | 8 +- Rendering/Core/vtkCameraInterpolator.cxx | 36 +- Rendering/Core/vtkCameraInterpolator.h | 32 +- Rendering/Core/vtkCellCenterDepthSort.cxx | 4 +- Rendering/Core/vtkCellPicker.cxx | 81 +- Rendering/Core/vtkCellPicker.h | 56 +- Rendering/Core/vtkColorTransferFunction.cxx | 80 +- Rendering/Core/vtkColorTransferFunction.h | 68 +- .../vtkCompositeDataDisplayAttributes.cxx | 37 +- .../Core/vtkCompositeDataDisplayAttributes.h | 24 +- ...tkCompositeDataDisplayAttributesLegacy.cxx | 7 - .../vtkCompositeDataDisplayAttributesLegacy.h | 18 +- Rendering/Core/vtkCompositePolyDataMapper.cxx | 10 +- Rendering/Core/vtkCompositePolyDataMapper.h | 8 +- Rendering/Core/vtkCoordinate.cxx | 24 +- Rendering/Core/vtkCoordinate.h | 20 +- Rendering/Core/vtkCuller.cxx | 2 +- Rendering/Core/vtkCullerCollection.cxx | 2 +- Rendering/Core/vtkCullerCollection.h | 4 +- Rendering/Core/vtkDataSetMapper.cxx | 20 +- Rendering/Core/vtkDataSetMapper.h | 8 +- .../vtkDiscretizableColorTransferFunction.cxx | 44 +- .../vtkDiscretizableColorTransferFunction.h | 32 +- Rendering/Core/vtkDistanceToCamera.h | 16 +- Rendering/Core/vtkFXAAOptions.h | 28 +- Rendering/Core/vtkFollower.cxx | 112 +- Rendering/Core/vtkFollower.h | 13 +- Rendering/Core/vtkFrameBufferObjectBase.cxx | 6 +- Rendering/Core/vtkFrameBufferObjectBase.h | 4 +- Rendering/Core/vtkFrustumCoverageCuller.h | 14 +- Rendering/Core/vtkGPUInfo.cxx | 6 +- Rendering/Core/vtkGPUInfo.h | 12 +- Rendering/Core/vtkGPUInfoList.cxx | 14 +- Rendering/Core/vtkGPUInfoList.h | 4 +- .../Core/vtkGenericVertexAttributeMapping.cxx | 26 +- Rendering/Core/vtkGlyph3DMapper.cxx | 78 +- Rendering/Core/vtkGlyph3DMapper.h | 60 +- Rendering/Core/vtkGraphMapper.cxx | 80 +- Rendering/Core/vtkGraphMapper.h | 80 +- Rendering/Core/vtkGraphToGlyphs.h | 20 +- Rendering/Core/vtkGraphicsFactory.cxx | 28 +- Rendering/Core/vtkGraphicsFactory.h | 10 +- Rendering/Core/vtkHardwareSelector.cxx | 99 +- Rendering/Core/vtkHardwareSelector.h | 72 +- Rendering/Core/vtkHardwareWindow.cxx | 12 +- Rendering/Core/vtkImageActor.cxx | 48 +- Rendering/Core/vtkImageActor.h | 36 +- Rendering/Core/vtkImageMapper.cxx | 16 +- Rendering/Core/vtkImageMapper.h | 34 +- Rendering/Core/vtkImageMapper3D.cxx | 56 +- Rendering/Core/vtkImageMapper3D.h | 37 +- Rendering/Core/vtkImageProperty.cxx | 12 +- Rendering/Core/vtkImageProperty.h | 56 +- Rendering/Core/vtkImageSlice.cxx | 53 +- Rendering/Core/vtkImageSlice.h | 20 +- Rendering/Core/vtkImageSliceMapper.cxx | 38 +- Rendering/Core/vtkImageSliceMapper.h | 56 +- Rendering/Core/vtkInteractorEventRecorder.cxx | 29 +- Rendering/Core/vtkInteractorEventRecorder.h | 16 +- Rendering/Core/vtkInteractorObserver.cxx | 40 +- Rendering/Core/vtkInteractorObserver.h | 44 +- Rendering/Core/vtkInteractorStyle.cxx | 195 +- Rendering/Core/vtkInteractorStyle.h | 56 +- Rendering/Core/vtkInteractorStyle3D.cxx | 55 +- Rendering/Core/vtkInteractorStyle3D.h | 16 +- .../Core/vtkInteractorStyleSwitchBase.cxx | 10 +- Rendering/Core/vtkLODProp3D.h | 73 +- Rendering/Core/vtkLabeledContourMapper.cxx | 12 +- Rendering/Core/vtkLabeledContourMapper.h | 28 +- Rendering/Core/vtkLight.cxx | 4 +- Rendering/Core/vtkLight.h | 72 +- Rendering/Core/vtkLightActor.cxx | 42 +- Rendering/Core/vtkLightActor.h | 18 +- Rendering/Core/vtkLightCollection.cxx | 2 +- Rendering/Core/vtkLightCollection.h | 4 +- Rendering/Core/vtkLightKit.cxx | 40 +- Rendering/Core/vtkLightKit.h | 32 +- Rendering/Core/vtkLogLookupTable.h | 2 +- Rendering/Core/vtkLookupTableWithEnabling.cxx | 14 +- Rendering/Core/vtkLookupTableWithEnabling.h | 6 +- Rendering/Core/vtkMapArrayValues.h | 28 +- Rendering/Core/vtkMapper.cxx | 19 +- Rendering/Core/vtkMapper.h | 96 +- Rendering/Core/vtkMapper2D.h | 4 +- Rendering/Core/vtkMapperCollection.h | 4 +- Rendering/Core/vtkObserverMediator.cxx | 17 +- Rendering/Core/vtkObserverMediator.h | 10 +- Rendering/Core/vtkPicker.cxx | 18 +- Rendering/Core/vtkPicker.h | 24 +- Rendering/Core/vtkPickingManager.h | 12 +- Rendering/Core/vtkPointGaussianMapper.cxx | 10 +- Rendering/Core/vtkPointGaussianMapper.h | 48 +- Rendering/Core/vtkPointPicker.cxx | 236 +- Rendering/Core/vtkPointPicker.h | 21 +- Rendering/Core/vtkPolyDataMapper.cxx | 43 +- Rendering/Core/vtkPolyDataMapper.h | 22 +- Rendering/Core/vtkPolyDataMapper2D.cxx | 42 +- Rendering/Core/vtkPolyDataMapper2D.h | 40 +- Rendering/Core/vtkProp.cxx | 34 +- Rendering/Core/vtkProp.h | 48 +- Rendering/Core/vtkProp3D.cxx | 66 +- Rendering/Core/vtkProp3D.h | 44 +- Rendering/Core/vtkProp3DCollection.cxx | 2 +- Rendering/Core/vtkProp3DCollection.h | 4 +- Rendering/Core/vtkProp3DFollower.cxx | 30 +- Rendering/Core/vtkProp3DFollower.h | 20 +- Rendering/Core/vtkPropAssembly.h | 8 +- Rendering/Core/vtkPropCollection.cxx | 5 + Rendering/Core/vtkPropCollection.h | 7 +- Rendering/Core/vtkProperty.cxx | 107 +- Rendering/Core/vtkProperty.h | 361 +- Rendering/Core/vtkProperty2D.h | 30 +- Rendering/Core/vtkRayCastStructures.h | 6 +- Rendering/Core/vtkRenderPass.cxx | 20 +- Rendering/Core/vtkRenderPass.h | 4 +- Rendering/Core/vtkRenderState.cxx | 28 +- Rendering/Core/vtkRenderState.h | 8 +- Rendering/Core/vtkRenderTimerLog.cxx | 4 +- Rendering/Core/vtkRenderTimerLog.h | 4 +- Rendering/Core/vtkRenderWindow.cxx | 74 +- Rendering/Core/vtkRenderWindow.h | 160 +- Rendering/Core/vtkRenderWindowCollection.h | 4 +- Rendering/Core/vtkRenderWindowInteractor.cxx | 98 +- Rendering/Core/vtkRenderWindowInteractor.h | 166 +- .../Core/vtkRenderWindowInteractor3D.cxx | 14 +- Rendering/Core/vtkRenderWindowInteractor3D.h | 44 +- Rendering/Core/vtkRenderedAreaPicker.cxx | 8 +- Rendering/Core/vtkRenderer.cxx | 277 +- Rendering/Core/vtkRenderer.h | 323 +- Rendering/Core/vtkRendererCollection.cxx | 2 +- Rendering/Core/vtkRendererCollection.h | 4 +- Rendering/Core/vtkRendererDelegate.h | 4 +- Rendering/Core/vtkRendererSource.cxx | 18 +- Rendering/Core/vtkRendererSource.h | 24 +- .../Core/vtkResizingWindowToImageFilter.cxx | 360 + .../Core/vtkResizingWindowToImageFilter.h | 180 + Rendering/Core/vtkScenePicker.cxx | 22 +- Rendering/Core/vtkScenePicker.h | 8 +- Rendering/Core/vtkSelectVisiblePoints.h | 24 +- Rendering/Core/vtkShaderProperty.cxx | 2 +- Rendering/Core/vtkShaderProperty.h | 12 +- Rendering/Core/vtkSkybox.cxx | 2 +- Rendering/Core/vtkSkybox.h | 21 +- Rendering/Core/vtkStateStorage.h | 163 + Rendering/Core/vtkStereoCompositor.cxx | 24 +- Rendering/Core/vtkStereoCompositor.h | 4 +- Rendering/Core/vtkStringToImage.cxx | 8 +- Rendering/Core/vtkStringToImage.h | 13 +- Rendering/Core/vtkTDxInteractorStyle.cxx | 14 +- Rendering/Core/vtkTDxInteractorStyle.h | 4 +- .../Core/vtkTDxInteractorStyleCamera.cxx | 8 +- .../Core/vtkTDxInteractorStyleSettings.cxx | 6 +- .../Core/vtkTDxInteractorStyleSettings.h | 28 +- Rendering/Core/vtkTDxMotionEventInfo.h | 8 +- Rendering/Core/vtkTextActor.cxx | 58 +- Rendering/Core/vtkTextActor.h | 44 +- Rendering/Core/vtkTextActor3D.cxx | 40 +- Rendering/Core/vtkTextActor3D.h | 12 +- Rendering/Core/vtkTextMapper.cxx | 40 +- Rendering/Core/vtkTextMapper.h | 20 +- Rendering/Core/vtkTextProperty.cxx | 41 +- Rendering/Core/vtkTextProperty.h | 108 +- Rendering/Core/vtkTextPropertyCollection.cxx | 6 +- Rendering/Core/vtkTextRenderer.cxx | 76 +- Rendering/Core/vtkTextRenderer.h | 96 +- Rendering/Core/vtkTexture.cxx | 36 +- Rendering/Core/vtkTexture.h | 139 +- Rendering/Core/vtkTexturedActor2D.cxx | 18 +- Rendering/Core/vtkTexturedActor2D.h | 8 +- .../Core/vtkTransformCoordinateSystems.cxx | 12 +- .../Core/vtkTransformCoordinateSystems.h | 16 +- Rendering/Core/vtkTransformInterpolator.cxx | 34 +- Rendering/Core/vtkTransformInterpolator.h | 24 +- Rendering/Core/vtkTupleInterpolator.cxx | 28 +- Rendering/Core/vtkTupleInterpolator.h | 16 +- Rendering/Core/vtkUniforms.cxx | 4 +- Rendering/Core/vtkUniforms.h | 38 +- .../Core/vtkViewDependentErrorMetric.cxx | 16 +- Rendering/Core/vtkViewDependentErrorMetric.h | 12 +- Rendering/Core/vtkViewport.cxx | 137 +- Rendering/Core/vtkViewport.h | 84 +- Rendering/Core/vtkVisibilitySort.cxx | 12 +- Rendering/Core/vtkVisibilitySort.h | 28 +- Rendering/Core/vtkVolume.cxx | 2 +- Rendering/Core/vtkVolume.h | 12 +- Rendering/Core/vtkVolumeCollection.cxx | 2 +- Rendering/Core/vtkVolumeCollection.h | 4 +- Rendering/Core/vtkVolumeProperty.cxx | 100 +- Rendering/Core/vtkVolumeProperty.h | 72 +- Rendering/Core/vtkWindowLevelLookupTable.cxx | 8 +- Rendering/Core/vtkWindowLevelLookupTable.h | 22 +- Rendering/Core/vtkWindowToImageFilter.cxx | 44 +- Rendering/Core/vtkWindowToImageFilter.h | 28 +- Rendering/Core/vtkWorldPointPicker.h | 6 +- Rendering/External/ExternalVTKWidget.cxx | 18 +- .../Testing/Cxx/TestGLUTRenderWindow.cxx | 22 +- Rendering/External/vtkExternalLight.cxx | 32 +- Rendering/External/vtkExternalLight.h | 48 +- .../External/vtkExternalOpenGLCamera.cxx | 11 +- Rendering/External/vtkExternalOpenGLCamera.h | 2 +- .../vtkExternalOpenGLRenderWindow.cxx | 31 +- .../External/vtkExternalOpenGLRenderWindow.h | 8 +- .../External/vtkExternalOpenGLRenderer.cxx | 25 +- Rendering/FFMPEGOpenGL2/CMakeLists.txt | 7 + .../FFMPEGOpenGL2/Testing/CMakeLists.txt | 4 + .../FFMPEGOpenGL2/Testing/Cxx/CMakeLists.txt | 5 + .../Testing/Cxx/TestMovieSphere.cxx | 74 + Rendering/FFMPEGOpenGL2/vtk.module | 11 + .../FFMPEGOpenGL2/vtkOpenGLMovieSphere.cxx | 284 + .../FFMPEGOpenGL2/vtkOpenGLMovieSphere.h | 95 + Rendering/FreeType/Testing/Cxx/CMakeLists.txt | 10 +- .../Testing/Cxx/TestBillboardTextActor3D.cxx | 4 +- .../Testing/Cxx/TestFTStringToPath.cxx | 4 +- .../Testing/Cxx/TestFlagpoleLabel.cxx | 2 +- .../Testing/Cxx/TestFontDPIScaling.cxx | 2 +- .../Testing/Cxx/TestFreeTypeTextMapper.cxx | 2 +- .../Cxx/TestFreeTypeTextMapperNoMath.cxx | 2 +- .../Cxx/TestFreeTypeTextMapperWithColumns.cxx | 260 + .../Testing/Cxx/TestFreeTypeTools.cxx | 4 +- .../Testing/Cxx/TestMathTextFonts.cxx | 140 + .../Cxx/TestMathTextFreeTypeTextRenderer.cxx | 2 +- ...TestMathTextFreeTypeTextRendererNoMath.cxx | 2 +- .../FreeType/Testing/Cxx/TestTextActor.cxx | 2 +- .../FreeType/Testing/Cxx/TestTextActor3D.cxx | 2 +- .../Cxx/TestTextActorScaleModeProp.cxx | 2 +- .../FreeType/Testing/Cxx/TestTextMapper.cxx | 2 +- .../Baseline/TestFontDPIScaling.png.sha512 | 2 +- .../TestFreeTypeTextMapper.png.sha512 | 2 +- .../TestFreeTypeTextMapperNoMath.png.sha512 | 2 +- ...stFreeTypeTextMapperWithColumns.png.sha512 | 1 + .../Baseline/TestMathTextFonts.png.sha512 | 1 + ...estMathTextFreeTypeTextRenderer.png.sha512 | 2 +- ...hTextFreeTypeTextRendererNoMath.png.sha512 | 2 +- .../TestTextActorDepthPeeling.png.sha512 | 2 +- .../Data/Baseline/multiLineText.png.sha512 | 2 +- .../FreeType/vtkFreeTypeStringToImage.cxx | 23 +- Rendering/FreeType/vtkFreeTypeStringToImage.h | 9 +- Rendering/FreeType/vtkFreeTypeTools.cxx | 157 +- Rendering/FreeType/vtkFreeTypeTools.h | 92 +- .../vtkMathTextFreeTypeTextRenderer.cxx | 3 + .../vtkMathTextFreeTypeTextRenderer.h | 8 +- Rendering/FreeType/vtkMathTextUtilities.cxx | 22 +- Rendering/FreeType/vtkMathTextUtilities.h | 8 +- .../FreeType/vtkTextRendererStringToImage.cxx | 23 +- .../FreeType/vtkTextRendererStringToImage.h | 8 +- Rendering/FreeType/vtkVectorText.cxx | 1 + Rendering/FreeType/vtkVectorText.h | 4 +- Rendering/FreeType/vtkVectorTextData.cxx | 18 +- .../Testing/Cxx/TestSystemFontRendering.cxx | 4 +- .../TestSystemFontRendering_8.png.sha512 | 1 + .../vtkFontConfigFreeTypeTools.cxx | 12 +- .../GL2PSOpenGL2/vtkOpenGLGL2PSHelperImpl.cxx | 8 +- .../GL2PSOpenGL2/vtkOpenGLGL2PSHelperImpl.h | 10 +- Rendering/Image/vtkDepthImageToPointCloud.cxx | 20 +- Rendering/Image/vtkDepthImageToPointCloud.h | 32 +- Rendering/Image/vtkImageResliceMapper.cxx | 52 +- Rendering/Image/vtkImageResliceMapper.h | 46 +- Rendering/Image/vtkImageSliceCollection.cxx | 16 +- Rendering/Image/vtkImageSliceCollection.h | 3 +- Rendering/Image/vtkImageStack.cxx | 55 +- Rendering/Image/vtkImageStack.h | 16 +- .../LICOpenGL2/Testing/Cxx/CMakeLists.txt | 2 +- .../Testing/Cxx/TestImageDataLIC2D.cxx | 12 +- .../LICOpenGL2/Testing/Cxx/TestSurfaceLIC.cxx | 6 +- .../Cxx/vtkStructuredGridLIC2DTestDriver.cxx | 12 +- .../Testing/Cxx/vtkSurfaceLICTestDriver.cxx | 2 +- .../vtkCompositeSurfaceLICMapper.cxx | 85 +- .../LICOpenGL2/vtkCompositeSurfaceLICMapper.h | 4 +- Rendering/LICOpenGL2/vtkImageDataLIC2D.cxx | 23 +- Rendering/LICOpenGL2/vtkImageDataLIC2D.h | 22 +- Rendering/LICOpenGL2/vtkLICNoiseHelper.cxx | 12 +- Rendering/LICOpenGL2/vtkLICNoiseHelper.h | 9 +- .../vtkLineIntegralConvolution2D.cxx | 99 +- .../LICOpenGL2/vtkLineIntegralConvolution2D.h | 48 +- Rendering/LICOpenGL2/vtkPainterCommunicator.h | 4 +- .../LICOpenGL2/vtkStructuredGridLIC2D.cxx | 26 +- Rendering/LICOpenGL2/vtkStructuredGridLIC2D.h | 18 +- .../LICOpenGL2/vtkSurfaceLICComposite.cxx | 35 +- Rendering/LICOpenGL2/vtkSurfaceLICHelper.cxx | 15 +- Rendering/LICOpenGL2/vtkSurfaceLICHelper.h | 15 +- .../LICOpenGL2/vtkSurfaceLICInterface.cxx | 43 +- Rendering/LICOpenGL2/vtkSurfaceLICInterface.h | 116 +- Rendering/LICOpenGL2/vtkSurfaceLICMapper.cxx | 76 +- Rendering/LICOpenGL2/vtkSurfaceLICMapper.h | 4 +- Rendering/LICOpenGL2/vtkTextureIO.cxx | 6 +- Rendering/LICOpenGL2/vtkTextureIO.h | 19 +- Rendering/LOD/vtkLODActor.cxx | 64 +- Rendering/LOD/vtkLODActor.h | 18 +- Rendering/LOD/vtkQuadricLODActor.cxx | 58 +- Rendering/LOD/vtkQuadricLODActor.h | 38 +- Rendering/Label/CMakeLists.txt | 2 +- Rendering/Label/vtkDynamic2DLabelMapper.cxx | 19 +- Rendering/Label/vtkDynamic2DLabelMapper.h | 20 +- .../Label/vtkFreeTypeLabelRenderStrategy.cxx | 14 +- .../Label/vtkFreeTypeLabelRenderStrategy.h | 5 +- Rendering/Label/vtkLabelHierarchy.cxx | 16 +- Rendering/Label/vtkLabelHierarchy.h | 52 +- .../Label/vtkLabelHierarchyAlgorithm.cxx | 40 +- Rendering/Label/vtkLabelHierarchyAlgorithm.h | 12 +- .../vtkLabelHierarchyCompositeIterator.cxx | 2 +- Rendering/Label/vtkLabelHierarchyIterator.cxx | 3 + Rendering/Label/vtkLabelHierarchyIterator.h | 9 +- Rendering/Label/vtkLabelHierarchyPrivate.h | 2 +- Rendering/Label/vtkLabelPlacementMapper.cxx | 22 +- Rendering/Label/vtkLabelPlacementMapper.h | 60 +- Rendering/Label/vtkLabelPlacer.cxx | 9 +- Rendering/Label/vtkLabelPlacer.h | 36 +- Rendering/Label/vtkLabelRenderStrategy.cxx | 37 +- Rendering/Label/vtkLabelRenderStrategy.h | 35 +- Rendering/Label/vtkLabelSizeCalculator.cxx | 4 +- Rendering/Label/vtkLabelSizeCalculator.h | 12 +- Rendering/Label/vtkLabeledDataMapper.cxx | 50 +- Rendering/Label/vtkLabeledDataMapper.h | 48 +- .../Label/vtkLabeledTreeMapDataMapper.cxx | 8 +- Rendering/Label/vtkLabeledTreeMapDataMapper.h | 24 +- .../Label/vtkPointSetToLabelHierarchy.cxx | 3 + Rendering/Label/vtkPointSetToLabelHierarchy.h | 40 +- .../Testing/Cxx/TestContextMathTextImage.cxx | 6 +- .../Testing/Cxx/TestGL2PSFontDPIScaling.cxx | 2 +- .../Testing/Cxx/TestGL2PSMathTextActor.cxx | 2 +- .../Testing/Cxx/TestGL2PSMathTextActor3D.cxx | 2 +- .../Testing/Cxx/TestGL2PSMathTextOutput.cxx | 6 +- .../Testing/Cxx/TestGL2PSMathTextScaling.cxx | 6 +- .../Cxx/TestIndexedLookupScalarBar.cxx | 4 +- .../Testing/Cxx/TestMathTextActor.cxx | 2 +- .../Testing/Cxx/TestMathTextActor3D.cxx | 2 +- .../Testing/Cxx/TestRenderString.cxx | 2 +- .../Cxx/TestScalarBarCombinatorics.cxx | 2 +- .../Testing/Cxx/TestStringToPath.cxx | 6 +- ...stGL2PSFontDPIScaling-rasterRef.png.sha512 | 2 +- .../TestGL2PSFontDPIScaling.png.sha512 | 2 +- .../TestScalarBarCombinatorics.png.sha512 | 2 +- .../vtkMatplotlibMathTextUtilities.cxx | 685 +- .../vtkMatplotlibMathTextUtilities.h | 98 +- Rendering/OpenGL2/CMakeLists.txt | 57 +- Rendering/OpenGL2/Testing/CMakeLists.txt | 2 + Rendering/OpenGL2/Testing/Cxx/CMakeLists.txt | 62 +- .../Testing/Cxx/TestBlockOpacity.cxx | 0 .../Testing/Cxx/TestBlockVisibility.cxx | 125 + .../Testing/Cxx/TestCameraShiftScale.cxx | 160 + .../OpenGL2/Testing/Cxx/TestCoincident.cxx | 2 +- .../Cxx/TestCompositeDataPointGaussian.cxx | 143 + ...estCompositeDataPointGaussianSelection.cxx | 164 + .../Cxx/TestCompositePolyDataMapper2.cxx | 200 + ...mpositePolyDataMapper2CameraShiftScale.cxx | 168 + ...estCompositePolyDataMapper2CellScalars.cxx | 183 + ...olyDataMapper2MixedGeometryCellScalars.cxx | 203 + ...ositePolyDataMapper2MixedGeometryEdges.cxx | 203 + .../TestCompositePolyDataMapper2Picking.cxx | 321 + .../TestCompositePolyDataMapper2Scalars.cxx | 177 + .../TestCompositePolyDataMapper2Spheres.cxx | 6 +- .../TestCompositePolyDataMapper2Vertices.cxx | 6 +- Rendering/OpenGL2/Testing/Cxx/TestCubeMap.cxx | 2 +- .../OpenGL2/Testing/Cxx/TestCubeMap2.cxx | 2 +- .../Testing/Cxx/TestCubeMapRerender.cxx | 2 +- .../Testing/Cxx/TestCustomCursorShape.cxx | 57 + .../Cxx/TestDirectSelectionRendering.cxx | 122 + Rendering/OpenGL2/Testing/Cxx/TestEDLPass.cxx | 2 +- .../OpenGL2/Testing/Cxx/TestFXAAPass.cxx | 2 +- .../Testing/Cxx/TestFXAAWithEDLPass.cxx | 66 + Rendering/OpenGL2/Testing/Cxx/TestFloor.cxx | 2 +- .../OpenGL2/Testing/Cxx/TestFluidDemo.cxx | 120 +- .../OpenGL2/Testing/Cxx/TestFluidMapper.cxx | 7 +- .../Testing/Cxx/TestFramebufferHDR.cxx | 2 +- .../Testing/Cxx/TestFramebufferPass.cxx | 2 +- .../Cxx/TestGlyph3DMapperCellPicking.cxx | 7 +- ...yph3DMapperTreeIndexingCompositeGlyphs.cxx | 0 .../Testing/Cxx/TestHiddenLineRemovalPass.cxx | 0 .../TestMultiBlockPartialArrayFieldData.cxx | 0 .../TestMultiBlockPartialArrayPointData.cxx | 0 .../Testing/Cxx/TestMultiTexturing.cxx | 2 +- .../TestMultiTexturingInterpolateScalars.cxx | 97 + .../OpenGL2/Testing/Cxx/TestNormalMapping.cxx | 2 +- .../Cxx/TestOffscreenRenderingResize.cxx | 2 +- .../Testing/Cxx/TestOutlineGlowPass.cxx | 100 + .../OpenGL2/Testing/Cxx/TestPBRAnisotropy.cxx | 155 + .../OpenGL2/Testing/Cxx/TestPBRClearCoat.cxx | 171 + .../OpenGL2/Testing/Cxx/TestPBREdgeTint.cxx | 162 + .../Testing/Cxx/TestPBRHdrEnvironment.cxx | 104 + .../Testing/Cxx/TestPBRIrradianceHDR.cxx | 77 + .../OpenGL2/Testing/Cxx/TestPBRMapping.cxx | 21 +- .../OpenGL2/Testing/Cxx/TestPBRMaterials.cxx | 14 +- .../Testing/Cxx/TestPBRMaterialsCoat.cxx | 167 + .../Testing/Cxx/TestPointGaussianMapper.cxx | 4 +- .../Cxx/TestPointGaussianMapperOpacity.cxx | 4 +- .../Cxx/TestRemoveActorNonCurrentContext.cxx | 4 +- Rendering/OpenGL2/Testing/Cxx/TestSDL2.cxx | 74 + Rendering/OpenGL2/Testing/Cxx/TestSRGB.cxx | 2 +- .../OpenGL2/Testing/Cxx/TestSSAOPass.cxx | 2 +- .../Testing/Cxx/TestSSAOPassWithRenderer.cxx | 85 + .../OpenGL2/Testing/Cxx/TestSetZBuffer.cxx | 2 +- .../Testing/Cxx/TestShadowMapBakerPass.cxx | 2 +- .../OpenGL2/Testing/Cxx/TestShadowMapPass.cxx | 2 +- .../Testing/Cxx/TestSharedRenderWindow.cxx | 2 +- .../Testing/Cxx/TestSimpleMotionBlur.cxx | 2 +- .../OpenGL2/Testing/Cxx/TestSphereMap.cxx | 2 +- .../OpenGL2/Testing/Cxx/TestSpherePoints.cxx | 4 +- .../OpenGL2/Testing/Cxx/TestSphereVertex.cxx | 4 +- .../OpenGL2/Testing/Cxx/TestUserShader.cxx | 2 +- .../OpenGL2/Testing/Cxx/TestUserShader2.cxx | 4 +- .../OpenGL2/Testing/Cxx/TestVBOPLYMapper.cxx | 2 +- .../Testing/Cxx/TestVBOPointsLines.cxx | 2 +- .../Cxx/TestValuePassFloatingPoint.cxx | 293 + .../OpenGL2/Testing/Cxx/TestWindowBlits.cxx | 253 + .../Data/Baseline/TestBlockOpacity.png.sha512 | 0 .../Baseline/TestBlockOpacity_1.png.sha512 | 0 .../Baseline/TestBlockVisibility.png.sha512 | 0 .../Baseline/TestCameraShiftScale.png.sha512 | 1 + .../TestCompositeDataPointGaussian.png.sha512 | 0 ...ositeDataPointGaussianSelection.png.sha512 | 0 .../TestCompositePolyDataMapper2.png.sha512 | 1 + ...PolyDataMapper2CameraShiftScale.png.sha512 | 1 + ...ositePolyDataMapper2CellScalars.png.sha512 | 1 + ...Mapper2MixedGeometryCellScalars.png.sha512 | 1 + ...lyDataMapper2MixedGeometryEdges.png.sha512 | 1 + ...CompositePolyDataMapper2Picking.png.sha512 | 1 + ...CompositePolyDataMapper2Scalars.png.sha512 | 1 + ...CompositePolyDataMapper2Spheres.png.sha512 | 2 +- ...mpositePolyDataMapper2Spheres_1.png.sha512 | 1 - ...ompositePolyDataMapper2Vertices.png.sha512 | 2 +- .../TestDirectSelectionRendering.png.sha512 | 1 + .../Baseline/TestFXAAWithEDLPass.png.sha512 | 1 + ...pperTreeIndexingCompositeGlyphs.png.sha512 | 0 .../TestHiddenLineRemovalPass.png.sha512 | 0 ...MultiBlockPartialArrayFieldData.png.sha512 | 0 ...MultiBlockPartialArrayPointData.png.sha512 | 0 ...ultiTexturingInterpolateScalars.png.sha512 | 1 + .../Baseline/TestOutlineGlowPass.png.sha512 | 1 + .../Baseline/TestPBRAnisotropy.png.sha512 | 1 + .../Data/Baseline/TestPBRClearCoat.png.sha512 | 1 + .../Data/Baseline/TestPBREdgeTint.png.sha512 | 1 + .../Baseline/TestPBRHdrEnvironment.png.sha512 | 1 + .../Baseline/TestPBRIrradianceHDR.png.sha512 | 1 + .../Data/Baseline/TestPBRMapping.png.sha512 | 2 +- .../Data/Baseline/TestPBRMaterials.png.sha512 | 2 +- .../Baseline/TestPBRMaterialsCoat.png.sha512 | 1 + .../Testing/Data/Baseline/TestSDL2.png.sha512 | 1 + .../TestSSAOPassWithRenderer.png.sha512 | 1 + .../Data/Baseline/TestSpherePoints.png.sha512 | 2 +- .../Data/Baseline/TestSphereVertex.png.sha512 | 2 +- .../TestValuePassFloatingPoint.png.sha512 | 0 .../TestValuePassFloatingPoint_1.png.sha512 | 0 .../TestValuePassFloatingPoint_2.png.sha512 | 0 .../Data/Baseline/TestWindowBlits.png.sha512 | 1 + Rendering/OpenGL2/ViewToZbufferConversion.txt | 91 - Rendering/OpenGL2/glsl/vtkFXAAFilterFS.glsl | 7 +- .../glsl/vtkOutlineGlowBlurPassFS.glsl | 37 + .../glsl/vtkOutlineGlowUpscalePassFS.glsl | 44 + Rendering/OpenGL2/glsl/vtkPBRFunctions.glsl | 81 + .../OpenGL2/glsl/vtkPolyDataEdgesGS.glsl | 128 + Rendering/OpenGL2/glsl/vtkPolyDataFS.glsl | 5 + Rendering/OpenGL2/glsl/vtkPolyDataVS.glsl | 4 + Rendering/OpenGL2/vtk.module | 9 + Rendering/OpenGL2/vtkCameraPass.cxx | 10 +- Rendering/OpenGL2/vtkCameraPass.h | 12 +- Rendering/OpenGL2/vtkClearRGBPass.cxx | 8 +- Rendering/OpenGL2/vtkClearRGBPass.h | 4 +- Rendering/OpenGL2/vtkClearZPass.cxx | 8 +- Rendering/OpenGL2/vtkClearZPass.h | 4 +- Rendering/OpenGL2/vtkCocoaGLView.mm | 34 +- Rendering/OpenGL2/vtkCocoaRenderWindow.h | 57 +- Rendering/OpenGL2/vtkCocoaRenderWindow.mm | 48 +- Rendering/OpenGL2/vtkCompositeMapperHelper2.h | 179 + .../OpenGL2/vtkCompositePolyDataMapper2.cxx | 538 +- .../OpenGL2/vtkCompositePolyDataMapper2.h | 46 +- .../vtkCompositePolyDataMapper2Internal.h | 155 +- Rendering/OpenGL2/vtkDataTransferHelper.cxx | 34 +- Rendering/OpenGL2/vtkDataTransferHelper.h | 34 +- Rendering/OpenGL2/vtkDefaultPass.cxx | 24 +- .../OpenGL2/vtkDepthImageProcessingPass.cxx | 10 +- Rendering/OpenGL2/vtkDepthOfFieldPass.cxx | 10 +- Rendering/OpenGL2/vtkDepthOfFieldPass.h | 4 +- Rendering/OpenGL2/vtkDepthPeelingPass.cxx | 20 +- Rendering/OpenGL2/vtkDepthPeelingPass.h | 16 +- Rendering/OpenGL2/vtkDualDepthPeelingPass.cxx | 5 +- Rendering/OpenGL2/vtkDualDepthPeelingPass.h | 8 +- Rendering/OpenGL2/vtkDummyGPUInfoList.cxx | 8 +- Rendering/OpenGL2/vtkDummyGPUInfoList.h | 4 +- Rendering/OpenGL2/vtkEDLShading.cxx | 29 +- Rendering/OpenGL2/vtkEDLShading.h | 4 +- Rendering/OpenGL2/vtkEGLRenderWindow.cxx | 76 +- Rendering/OpenGL2/vtkEGLRenderWindow.h | 17 +- .../vtkEquirectangularToCubeMapTexture.cxx | 2 +- .../vtkEquirectangularToCubeMapTexture.h | 8 +- Rendering/OpenGL2/vtkFramebufferPass.cxx | 14 +- Rendering/OpenGL2/vtkFramebufferPass.h | 4 +- Rendering/OpenGL2/vtkGaussianBlurPass.cxx | 10 +- .../OpenGL2/vtkGenericOpenGLRenderWindow.cxx | 58 +- .../OpenGL2/vtkGenericOpenGLRenderWindow.h | 22 +- Rendering/OpenGL2/vtkIOSRenderWindow.h | 36 +- Rendering/OpenGL2/vtkIOSRenderWindow.mm | 46 +- Rendering/OpenGL2/vtkImageProcessingPass.cxx | 17 +- Rendering/OpenGL2/vtkImageProcessingPass.h | 4 +- Rendering/OpenGL2/vtkLightingMapPass.cxx | 10 +- Rendering/OpenGL2/vtkLightingMapPass.h | 4 +- Rendering/OpenGL2/vtkLightsPass.cxx | 8 +- Rendering/OpenGL2/vtkOSOpenGLRenderWindow.cxx | 23 +- Rendering/OpenGL2/vtkOSOpenGLRenderWindow.h | 12 +- Rendering/OpenGL2/vtkOpaquePass.cxx | 8 +- Rendering/OpenGL2/vtkOpenGL.h | 17 +- Rendering/OpenGL2/vtkOpenGLActor.cxx | 2 +- Rendering/OpenGL2/vtkOpenGLBufferObject.cxx | 2 +- Rendering/OpenGL2/vtkOpenGLCamera.cxx | 4 +- .../OpenGL2/vtkOpenGLCellToVTKCellMap.cxx | 22 +- Rendering/OpenGL2/vtkOpenGLFXAAFilter.cxx | 6 +- Rendering/OpenGL2/vtkOpenGLFXAAFilter.h | 4 +- Rendering/OpenGL2/vtkOpenGLFXAAPass.cxx | 14 +- Rendering/OpenGL2/vtkOpenGLFXAAPass.h | 9 +- Rendering/OpenGL2/vtkOpenGLFluidMapper.cxx | 32 +- Rendering/OpenGL2/vtkOpenGLFluidMapper.h | 68 +- .../OpenGL2/vtkOpenGLFramebufferObject.cxx | 117 +- .../OpenGL2/vtkOpenGLFramebufferObject.h | 43 +- Rendering/OpenGL2/vtkOpenGLGL2PSHelper.h | 28 +- Rendering/OpenGL2/vtkOpenGLGlyph3DHelper.cxx | 46 +- Rendering/OpenGL2/vtkOpenGLGlyph3DHelper.h | 8 +- Rendering/OpenGL2/vtkOpenGLGlyph3DMapper.cxx | 32 +- Rendering/OpenGL2/vtkOpenGLGlyph3DMapper.h | 8 +- .../OpenGL2/vtkOpenGLHardwareSelector.cxx | 49 +- .../OpenGL2/vtkOpenGLImageAlgorithmHelper.cxx | 6 +- .../OpenGL2/vtkOpenGLImageAlgorithmHelper.h | 6 +- Rendering/OpenGL2/vtkOpenGLImageMapper.cxx | 41 +- Rendering/OpenGL2/vtkOpenGLImageMapper.h | 2 +- .../OpenGL2/vtkOpenGLImageSliceMapper.cxx | 28 +- .../OpenGL2/vtkOpenGLIndexBufferObject.cxx | 36 +- .../OpenGL2/vtkOpenGLIndexBufferObject.h | 6 +- .../OpenGL2/vtkOpenGLInstanceCulling.cxx | 10 +- Rendering/OpenGL2/vtkOpenGLInstanceCulling.h | 9 +- .../OpenGL2/vtkOpenGLLabeledContourMapper.cxx | 12 +- Rendering/OpenGL2/vtkOpenGLLight.cxx | 2 +- Rendering/OpenGL2/vtkOpenGLLight.h | 4 +- .../OpenGL2/vtkOpenGLPointGaussianMapper.cxx | 103 +- .../OpenGL2/vtkOpenGLPointGaussianMapper.h | 2 +- Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx | 1841 +- Rendering/OpenGL2/vtkOpenGLPolyDataMapper.h | 172 +- .../OpenGL2/vtkOpenGLPolyDataMapper2D.cxx | 64 +- Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.h | 2 +- Rendering/OpenGL2/vtkOpenGLProperty.cxx | 12 +- Rendering/OpenGL2/vtkOpenGLQuadHelper.cxx | 2 +- Rendering/OpenGL2/vtkOpenGLRenderPass.h | 10 +- Rendering/OpenGL2/vtkOpenGLRenderTimer.h | 8 +- Rendering/OpenGL2/vtkOpenGLRenderTimerLog.cxx | 4 +- .../OpenGL2/vtkOpenGLRenderUtilities.cxx | 8 +- Rendering/OpenGL2/vtkOpenGLRenderUtilities.h | 16 +- Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx | 938 +- Rendering/OpenGL2/vtkOpenGLRenderWindow.h | 202 +- Rendering/OpenGL2/vtkOpenGLRenderer.cxx | 109 +- Rendering/OpenGL2/vtkOpenGLRenderer.h | 34 +- .../OpenGL2/vtkOpenGLResourceFreeCallback.h | 4 +- Rendering/OpenGL2/vtkOpenGLShaderCache.cxx | 8 +- Rendering/OpenGL2/vtkOpenGLShaderProperty.cxx | 10 +- Rendering/OpenGL2/vtkOpenGLShaderProperty.h | 10 +- Rendering/OpenGL2/vtkOpenGLSkybox.cxx | 157 +- Rendering/OpenGL2/vtkOpenGLSkybox.h | 1 + Rendering/OpenGL2/vtkOpenGLSphereMapper.cxx | 20 +- Rendering/OpenGL2/vtkOpenGLSphereMapper.h | 6 +- Rendering/OpenGL2/vtkOpenGLState.cxx | 1218 +- Rendering/OpenGL2/vtkOpenGLState.h | 143 +- Rendering/OpenGL2/vtkOpenGLStickMapper.cxx | 22 +- Rendering/OpenGL2/vtkOpenGLStickMapper.h | 12 +- Rendering/OpenGL2/vtkOpenGLTexture.cxx | 66 +- Rendering/OpenGL2/vtkOpenGLTexture.h | 10 +- Rendering/OpenGL2/vtkOpenGLUniforms.cxx | 36 +- Rendering/OpenGL2/vtkOpenGLUniforms.h | 28 +- .../OpenGL2/vtkOpenGLVertexArrayObject.cxx | 4 +- .../OpenGL2/vtkOpenGLVertexBufferObject.cxx | 263 +- .../OpenGL2/vtkOpenGLVertexBufferObject.h | 44 +- .../vtkOpenGLVertexBufferObjectCache.cxx | 10 +- .../vtkOpenGLVertexBufferObjectGroup.cxx | 14 +- .../vtkOpenGLVertexBufferObjectGroup.h | 4 +- .../vtkOrderIndependentTranslucentPass.cxx | 35 +- .../vtkOrderIndependentTranslucentPass.h | 8 +- Rendering/OpenGL2/vtkOutlineGlowPass.cxx | 500 + Rendering/OpenGL2/vtkOutlineGlowPass.h | 118 + Rendering/OpenGL2/vtkOverlayPass.cxx | 8 +- Rendering/OpenGL2/vtkPBRIrradianceTexture.cxx | 2 +- Rendering/OpenGL2/vtkPBRIrradianceTexture.h | 16 +- Rendering/OpenGL2/vtkPBRLUTTexture.h | 8 +- Rendering/OpenGL2/vtkPBRPrefilterTexture.cxx | 182 +- Rendering/OpenGL2/vtkPBRPrefilterTexture.h | 48 +- .../OpenGL2/vtkPanoramicProjectionPass.cxx | 26 +- .../OpenGL2/vtkPanoramicProjectionPass.h | 16 +- Rendering/OpenGL2/vtkPixelBufferObject.cxx | 58 +- Rendering/OpenGL2/vtkPixelBufferObject.h | 46 +- Rendering/OpenGL2/vtkPointFillPass.cxx | 10 +- Rendering/OpenGL2/vtkPointFillPass.h | 8 +- Rendering/OpenGL2/vtkRenderPassCollection.cxx | 16 +- Rendering/OpenGL2/vtkRenderStepsPass.cxx | 10 +- Rendering/OpenGL2/vtkRenderStepsPass.h | 28 +- Rendering/OpenGL2/vtkRenderbuffer.cxx | 26 +- Rendering/OpenGL2/vtkRenderbuffer.h | 12 +- .../OpenGL2/vtkSDL2OpenGLRenderWindow.cxx | 384 + Rendering/OpenGL2/vtkSDL2OpenGLRenderWindow.h | 189 + Rendering/OpenGL2/vtkSSAAPass.cxx | 10 +- Rendering/OpenGL2/vtkSSAAPass.h | 4 +- Rendering/OpenGL2/vtkSSAOPass.cxx | 50 +- Rendering/OpenGL2/vtkSSAOPass.h | 16 +- Rendering/OpenGL2/vtkSequencePass.cxx | 10 +- Rendering/OpenGL2/vtkSequencePass.h | 4 +- Rendering/OpenGL2/vtkShader.cxx | 2 +- Rendering/OpenGL2/vtkShaderProgram.cxx | 4 +- Rendering/OpenGL2/vtkShaderProgram.h | 34 +- Rendering/OpenGL2/vtkShadowMapBakerPass.cxx | 47 +- Rendering/OpenGL2/vtkShadowMapBakerPass.h | 20 +- Rendering/OpenGL2/vtkShadowMapPass.cxx | 10 +- Rendering/OpenGL2/vtkShadowMapPass.h | 8 +- Rendering/OpenGL2/vtkSimpleMotionBlurPass.cxx | 16 +- Rendering/OpenGL2/vtkSimpleMotionBlurPass.h | 8 +- .../OpenGL2/vtkSobelGradientMagnitudePass.cxx | 11 +- Rendering/OpenGL2/vtkStateStorage.h | 169 - Rendering/OpenGL2/vtkTestOpenGLVersion.cxx | 4 +- Rendering/OpenGL2/vtkTextureObject.cxx | 262 +- Rendering/OpenGL2/vtkTextureObject.h | 126 +- Rendering/OpenGL2/vtkTextureUnitManager.cxx | 18 +- Rendering/OpenGL2/vtkToneMappingPass.cxx | 13 +- Rendering/OpenGL2/vtkToneMappingPass.h | 38 +- Rendering/OpenGL2/vtkTransformFeedback.cxx | 3 +- Rendering/OpenGL2/vtkTransformFeedback.h | 12 +- Rendering/OpenGL2/vtkTranslucentPass.cxx | 8 +- Rendering/OpenGL2/vtkValuePass.cxx | 73 +- Rendering/OpenGL2/vtkValuePass.h | 28 +- Rendering/OpenGL2/vtkVolumetricPass.cxx | 8 +- .../OpenGL2/vtkWin32OpenGLRenderWindow.cxx | 247 +- .../OpenGL2/vtkWin32OpenGLRenderWindow.h | 41 +- Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx | 126 +- Rendering/OpenGL2/vtkXOpenGLRenderWindow.h | 44 +- Rendering/OpenVR/CMakeLists.txt | 67 +- Rendering/OpenVR/Testing/Cxx/Medical.cxx | 2 +- Rendering/OpenVR/Testing/Cxx/TestAvatar.cxx | 2 +- Rendering/OpenVR/Testing/Cxx/TestDragon.cxx | 2 +- Rendering/OpenVR/vtk.module | 3 +- Rendering/OpenVR/vtkOpenGLAvatar.cxx | 537 - Rendering/OpenVR/vtkOpenGLAvatar.h | 91 - Rendering/OpenVR/vtkOpenVRCamera.cxx | 41 +- Rendering/OpenVR/vtkOpenVRCamera.h | 26 +- Rendering/OpenVR/vtkOpenVRControlsHelper.cxx | 424 +- Rendering/OpenVR/vtkOpenVRControlsHelper.h | 131 +- Rendering/OpenVR/vtkOpenVRDefaultOverlay.cxx | 17 +- Rendering/OpenVR/vtkOpenVRDefaultOverlay.h | 5 +- Rendering/OpenVR/vtkOpenVRFollower.cxx | 155 - Rendering/OpenVR/vtkOpenVRFollower.h | 53 - Rendering/OpenVR/vtkOpenVRHardwarePicker.cxx | 127 - Rendering/OpenVR/vtkOpenVRHardwarePicker.h | 63 - Rendering/OpenVR/vtkOpenVRInteractorStyle.cxx | 383 +- Rendering/OpenVR/vtkOpenVRInteractorStyle.h | 65 +- .../OpenVR/vtkOpenVRMenuRepresentation.cxx | 327 - .../OpenVR/vtkOpenVRMenuRepresentation.h | 113 - Rendering/OpenVR/vtkOpenVRMenuWidget.cxx | 250 - Rendering/OpenVR/vtkOpenVRMenuWidget.h | 117 - Rendering/OpenVR/vtkOpenVRModel.cxx | 155 +- Rendering/OpenVR/vtkOpenVRModel.h | 59 +- Rendering/OpenVR/vtkOpenVROverlay.cxx | 8 +- Rendering/OpenVR/vtkOpenVROverlay.h | 19 +- .../OpenVR/vtkOpenVRPanelRepresentation.cxx | 581 - .../OpenVR/vtkOpenVRPanelRepresentation.h | 177 - Rendering/OpenVR/vtkOpenVRPanelWidget.cxx | 156 - Rendering/OpenVR/vtkOpenVRPanelWidget.h | 86 - Rendering/OpenVR/vtkOpenVRPropPicker.cxx | 48 - Rendering/OpenVR/vtkOpenVRPropPicker.h | 48 - Rendering/OpenVR/vtkOpenVRRay.cxx | 141 - Rendering/OpenVR/vtkOpenVRRay.h | 74 - Rendering/OpenVR/vtkOpenVRRenderWindow.cxx | 627 +- Rendering/OpenVR/vtkOpenVRRenderWindow.h | 351 +- .../vtkOpenVRRenderWindowInteractor.cxx | 699 +- .../OpenVR/vtkOpenVRRenderWindowInteractor.h | 100 +- Rendering/OpenVR/vtkOpenVRRenderer.cxx | 313 +- Rendering/OpenVR/vtkOpenVRRenderer.h | 66 +- Rendering/OpenVR/vtk_openvr_actions.json | 67 + ...vtk_openvr_binding_hpmotioncontroller.json | 90 + .../vtk_openvr_binding_oculus_touch.json | 71 + .../vtk_openvr_binding_vive_controller.json | 74 + Rendering/Parallel/Testing/Cxx/PrmMagnify.cxx | 26 +- .../Testing/Cxx/TestClientServerRendering.cxx | 12 +- .../Testing/Cxx/TestParallelRendering.cxx | 2 +- .../Testing/Cxx/TestSimplePCompositeZPass.cxx | 2 +- .../Parallel/vtkClientServerCompositePass.cxx | 10 +- .../Parallel/vtkClientServerCompositePass.h | 20 +- .../vtkClientServerSynchronizedRenderers.cxx | 14 +- Rendering/Parallel/vtkCompositeRGBAPass.cxx | 16 +- Rendering/Parallel/vtkCompositeRGBAPass.h | 8 +- .../Parallel/vtkCompositeRenderManager.cxx | 10 +- .../Parallel/vtkCompositeRenderManager.h | 4 +- Rendering/Parallel/vtkCompositeZPass.cxx | 16 +- Rendering/Parallel/vtkCompositeZPass.h | 4 +- .../vtkCompositedSynchronizedRenderers.cxx | 12 +- .../vtkCompositedSynchronizedRenderers.h | 7 +- Rendering/Parallel/vtkCompositer.cxx | 13 +- Rendering/Parallel/vtkCompositer.h | 12 +- Rendering/Parallel/vtkCompressCompositer.cxx | 38 +- Rendering/Parallel/vtkCompressCompositer.h | 4 +- Rendering/Parallel/vtkImageRenderManager.cxx | 14 +- Rendering/Parallel/vtkPHardwareSelector.cxx | 14 +- Rendering/Parallel/vtkPHardwareSelector.h | 4 +- .../Parallel/vtkParallelRenderManager.cxx | 120 +- Rendering/Parallel/vtkParallelRenderManager.h | 138 +- .../Parallel/vtkSynchronizedRenderWindows.cxx | 38 +- .../Parallel/vtkSynchronizedRenderWindows.h | 20 +- .../Parallel/vtkSynchronizedRenderers.cxx | 78 +- Rendering/Parallel/vtkSynchronizedRenderers.h | 48 +- Rendering/Parallel/vtkTreeCompositer.cxx | 13 +- .../vtkPLineIntegralConvolution2D.cxx | 22 +- .../vtkPLineIntegralConvolution2D.h | 22 +- .../ParallelLIC/vtkPPainterCommunicator.cxx | 48 +- .../ParallelLIC/vtkPPainterCommunicator.h | 12 +- Rendering/ParallelLIC/vtkPPixelTransfer.cxx | 4 +- .../ParallelLIC/vtkPSurfaceLICComposite.cxx | 120 +- .../ParallelLIC/vtkPSurfaceLICComposite.h | 46 +- .../ParallelLIC/vtkPSurfaceLICInterface.cxx | 28 +- .../ParallelLIC/vtkPSurfaceLICInterface.h | 12 +- Rendering/ParallelLIC/vtkParallelTimer.cxx | 108 +- Rendering/ParallelLIC/vtkParallelTimer.h | 37 +- Rendering/Qt/CMakeLists.txt | 7 +- Rendering/Qt/vtkQImageToImageSource.cxx | 8 +- Rendering/Qt/vtkQImageToImageSource.h | 2 +- Rendering/Qt/vtkQtLabelRenderStrategy.cxx | 16 +- Rendering/Qt/vtkQtLabelRenderStrategy.h | 4 +- Rendering/Qt/vtkQtStringToImage.cxx | 28 +- Rendering/Qt/vtkQtStringToImage.h | 8 +- Rendering/Qt/vtkQtTreeRingLabelMapper.cxx | 48 +- Rendering/Qt/vtkQtTreeRingLabelMapper.h | 23 +- Rendering/RayTracing/CMakeLists.txt | 33 +- Rendering/RayTracing/RTWrapper/Backend.h | 64 +- .../RTWrapper/OSPRay/OSPRayBackend.h | 180 +- Rendering/RayTracing/RTWrapper/RTWrapper.cxx | 78 +- Rendering/RayTracing/RTWrapper/RTWrapper.h | 125 +- Rendering/RayTracing/RTWrapper/Types.h | 174 +- .../RayTracing/RTWrapper/VisRTX/Camera.h | 42 +- Rendering/RayTracing/RTWrapper/VisRTX/Data.h | 78 +- .../RayTracing/RTWrapper/VisRTX/FrameBuffer.h | 7 +- .../RTWrapper/VisRTX/GeometricModel.h | 63 + .../RayTracing/RTWrapper/VisRTX/Geometry.h | 203 +- Rendering/RayTracing/RTWrapper/VisRTX/Group.h | 59 + .../RayTracing/RTWrapper/VisRTX/Instance.h | 36 + Rendering/RayTracing/RTWrapper/VisRTX/Light.h | 54 +- .../RayTracing/RTWrapper/VisRTX/Material.h | 79 +- Rendering/RayTracing/RTWrapper/VisRTX/Model.h | 57 - .../RayTracing/RTWrapper/VisRTX/Object.h | 85 +- .../RayTracing/RTWrapper/VisRTX/Renderer.h | 97 +- .../RayTracing/RTWrapper/VisRTX/Texture.h | 117 +- .../RTWrapper/VisRTX/VisRTXBackend.cxx | 140 +- .../RTWrapper/VisRTX/VisRTXBackend.h | 73 +- Rendering/RayTracing/RTWrapper/VisRTX/World.h | 119 + .../RayTracing/Testing/Cxx/CMakeLists.txt | 12 +- .../Testing/Cxx/TestCategoricalMaterials.cxx | 10 +- .../Testing/Cxx/TestCategoricalMultiBlock.cxx | 12 +- .../Testing/Cxx/TestGPURayCastCellData.cxx | 1 - .../Cxx/TestGPURayCastMapperBenchmark.cxx | 2 +- .../TestGPURayCastMapperSampleDistance.cxx | 2 +- .../Cxx/TestGPURayCastVolumeLightKit.cxx | 1 - .../Cxx/TestGPURayCastVolumePolyData.cxx | 1 - .../Cxx/TestGPURayCastVolumeUpdate.cxx | 1 - .../Cxx/TestOSPRayAMRVolumeRenderer.cxx | 14 +- .../Testing/Cxx/TestOSPRayComposite.cxx | 2 +- .../TestOSPRayCompositePolyDataMapper2.cxx | 2 +- .../Testing/Cxx/TestOSPRayDynamicObject.cxx | 8 +- .../Testing/Cxx/TestOSPRayIsosurface.cxx | 17 +- .../Testing/Cxx/TestOSPRayLights.cxx | 39 +- .../Testing/Cxx/TestOSPRayRenderMesh.cxx | 8 +- .../Cxx/TestOSPRayTetrahedraMapper.cxx | 148 - .../TestOSPRayTetrahedraMapperMixedCells.cxx | 241 - .../Testing/Cxx/TestOSPRayTiling.cxx | 2 +- .../TestOSPRayUnstructuredVolumeMapper.cxx | 150 + ...PRayUnstructuredVolumeMapperMixedCells.cxx | 242 + .../Testing/Cxx/TestOSPRayWindow.cxx | 2 +- .../Testing/Cxx/TestPathTracerBackground.cxx | 2 +- .../Cxx/TestPathTracerGLTFImporter.cxx | 67 + .../Cxx/TestPathTracerMaterialLibrary.cxx | 39 +- .../Testing/Cxx/TestPathTracerMaterials.cxx | 55 +- .../Testing/Cxx/TestRayTracedMolecules.cxx | 31 +- .../Testing/Cxx/vtkOSPRayTestInteractor.cxx | 12 +- .../Testing/Cxx/vtkOSPRayTestInteractor.h | 2 +- .../TestGPURayCastCellData.png.sha512 | 2 +- .../TestGPURayCastCellData_1.png.sha512 | 1 - .../TestGPURayCastVolumeLightKit.png.sha512 | 2 +- .../TestGPURayCastVolumeLightKit_1.png.sha512 | 1 - .../TestGPURayCastVolumePolyData.png.sha512 | 2 +- .../TestGPURayCastVolumePolyData_1.png.sha512 | 1 - .../TestGPURayCastVolumeUpdate.png.sha512 | 2 +- .../TestGPURayCastVolumeUpdate_1.png.sha512 | 1 - .../Baseline/TestOSPRayAmbient.png.sha512 | 2 +- .../Baseline/TestOSPRayAmbient_1.png.sha512 | 1 - .../Baseline/TestOSPRayAmbient_2.png.sha512 | 1 - ...tOSPRayCompositePolyDataMapper2.png.sha512 | 2 +- ...ayCompositePolyDataMapper2OptiX.png.sha512 | 2 +- .../TestOSPRayDynamicObject.png.sha512 | 2 +- .../TestOSPRayDynamicObjectOptiX.png.sha512 | 2 +- .../TestOSPRayImplicitsOptiX.png.sha512 | 2 +- .../Baseline/TestOSPRayIsosurface.png.sha512 | 2 +- .../Baseline/TestOSPRayLightsOptiX.png.sha512 | 2 +- .../Baseline/TestOSPRayLights_1.png.sha512 | 1 - .../Baseline/TestOSPRayMultiBlock.png.sha512 | 2 +- .../TestOSPRayMultiBlock_1.png.sha512 | 1 - .../Baseline/TestOSPRayScalarBar.png.sha512 | 2 +- ...OSPRayUnstructuredVolumeMapper.png.sha512} | 0 ...ructuredVolumeMapperMixedCells.png.sha512} | 0 .../TestPathTracerGLTFImporter.png.sha512 | 1 + .../TestPathTracerLuminous.png.sha512 | 2 +- .../TestPathTracerLuminous_1.png.sha512 | 1 - .../TestPathTracerLuminous_2.png.sha512 | 1 - .../TestPathTracerMaterials.png.sha512 | 2 +- .../TestPathTracerMaterials_1.png.sha512 | 1 - .../TestPathTracerMaterials_2.png.sha512 | 1 - .../Testing/Data/WaterBottle.glb.sha512 | 1 + Rendering/RayTracing/vtk.module | 4 +- .../vtkOSPRayAMRVolumeMapperNode.cxx | 285 +- .../RayTracing/vtkOSPRayAMRVolumeMapperNode.h | 4 +- Rendering/RayTracing/vtkOSPRayActorNode.cxx | 27 +- Rendering/RayTracing/vtkOSPRayActorNode.h | 37 +- Rendering/RayTracing/vtkOSPRayCache.h | 6 +- Rendering/RayTracing/vtkOSPRayCameraNode.cxx | 38 +- Rendering/RayTracing/vtkOSPRayCameraNode.h | 6 + .../vtkOSPRayCompositePolyDataMapper2Node.cxx | 31 +- .../vtkOSPRayCompositePolyDataMapper2Node.h | 6 +- Rendering/RayTracing/vtkOSPRayLightNode.cxx | 56 +- Rendering/RayTracing/vtkOSPRayLightNode.h | 14 +- .../RayTracing/vtkOSPRayMaterialHelpers.cxx | 115 +- .../RayTracing/vtkOSPRayMaterialHelpers.h | 8 +- .../RayTracing/vtkOSPRayMaterialLibrary.cxx | 913 +- .../RayTracing/vtkOSPRayMaterialLibrary.h | 53 +- .../vtkOSPRayMoleculeMapperNode.cxx | 356 +- .../RayTracing/vtkOSPRayMoleculeMapperNode.h | 7 +- Rendering/RayTracing/vtkOSPRayPass.cxx | 76 +- Rendering/RayTracing/vtkOSPRayPass.h | 10 +- .../vtkOSPRayPolyDataMapperNode.cxx | 1018 +- .../RayTracing/vtkOSPRayPolyDataMapperNode.h | 39 +- .../RayTracing/vtkOSPRayRendererNode.cxx | 540 +- Rendering/RayTracing/vtkOSPRayRendererNode.h | 137 +- .../vtkOSPRayTetrahedraMapperNode.cxx | 335 - .../vtkOSPRayTetrahedraMapperNode.h | 72 - .../vtkOSPRayUnstructuredVolumeMapperNode.cxx | 382 + .../vtkOSPRayUnstructuredVolumeMapperNode.h | 70 + .../RayTracing/vtkOSPRayViewNodeFactory.cxx | 13 +- .../RayTracing/vtkOSPRayVolumeMapper.cxx | 12 +- Rendering/RayTracing/vtkOSPRayVolumeMapper.h | 4 +- .../RayTracing/vtkOSPRayVolumeMapperNode.cxx | 424 +- .../RayTracing/vtkOSPRayVolumeMapperNode.h | 16 +- Rendering/RayTracing/vtkOSPRayVolumeNode.cxx | 18 +- Rendering/RayTracing/vtkOSPRayVolumeNode.h | 2 +- Rendering/RayTracing/vtkOSPRayWindowNode.cxx | 22 +- Rendering/RayTracing/vtkOSPRayWindowNode.h | 2 +- Rendering/SceneGraph/CMakeLists.txt | 1 - .../SceneGraph/Testing/Cxx/UnitTests.cxx | 52 +- Rendering/SceneGraph/vtkActorNode.cxx | 12 +- Rendering/SceneGraph/vtkActorNode.h | 2 +- Rendering/SceneGraph/vtkCameraNode.cxx | 10 +- Rendering/SceneGraph/vtkLightNode.cxx | 10 +- Rendering/SceneGraph/vtkMapperNode.cxx | 12 +- Rendering/SceneGraph/vtkMapperNode.h | 2 +- .../SceneGraph/vtkPolyDataMapperNode.cxx | 26 +- Rendering/SceneGraph/vtkPolyDataMapperNode.h | 5 +- Rendering/SceneGraph/vtkRendererNode.cxx | 18 +- Rendering/SceneGraph/vtkViewNode.cxx | 163 +- Rendering/SceneGraph/vtkViewNode.h | 40 +- .../SceneGraph/vtkViewNodeCollection.cxx | 70 - Rendering/SceneGraph/vtkViewNodeCollection.h | 71 - Rendering/SceneGraph/vtkViewNodeFactory.cxx | 27 +- Rendering/SceneGraph/vtkViewNodeFactory.h | 6 - Rendering/SceneGraph/vtkVolumeMapperNode.cxx | 10 +- Rendering/SceneGraph/vtkVolumeNode.cxx | 12 +- Rendering/SceneGraph/vtkVolumeNode.h | 2 +- Rendering/SceneGraph/vtkWindowNode.cxx | 25 +- Rendering/SceneGraph/vtkWindowNode.h | 4 +- Rendering/Tk/vtkPythonTkWidgetsInit.cxx | 2 +- Rendering/Tk/vtkTkImageViewerWidget.cxx | 26 +- Rendering/Tk/vtkTkRenderWidget.cxx | 27 +- Rendering/UI/CMakeLists.txt | 10 + .../UI/vtkAndroidRenderWindowInteractor.cxx | 32 +- .../UI/vtkAndroidRenderWindowInteractor.h | 44 +- Rendering/UI/vtkCocoaRenderWindowInteractor.h | 20 +- .../UI/vtkCocoaRenderWindowInteractor.mm | 5 +- .../UI/vtkGenericRenderWindowInteractor.h | 8 +- Rendering/UI/vtkIOSRenderWindowInteractor.h | 20 +- Rendering/UI/vtkIOSRenderWindowInteractor.mm | 1 + .../UI/vtkSDL2RenderWindowInteractor.cxx | 362 + Rendering/UI/vtkSDL2RenderWindowInteractor.h | 101 + Rendering/UI/vtkWin32HardwareWindow.cxx | 99 +- Rendering/UI/vtkWin32HardwareWindow.h | 20 +- .../UI/vtkWin32RenderWindowInteractor.cxx | 103 +- Rendering/UI/vtkWin32RenderWindowInteractor.h | 30 +- Rendering/UI/vtkXRenderWindowInteractor.cxx | 290 +- Rendering/UI/vtkXRenderWindowInteractor.h | 28 +- Rendering/VR/CMakeLists.txt | 84 + .../{OpenVR => VR}/data/vtkAvatarHead.vtp | 0 .../data/vtkAvatarLeftForeArm.vtp | 0 .../{OpenVR => VR}/data/vtkAvatarLeftHand.vtp | 0 .../data/vtkAvatarLeftUpperArm.vtp | 0 .../data/vtkAvatarRightForeArm.vtp | 0 .../data/vtkAvatarRightHand.vtp | 0 .../data/vtkAvatarRightUpperArm.vtp | 0 .../{OpenVR => VR}/data/vtkAvatarTorso.vtp | 0 Rendering/VR/vtk.module | 21 + Rendering/VR/vtkOpenGLAvatar.cxx | 536 + Rendering/VR/vtkOpenGLAvatar.h | 90 + Rendering/VR/vtkVRCamera.h | 51 + Rendering/VR/vtkVRCollaborationClient.cxx | 1182 + Rendering/VR/vtkVRCollaborationClient.h | 192 + Rendering/VR/vtkVRControlsHelper.cxx | 459 + Rendering/VR/vtkVRControlsHelper.h | 168 + Rendering/VR/vtkVRFollower.cxx | 154 + Rendering/VR/vtkVRFollower.h | 54 + Rendering/VR/vtkVRHardwarePicker.cxx | 119 + Rendering/VR/vtkVRHardwarePicker.h | 63 + Rendering/VR/vtkVRMenuRepresentation.cxx | 341 + Rendering/VR/vtkVRMenuRepresentation.h | 113 + Rendering/VR/vtkVRMenuWidget.cxx | 259 + Rendering/VR/vtkVRMenuWidget.h | 117 + Rendering/VR/vtkVRModel.cxx | 195 + Rendering/VR/vtkVRModel.h | 96 + Rendering/VR/vtkVRPanelRepresentation.cxx | 567 + Rendering/VR/vtkVRPanelRepresentation.h | 176 + Rendering/VR/vtkVRPanelWidget.cxx | 154 + Rendering/VR/vtkVRPanelWidget.h | 86 + Rendering/VR/vtkVRRay.cxx | 150 + Rendering/VR/vtkVRRay.h | 74 + Rendering/VR/vtkVRRenderWindow.cxx | 527 + Rendering/VR/vtkVRRenderWindow.h | 372 + Rendering/VR/vtkVRRenderer.cxx | 337 + Rendering/VR/vtkVRRenderer.h | 97 + Rendering/Volume/Testing/CMakeLists.txt | 1 + Rendering/Volume/Testing/Cxx/CMakeLists.txt | 15 + .../Testing/Cxx/ProjectedTetrahedraZoomIn.cxx | 3 +- .../TestGPURayCastClippingUserTransform.cxx | 3 +- .../TestGPURayCastCompositeBinaryMask1.cxx | 2 + .../Testing/Cxx/TestGPURayCastCropping1.cxx | 1 + .../Cxx/TestGPURayCastDataTypesMIP.cxx | 5 +- .../Cxx/TestGPURayCastDataTypesMinIP.cxx | 5 +- ...stGPURayCastLargeColorTransferFunction.cxx | 2 +- .../Cxx/TestGPURayCastMapperBenchmark.cxx | 2 +- .../TestGPURayCastMapperRectilinearGrid.cxx | 208 + .../TestGPURayCastMapperSampleDistance.cxx | 2 +- .../TestGPURayCastMultiVolumeOverlapping.cxx | 11 +- .../Cxx/TestGPURayCastTransfer2DYScalars.cxx | 100 + .../Cxx/TestGPURayCastVolumeGhostArrays.cxx | 130 + ...estGPURayCastVolumeGhostArraysCellData.cxx | 135 + .../Cxx/TestGPURayCastVolumePicking.cxx | 4 +- .../Testing/Cxx/TestGPURayCastVolumePlane.cxx | 4 +- ...estGPURayCastVolumeUniformGridBlanking.cxx | 101 + .../TestMultiBlockMapperRectilinearGrid.cxx | 112 + ...MultiBlockUnstructuredGridVolumeMapper.cxx | 136 + .../Testing/Cxx/TestProjectedTetrahedra.cxx | 3 +- ...TestProjectedTetrahedraVectorComponent.cxx | 124 + .../Cxx/TestRemoveVolumeNonCurrentContext.cxx | 6 +- .../Cxx/TestSmartVolumeMapperVolumeUpdate.cxx | 102 + ...GPURayCastMapperRectilinearGrid.png.sha512 | 1 + ...PURayCastMultiVolumeOverlapping.png.sha512 | 2 +- ...estGPURayCastTransfer2DYScalars.png.sha512 | 1 + ...TestGPURayCastVolumeGhostArrays.png.sha512 | 1 + ...ayCastVolumeGhostArraysCellData.png.sha512 | 1 + ...ayCastVolumeUniformGridBlanking.png.sha512 | 1 + ...MultiBlockMapperRectilinearGrid.png.sha512 | 1 + ...ockUnstructuredGridVolumeMapper.png.sha512 | 1 + ...jectedTetrahedraVectorComponent.png.sha512 | 1 + ...stSmartVolumeMapperVolumeUpdate.png.sha512 | 1 + .../Testing/Data/Baseline/gaussian.png.sha512 | 2 +- Rendering/Volume/vtk.module | 2 + Rendering/Volume/vtkBlockSortHelper.h | 386 +- Rendering/Volume/vtkDirectionEncoder.cxx | 2 +- Rendering/Volume/vtkDirectionEncoder.h | 8 +- .../Volume/vtkEncodedGradientEstimator.cxx | 2 +- .../Volume/vtkEncodedGradientEstimator.h | 53 +- Rendering/Volume/vtkEncodedGradientShader.h | 12 +- .../vtkFiniteDifferenceGradientEstimator.h | 4 +- Rendering/Volume/vtkFixedPointRayCastImage.h | 32 +- ...xedPointVolumeRayCastCompositeGOHelper.cxx | 1 + ...intVolumeRayCastCompositeGOShadeHelper.cxx | 1 + ...FixedPointVolumeRayCastCompositeHelper.cxx | 1 + ...PointVolumeRayCastCompositeShadeHelper.cxx | 1 + .../Volume/vtkFixedPointVolumeRayCastHelper.h | 21 +- .../vtkFixedPointVolumeRayCastMIPHelper.cxx | 1 + .../vtkFixedPointVolumeRayCastMapper.cxx | 54 +- .../Volume/vtkFixedPointVolumeRayCastMapper.h | 57 +- .../Volume/vtkGPUVolumeRayCastMapper.cxx | 166 +- Rendering/Volume/vtkGPUVolumeRayCastMapper.h | 125 +- Rendering/Volume/vtkMultiVolume.cxx | 19 +- Rendering/Volume/vtkMultiVolume.h | 8 +- Rendering/Volume/vtkOSPRayVolumeInterface.cxx | 8 +- .../Volume/vtkProjectedTetrahedraMapper.cxx | 40 +- .../Volume/vtkRayCastImageDisplayHelper.cxx | 4 +- .../Volume/vtkRayCastImageDisplayHelper.h | 4 +- .../vtkRecursiveSphereDirectionEncoder.h | 4 +- .../Volume/vtkSphericalDirectionEncoder.cxx | 2 +- .../Volume/vtkSphericalDirectionEncoder.h | 4 +- ...tkUnstructuredGridBunykRayCastFunction.cxx | 6 +- .../vtkUnstructuredGridBunykRayCastFunction.h | 12 +- ...structuredGridHomogeneousRayIntegrator.cxx | 10 +- ...UnstructuredGridHomogeneousRayIntegrator.h | 4 +- ...vtkUnstructuredGridLinearRayIntegrator.cxx | 35 +- .../vtkUnstructuredGridLinearRayIntegrator.h | 4 +- ...kUnstructuredGridPartialPreIntegration.cxx | 26 +- ...vtkUnstructuredGridPartialPreIntegration.h | 8 +- .../vtkUnstructuredGridPreIntegration.cxx | 12 +- .../vtkUnstructuredGridPreIntegration.h | 16 +- .../vtkUnstructuredGridVolumeMapper.cxx | 2 +- .../Volume/vtkUnstructuredGridVolumeMapper.h | 4 +- ...kUnstructuredGridVolumeRayCastFunction.cxx | 2 +- ...vtkUnstructuredGridVolumeRayCastFunction.h | 4 +- ...kUnstructuredGridVolumeRayCastIterator.cxx | 2 +- ...vtkUnstructuredGridVolumeRayCastIterator.h | 4 +- ...vtkUnstructuredGridVolumeRayCastMapper.cxx | 4 +- .../vtkUnstructuredGridVolumeRayCastMapper.h | 32 +- ...vtkUnstructuredGridVolumeRayIntegrator.cxx | 2 +- .../vtkUnstructuredGridVolumeZSweepMapper.cxx | 97 +- .../vtkUnstructuredGridVolumeZSweepMapper.h | 26 +- Rendering/Volume/vtkVolumeMapper.cxx | 104 +- Rendering/Volume/vtkVolumeMapper.h | 40 +- Rendering/Volume/vtkVolumeOutlineSource.cxx | 34 +- Rendering/Volume/vtkVolumeOutlineSource.h | 28 +- Rendering/Volume/vtkVolumePicker.cxx | 18 +- Rendering/Volume/vtkVolumePicker.h | 8 +- ...tkVolumeRayCastSpaceLeapingImageFilter.cxx | 60 +- .../vtkVolumeRayCastSpaceLeapingImageFilter.h | 44 +- Rendering/VolumeAMR/vtkAMRVolumeMapper.cxx | 91 +- Rendering/VolumeAMR/vtkAMRVolumeMapper.h | 57 +- Rendering/VolumeOpenGL2/CMakeLists.txt | 11 +- .../VolumeOpenGL2/Testing/Cxx/CMakeLists.txt | 1 + .../Testing/Cxx/TestGPURayCastCellData.cxx | 4 +- .../Cxx/TestGPURayCastDepthPeeling.cxx | 4 +- .../TestGPURayCastDepthPeelingBlendModes.cxx | 4 +- .../TestGPURayCastDepthPeelingBoxWidget.cxx | 24 +- .../Cxx/TestGPURayCastDepthPeelingClip.cxx | 4 +- .../Cxx/TestGPURayCastDepthPeelingOpaque.cxx | 4 +- .../TestGPURayCastDepthPeelingTransVol.cxx | 4 +- ...RayCastDepthPeelingTransparentPolyData.cxx | 4 +- .../Testing/Cxx/TestGPURayCastIsosurface.cxx | 2 +- .../Testing/Cxx/TestGPURayCastJittering.cxx | 4 +- .../Cxx/TestGPURayCastMultiVolumeClipping.cxx | 104 + .../Testing/Cxx/TestGPURayCastSlicePlane.cxx | 2 +- .../Cxx/TestGPURayCastToggleJittering.cxx | 4 +- ...stGPURayCastMultiVolumeClipping.png.sha512 | 1 + ...MultiBlockUnstructuredGridVolumeMapper.cxx | 345 + ...tkMultiBlockUnstructuredGridVolumeMapper.h | 155 + .../vtkMultiBlockVolumeMapper.cxx | 157 +- .../VolumeOpenGL2/vtkMultiBlockVolumeMapper.h | 31 +- .../vtkOpenGLGPUVolumeRayCastMapper.cxx | 470 +- .../vtkOpenGLGPUVolumeRayCastMapper.h | 4 +- .../vtkOpenGLProjectedTetrahedraMapper.cxx | 84 +- .../vtkOpenGLProjectedTetrahedraMapper.h | 8 +- .../vtkOpenGLRayCastImageDisplayHelper.cxx | 16 +- .../vtkOpenGLVolumeGradientOpacityTable.cxx | 4 +- .../vtkOpenGLVolumeGradientOpacityTable.h | 8 +- .../vtkOpenGLVolumeLookupTable.cxx | 28 +- .../vtkOpenGLVolumeLookupTable.h | 10 +- .../vtkOpenGLVolumeLookupTables.h | 7 +- ...eMaskGradientOpacityTransferFunction2D.cxx | 8 +- ...umeMaskGradientOpacityTransferFunction2D.h | 11 +- .../vtkOpenGLVolumeMaskTransferFunction2D.cxx | 8 +- .../vtkOpenGLVolumeMaskTransferFunction2D.h | 12 +- .../vtkOpenGLVolumeOpacityTable.cxx | 6 +- .../vtkOpenGLVolumeOpacityTable.h | 9 +- .../VolumeOpenGL2/vtkOpenGLVolumeRGBTable.cxx | 6 +- .../VolumeOpenGL2/vtkOpenGLVolumeRGBTable.h | 6 +- .../vtkOpenGLVolumeTransferFunction2D.cxx | 10 +- .../vtkOpenGLVolumeTransferFunction2D.h | 15 +- .../VolumeOpenGL2/vtkSmartVolumeMapper.cxx | 162 +- .../VolumeOpenGL2/vtkSmartVolumeMapper.h | 114 +- .../VolumeOpenGL2/vtkVolumeInputHelper.cxx | 8 +- .../VolumeOpenGL2/vtkVolumeInputHelper.h | 15 +- Rendering/VolumeOpenGL2/vtkVolumeMask.h | 20 +- .../VolumeOpenGL2/vtkVolumeShaderComposer.h | 692 +- Rendering/VolumeOpenGL2/vtkVolumeTexture.cxx | 456 +- Rendering/VolumeOpenGL2/vtkVolumeTexture.h | 41 +- .../VtkJS/vtkVtkJSSceneGraphSerializer.cxx | 123 +- .../VtkJS/vtkVtkJSSceneGraphSerializer.h | 28 +- Rendering/VtkJS/vtkVtkJSViewNodeFactory.cxx | 8 +- Rendering/VtkJS/vtkVtkJSViewNodeFactory.h | 4 +- Testing/Core/HeaderTesting.py | 4 +- Testing/Core/Testing/CMakeLists.txt | 1 + Testing/Core/Testing/Cxx/CMakeLists.txt | 5 + .../Core/Testing/Cxx/TestErrorObserver.cxx | 31 + Testing/Core/vtkTestErrorObserver.h | 8 +- Testing/Core/vtkTestUtilities.h | 11 +- Testing/Core/vtkWindowsTestUtilities.h | 4 +- Testing/Data/6VWW.pdb.sha512 | 1 + Testing/Data/AMR/Velodyne/TestAMR.xamr.sha512 | 1 + .../NonZeroOrigin/plt00000/.Header.swp.sha512 | 1 + .../NonZeroOrigin/plt00000/Header.sha512 | 1 + .../plt00000/Level_0/Cell_D_00000.sha512 | 1 + .../plt00000/Level_0/Cell_H.sha512 | 1 + .../NonZeroOrigin/plt00000/job_info.sha512 | 1 + .../plt00000/particles/Header.sha512 | 1 + .../particles/Level_0/DATA_00000.sha512 | 1 + .../particles/Level_0/Particle_H.sha512 | 1 + Testing/Data/CGNS/fluid.cgns.4.0.sha512 | 1 + Testing/Data/CGNS/fluid.cgns.4.1.sha512 | 1 + Testing/Data/CGNS/fluid.cgns.4.2.sha512 | 1 + Testing/Data/CGNS/fluid.cgns.4.3.sha512 | 1 + .../sparc-volume.cgns.36.00.sha512 | 1 + .../wavelet_0.vtm.sha512 | 1 + .../wavelet_0.vtu.sha512 | 1 + .../wavelet_1.vtm.sha512 | 1 + .../wavelet_1.vtu.sha512 | 1 + .../EnSight/RESULT_FLUID_DOMAIN.case.sha512 | 1 + Testing/Data/EnSight/TEST_bin.case.sha512 | 2 +- .../UndefAndPartial/.readme.txt.un~.sha512 | 1 + .../UndefAndPartial/grid_bin.case.sha512 | 1 + .../UndefAndPartial/grid_bin.density.sha512 | 1 + .../UndefAndPartial/grid_bin.geo.sha512 | 1 + .../UndefAndPartial/grid_bin.mass.sha512 | 1 + .../UndefAndPartial/grid_bin.pres.sha512 | 1 + .../UndefAndPartial/grid_bin.temp.sha512 | 1 + .../EnSight/UndefAndPartial/readme.txt.sha512 | 1 + .../UndefAndPartialAscii/grid.case.sha512 | 1 + .../UndefAndPartialAscii/grid.density.sha512 | 1 + .../UndefAndPartialAscii/grid.geo.sha512 | 1 + .../UndefAndPartialAscii/grid.mass.sha512 | 1 + .../UndefAndPartialAscii/grid.pres.sha512 | 1 + .../UndefAndPartialAscii/grid.temp.sha512 | 1 + .../UndefAndPartialAscii/readme.txt.sha512 | 1 + Testing/Data/EnSight/pitzDaily.0000.U.sha512 | 1 + .../Data/EnSight/pitzDaily.0000.UGrad.sha512 | 1 + .../EnSight/pitzDaily.0000.epsilon.sha512 | 1 + Testing/Data/EnSight/pitzDaily.0000.k.sha512 | 1 + .../Data/EnSight/pitzDaily.0000.mesh.sha512 | 1 + .../Data/EnSight/pitzDaily.0000.nut.sha512 | 1 + Testing/Data/EnSight/pitzDaily.0000.p.sha512 | 1 + Testing/Data/EnSight/pitzDaily.case.sha512 | 1 + .../EnSight/result_fluid_domain.geo.sha512 | 1 + .../result_fluid_domain.pressure.00001.sha512 | 1 + .../result_fluid_domain.r_ns.00001.sha512 | 1 + .../result_fluid_domain.rij.00001.sha512 | 1 + Testing/Data/EnSight/viga.case.sha512 | 1 + Testing/Data/EnSight/viga.geo000.sha512 | 1 + .../EnSight/vigaDisplacements.res000.sha512 | 1 + Testing/Data/Example_fields.cgns.sha512 | 1 + Testing/Data/Example_grids.cgns.sha512 | 1 + Testing/Data/Example_mixed.cgns.sha512 | 1 + Testing/Data/Example_nface_n.cgns.sha512 | 1 + Testing/Data/Exodus/Assembly-Example.g.sha512 | 1 + .../Exodus/ExRestarts/blow.e-s.001.sha512 | 1 + Testing/Data/Exodus/ExRestarts/blow.e.sha512 | 1 + .../ExRestarts/blow.ex-timeseries.sha512 | 1 + .../RubiksCubeWithRotations_gold.g.sha512 | 1 + ...2017-5827O-FSM_Residual-bad-eigen.e.sha512 | 1 + ...017-5827O-FSM_Residual_good-eigen.e.sha512 | 1 + .../SAND2020-4077_O-tri6sWFace2.exo.sha512 | 1 + .../Exodus/block_with_attributes.g.sha512 | 1 + Testing/Data/Exodus/can.e.4/can.e.4.0.sha512 | 1 + Testing/Data/Exodus/can.e.4/can.e.4.1.sha512 | 1 + Testing/Data/Exodus/can.e.4/can.e.4.2.sha512 | 1 + Testing/Data/Exodus/can.e.4/can.e.4.3.sha512 | 1 + .../Exodus/hello_world_fix-d_frf.frq.sha512 | 1 + Testing/Data/Exodus/test-nfaced.exo.sha512 | 1 + .../MotionFX/clover/clover_utm.cfg.sha512 | 1 + .../MotionFX/clover/clover_utm.stl.sha512 | 1 + .../MotionFX/clover/clover_utm.utm.sha512 | 1 + Testing/Data/OpenFOAM/64BitFloats/0/U.sha512 | 1 - Testing/Data/OpenFOAM/64BitFloats/0/p.sha512 | 1 - .../constant/polyMesh/boundary.sha512 | 1 - .../constant/polyMesh/faces.sha512 | 1 - .../constant/polyMesh/neighbour.sha512 | 1 - .../constant/polyMesh/owner.sha512 | 1 - .../constant/polyMesh/points.sha512 | 1 - .../64BitFloats/system/controlDict.sha512 | 1 - .../Data/OpenFOAM/DimFields/cavity/0/U.sha512 | 1 + .../DimFields/cavity/0/cellDist.sha512 | 1 + .../Data/OpenFOAM/DimFields/cavity/0/p.sha512 | 1 + .../cavity/cavity.foam.sha512} | 0 .../cavity/constant/polyMesh/boundary.sha512 | 1 + .../cavity/constant/polyMesh/faces.sha512 | 1 + .../cavity/constant/polyMesh/neighbour.sha512 | 1 + .../cavity/constant/polyMesh/owner.sha512 | 1 + .../cavity/constant/polyMesh/points.sha512 | 1 + .../constant/transportProperties.sha512 | 1 + .../cavity/system/blockMeshDict.sha512 | 1 + .../cavity/system/controlDict.sha512 | 1 + .../cavity/system/decomposeParDict.sha512 | 1 + .../DimFields/cavity/system/fvSchemes.sha512 | 1 + .../DimFields/cavity/system/fvSolution.sha512 | 1 + .../2002/pointLocations.sha512 | 1 + .../largePolyhedral/2002/uniform/time.sha512 | 1 + .../constant/polyMesh/boundary.sha512 | 1 + .../constant/polyMesh/faces.sha512 | 1 + .../constant/polyMesh/neighbour.sha512 | 1 + .../constant/polyMesh/owner.sha512 | 1 + .../constant/polyMesh/points.sha512 | 1 + .../largePolyhedral.foam.sha512 | 1 + .../largePolyhedral/system/controlDict.sha512 | 1 + .../largePolyhedral/system/fvSchemes.sha512 | 1 + .../largePolyhedral/system/fvSolution.sha512 | 1 + .../Data/OpenFOAM/precision/case01/0/U.sha512 | 1 + .../Data/OpenFOAM/precision/case01/0/p.sha512 | 1 + .../precision/case01/case01.foam.sha512 | 1 + .../case01/constant/polyMesh/boundary.sha512 | 1 + .../case01/constant/polyMesh/faces.sha512 | 1 + .../case01/constant/polyMesh/neighbour.sha512 | 1 + .../case01/constant/polyMesh/owner.sha512 | 1 + .../case01/constant/polyMesh/points.sha512 | 1 + .../case01/system/controlDict.sha512 | 1 + .../simplifiedSiwek-serial/0.005/CH4.sha512 | 1 + .../simplifiedSiwek-serial/0.005/CO2.sha512 | 1 + .../simplifiedSiwek-serial/0.005/H2.sha512 | 1 + .../simplifiedSiwek-serial/0.005/H2O.sha512 | 1 + .../simplifiedSiwek-serial/0.005/N2.sha512 | 1 + .../simplifiedSiwek-serial/0.005/O2.sha512 | 1 + .../simplifiedSiwek-serial/0.005/T.sha512 | 1 + .../simplifiedSiwek-serial/0.005/U.sha512 | 1 + .../0.005/lagrangian/coalCloud1/Cp.sha512 | 1 + .../0.005/lagrangian/coalCloud1/T.sha512 | 1 + .../0.005/lagrangian/coalCloud1/U.sha512 | 1 + .../lagrangian/coalCloud1/UCorrect.sha512 | 1 + .../0.005/lagrangian/coalCloud1/UTurb.sha512 | 1 + .../0.005/lagrangian/coalCloud1/Ygas.sha512 | 1 + .../lagrangian/coalCloud1/Yliquid.sha512 | 1 + .../0.005/lagrangian/coalCloud1/Ysolid.sha512 | 1 + .../0.005/lagrangian/coalCloud1/active.sha512 | 1 + .../0.005/lagrangian/coalCloud1/age.sha512 | 1 + .../lagrangian/coalCloud1/coordinates.sha512 | 1 + .../0.005/lagrangian/coalCloud1/d.sha512 | 1 + .../lagrangian/coalCloud1/dTarget.sha512 | 1 + .../0.005/lagrangian/coalCloud1/mass0.sha512 | 1 + .../lagrangian/coalCloud1/nParticle.sha512 | 1 + .../0.005/lagrangian/coalCloud1/origId.sha512 | 1 + .../lagrangian/coalCloud1/origProcId.sha512 | 1 + .../lagrangian/coalCloud1/positions.sha512 | 1 + .../0.005/lagrangian/coalCloud1/rho.sha512 | 1 + .../0.005/lagrangian/coalCloud1/tTurb.sha512 | 1 + .../0.005/lagrangian/coalCloud1/typeId.sha512 | 1 + .../lagrangian/limestoneCloud1/Cp.sha512 | 1 + .../0.005/lagrangian/limestoneCloud1/T.sha512 | 1 + .../0.005/lagrangian/limestoneCloud1/U.sha512 | 1 + .../limestoneCloud1/UCorrect.sha512 | 1 + .../lagrangian/limestoneCloud1/UTurb.sha512 | 1 + .../lagrangian/limestoneCloud1/active.sha512 | 1 + .../lagrangian/limestoneCloud1/age.sha512 | 1 + .../limestoneCloud1/coordinates.sha512 | 1 + .../0.005/lagrangian/limestoneCloud1/d.sha512 | 1 + .../lagrangian/limestoneCloud1/dTarget.sha512 | 1 + .../limestoneCloud1/nParticle.sha512 | 1 + .../lagrangian/limestoneCloud1/origId.sha512 | 1 + .../limestoneCloud1/origProcId.sha512 | 1 + .../limestoneCloud1/positions.sha512 | 1 + .../lagrangian/limestoneCloud1/rho.sha512 | 1 + .../lagrangian/limestoneCloud1/tTurb.sha512 | 1 + .../lagrangian/limestoneCloud1/typeId.sha512 | 1 + .../simplifiedSiwek-serial/0.005/p.sha512 | 1 + .../simplifiedSiwek-serial/0.005/qr.sha512 | 1 + .../simplifiedSiwek-serial/0.005/rho.sha512 | 1 + .../simplifiedSiwek-serial/0.01/CH4.sha512 | 1 + .../simplifiedSiwek-serial/0.01/CO2.sha512 | 1 + .../simplifiedSiwek-serial/0.01/H2.sha512 | 1 + .../simplifiedSiwek-serial/0.01/H2O.sha512 | 1 + .../simplifiedSiwek-serial/0.01/N2.sha512 | 1 + .../simplifiedSiwek-serial/0.01/O2.sha512 | 1 + .../simplifiedSiwek-serial/0.01/T.sha512 | 1 + .../simplifiedSiwek-serial/0.01/U.sha512 | 1 + .../0.01/lagrangian/coalCloud1/Cp.sha512 | 1 + .../0.01/lagrangian/coalCloud1/T.sha512 | 1 + .../0.01/lagrangian/coalCloud1/U.sha512 | 1 + .../lagrangian/coalCloud1/UCorrect.sha512 | 1 + .../0.01/lagrangian/coalCloud1/UTurb.sha512 | 1 + .../0.01/lagrangian/coalCloud1/Ygas.sha512 | 1 + .../0.01/lagrangian/coalCloud1/Yliquid.sha512 | 1 + .../0.01/lagrangian/coalCloud1/Ysolid.sha512 | 1 + .../0.01/lagrangian/coalCloud1/active.sha512 | 1 + .../0.01/lagrangian/coalCloud1/age.sha512 | 1 + .../lagrangian/coalCloud1/coordinates.sha512 | 1 + .../0.01/lagrangian/coalCloud1/d.sha512 | 1 + .../0.01/lagrangian/coalCloud1/dTarget.sha512 | 1 + .../0.01/lagrangian/coalCloud1/mass0.sha512 | 1 + .../lagrangian/coalCloud1/nParticle.sha512 | 1 + .../0.01/lagrangian/coalCloud1/origId.sha512 | 1 + .../lagrangian/coalCloud1/origProcId.sha512 | 1 + .../lagrangian/coalCloud1/positions.sha512 | 1 + .../0.01/lagrangian/coalCloud1/rho.sha512 | 1 + .../0.01/lagrangian/coalCloud1/tTurb.sha512 | 1 + .../0.01/lagrangian/coalCloud1/typeId.sha512 | 1 + .../0.01/lagrangian/limestoneCloud1/Cp.sha512 | 1 + .../0.01/lagrangian/limestoneCloud1/T.sha512 | 1 + .../0.01/lagrangian/limestoneCloud1/U.sha512 | 1 + .../limestoneCloud1/UCorrect.sha512 | 1 + .../lagrangian/limestoneCloud1/UTurb.sha512 | 1 + .../lagrangian/limestoneCloud1/active.sha512 | 1 + .../lagrangian/limestoneCloud1/age.sha512 | 1 + .../limestoneCloud1/coordinates.sha512 | 1 + .../0.01/lagrangian/limestoneCloud1/d.sha512 | 1 + .../lagrangian/limestoneCloud1/dTarget.sha512 | 1 + .../limestoneCloud1/nParticle.sha512 | 1 + .../lagrangian/limestoneCloud1/origId.sha512 | 1 + .../limestoneCloud1/origProcId.sha512 | 1 + .../limestoneCloud1/positions.sha512 | 1 + .../lagrangian/limestoneCloud1/rho.sha512 | 1 + .../lagrangian/limestoneCloud1/tTurb.sha512 | 1 + .../lagrangian/limestoneCloud1/typeId.sha512 | 1 + .../simplifiedSiwek-serial/0.01/p.sha512 | 1 + .../simplifiedSiwek-serial/0.01/rho.sha512 | 1 + .../simplifiedSiwek-serial/0/CH4.sha512 | 1 + .../simplifiedSiwek-serial/0/CO.sha512 | 1 + .../simplifiedSiwek-serial/0/CO2.sha512 | 1 + .../simplifiedSiwek-serial/0/G.sha512 | 1 + .../simplifiedSiwek-serial/0/H2.sha512 | 1 + .../simplifiedSiwek-serial/0/H2O.sha512 | 1 + .../simplifiedSiwek-serial/0/N2.sha512 | 1 + .../simplifiedSiwek-serial/0/O2.sha512 | 1 + .../simplifiedSiwek-serial/0/T.sha512 | 1 + .../simplifiedSiwek-serial/0/U.sha512 | 1 + .../simplifiedSiwek-serial/0/alphat.sha512 | 1 + .../simplifiedSiwek-serial/0/epsilon.sha512 | 1 + .../simplifiedSiwek-serial/0/k.sha512 | 1 + .../simplifiedSiwek-serial/0/nut.sha512 | 1 + .../simplifiedSiwek-serial/0/p.sha512 | 1 + .../constant/polyMesh/boundary.sha512 | 1 + .../constant/polyMesh/faces.sha512 | 1 + .../constant/polyMesh/neighbour.sha512 | 1 + .../constant/polyMesh/owner.sha512 | 1 + .../constant/polyMesh/points.sha512 | 1 + .../simplifiedSiwek-serial.foam.sha512 | 1 + .../system/controlDict.sha512 | 1 + .../constant/README.txt.sha512 | 1 + .../processor0/0.005/CH4.sha512 | 1 + .../processor0/0.005/CO2.sha512 | 1 + .../processor0/0.005/H2.sha512 | 1 + .../processor0/0.005/H2O.sha512 | 1 + .../processor0/0.005/N2.sha512 | 1 + .../processor0/0.005/O2.sha512 | 1 + .../processor0/0.005/T.sha512 | 1 + .../processor0/0.005/U.sha512 | 1 + .../0.005/lagrangian/coalCloud1/Cp.sha512 | 1 + .../0.005/lagrangian/coalCloud1/T.sha512 | 1 + .../0.005/lagrangian/coalCloud1/U.sha512 | 1 + .../lagrangian/coalCloud1/UCorrect.sha512 | 1 + .../0.005/lagrangian/coalCloud1/UTurb.sha512 | 1 + .../0.005/lagrangian/coalCloud1/Ygas.sha512 | 1 + .../lagrangian/coalCloud1/Yliquid.sha512 | 1 + .../0.005/lagrangian/coalCloud1/Ysolid.sha512 | 1 + .../0.005/lagrangian/coalCloud1/active.sha512 | 1 + .../0.005/lagrangian/coalCloud1/age.sha512 | 1 + .../lagrangian/coalCloud1/coordinates.sha512 | 1 + .../0.005/lagrangian/coalCloud1/d.sha512 | 1 + .../lagrangian/coalCloud1/dTarget.sha512 | 1 + .../0.005/lagrangian/coalCloud1/mass0.sha512 | 1 + .../lagrangian/coalCloud1/nParticle.sha512 | 1 + .../0.005/lagrangian/coalCloud1/origId.sha512 | 1 + .../lagrangian/coalCloud1/origProcId.sha512 | 1 + .../lagrangian/coalCloud1/positions.sha512 | 1 + .../0.005/lagrangian/coalCloud1/rho.sha512 | 1 + .../0.005/lagrangian/coalCloud1/tTurb.sha512 | 1 + .../0.005/lagrangian/coalCloud1/typeId.sha512 | 1 + .../lagrangian/limestoneCloud1/Cp.sha512 | 1 + .../0.005/lagrangian/limestoneCloud1/T.sha512 | 1 + .../0.005/lagrangian/limestoneCloud1/U.sha512 | 1 + .../limestoneCloud1/UCorrect.sha512 | 1 + .../lagrangian/limestoneCloud1/UTurb.sha512 | 1 + .../lagrangian/limestoneCloud1/active.sha512 | 1 + .../lagrangian/limestoneCloud1/age.sha512 | 1 + .../limestoneCloud1/coordinates.sha512 | 1 + .../0.005/lagrangian/limestoneCloud1/d.sha512 | 1 + .../lagrangian/limestoneCloud1/dTarget.sha512 | 1 + .../limestoneCloud1/nParticle.sha512 | 1 + .../lagrangian/limestoneCloud1/origId.sha512 | 1 + .../limestoneCloud1/origProcId.sha512 | 1 + .../limestoneCloud1/positions.sha512 | 1 + .../lagrangian/limestoneCloud1/rho.sha512 | 1 + .../lagrangian/limestoneCloud1/tTurb.sha512 | 1 + .../lagrangian/limestoneCloud1/typeId.sha512 | 1 + .../processor0/0.005/p.sha512 | 1 + .../processor0/0.005/rho.sha512 | 1 + .../processor0/0.01/CH4.sha512 | 1 + .../processor0/0.01/CO2.sha512 | 1 + .../processor0/0.01/H2.sha512 | 1 + .../processor0/0.01/H2O.sha512 | 1 + .../processor0/0.01/N2.sha512 | 1 + .../processor0/0.01/O2.sha512 | 1 + .../processor0/0.01/T.sha512 | 1 + .../processor0/0.01/U.sha512 | 1 + .../0.01/lagrangian/coalCloud1/Cp.sha512 | 1 + .../0.01/lagrangian/coalCloud1/T.sha512 | 1 + .../0.01/lagrangian/coalCloud1/U.sha512 | 1 + .../lagrangian/coalCloud1/UCorrect.sha512 | 1 + .../0.01/lagrangian/coalCloud1/UTurb.sha512 | 1 + .../0.01/lagrangian/coalCloud1/Ygas.sha512 | 1 + .../0.01/lagrangian/coalCloud1/Yliquid.sha512 | 1 + .../0.01/lagrangian/coalCloud1/Ysolid.sha512 | 1 + .../0.01/lagrangian/coalCloud1/active.sha512 | 1 + .../0.01/lagrangian/coalCloud1/age.sha512 | 1 + .../lagrangian/coalCloud1/coordinates.sha512 | 1 + .../0.01/lagrangian/coalCloud1/d.sha512 | 1 + .../0.01/lagrangian/coalCloud1/dTarget.sha512 | 1 + .../0.01/lagrangian/coalCloud1/mass0.sha512 | 1 + .../lagrangian/coalCloud1/nParticle.sha512 | 1 + .../0.01/lagrangian/coalCloud1/origId.sha512 | 1 + .../lagrangian/coalCloud1/origProcId.sha512 | 1 + .../lagrangian/coalCloud1/positions.sha512 | 1 + .../0.01/lagrangian/coalCloud1/rho.sha512 | 1 + .../0.01/lagrangian/coalCloud1/tTurb.sha512 | 1 + .../0.01/lagrangian/coalCloud1/typeId.sha512 | 1 + .../0.01/lagrangian/limestoneCloud1/Cp.sha512 | 1 + .../0.01/lagrangian/limestoneCloud1/T.sha512 | 1 + .../0.01/lagrangian/limestoneCloud1/U.sha512 | 1 + .../limestoneCloud1/UCorrect.sha512 | 1 + .../lagrangian/limestoneCloud1/UTurb.sha512 | 1 + .../lagrangian/limestoneCloud1/active.sha512 | 1 + .../lagrangian/limestoneCloud1/age.sha512 | 1 + .../limestoneCloud1/coordinates.sha512 | 1 + .../0.01/lagrangian/limestoneCloud1/d.sha512 | 1 + .../lagrangian/limestoneCloud1/dTarget.sha512 | 1 + .../limestoneCloud1/nParticle.sha512 | 1 + .../lagrangian/limestoneCloud1/origId.sha512 | 1 + .../limestoneCloud1/origProcId.sha512 | 1 + .../limestoneCloud1/positions.sha512 | 1 + .../lagrangian/limestoneCloud1/rho.sha512 | 1 + .../lagrangian/limestoneCloud1/tTurb.sha512 | 1 + .../lagrangian/limestoneCloud1/typeId.sha512 | 1 + .../processor0/0.01/p.sha512 | 1 + .../processor0/0.01/rho.sha512 | 1 + .../processor0/0/CH4.sha512 | 1 + .../processor0/0/CO.sha512 | 1 + .../processor0/0/CO2.sha512 | 1 + .../processor0/0/H2.sha512 | 1 + .../processor0/0/H2O.sha512 | 1 + .../processor0/0/N2.sha512 | 1 + .../processor0/0/O2.sha512 | 1 + .../processor0/0/T.sha512 | 1 + .../processor0/0/U.sha512 | 1 + .../processor0/0/p.sha512 | 1 + .../constant/polyMesh/boundary.sha512 | 1 + .../processor0/constant/polyMesh/faces.sha512 | 1 + .../constant/polyMesh/neighbour.sha512 | 1 + .../processor0/constant/polyMesh/owner.sha512 | 1 + .../constant/polyMesh/points.sha512 | 1 + .../processor1/0.005/CH4.sha512 | 1 + .../processor1/0.005/CO2.sha512 | 1 + .../processor1/0.005/H2.sha512 | 1 + .../processor1/0.005/H2O.sha512 | 1 + .../processor1/0.005/N2.sha512 | 1 + .../processor1/0.005/O2.sha512 | 1 + .../processor1/0.005/T.sha512 | 1 + .../processor1/0.005/U.sha512 | 1 + .../processor1/0.005/p.sha512 | 1 + .../processor1/0.005/rho.sha512 | 1 + .../processor1/0.01/CH4.sha512 | 1 + .../processor1/0.01/CO2.sha512 | 1 + .../processor1/0.01/H2.sha512 | 1 + .../processor1/0.01/H2O.sha512 | 1 + .../processor1/0.01/N2.sha512 | 1 + .../processor1/0.01/O2.sha512 | 1 + .../processor1/0.01/T.sha512 | 1 + .../processor1/0.01/U.sha512 | 1 + .../processor1/0.01/p.sha512 | 1 + .../processor1/0.01/rho.sha512 | 1 + .../processor1/0/CH4.sha512 | 1 + .../processor1/0/CO.sha512 | 1 + .../processor1/0/CO2.sha512 | 1 + .../processor1/0/H2.sha512 | 1 + .../processor1/0/H2O.sha512 | 1 + .../processor1/0/N2.sha512 | 1 + .../processor1/0/O2.sha512 | 1 + .../processor1/0/T.sha512 | 1 + .../processor1/0/U.sha512 | 1 + .../processor1/0/p.sha512 | 1 + .../constant/polyMesh/boundary.sha512 | 1 + .../processor1/constant/polyMesh/faces.sha512 | 1 + .../constant/polyMesh/neighbour.sha512 | 1 + .../processor1/constant/polyMesh/owner.sha512 | 1 + .../constant/polyMesh/points.sha512 | 1 + .../processor2/0.005/CH4.sha512 | 1 + .../processor2/0.005/CO2.sha512 | 1 + .../processor2/0.005/H2.sha512 | 1 + .../processor2/0.005/H2O.sha512 | 1 + .../processor2/0.005/N2.sha512 | 1 + .../processor2/0.005/O2.sha512 | 1 + .../processor2/0.005/T.sha512 | 1 + .../processor2/0.005/U.sha512 | 1 + .../processor2/0.005/p.sha512 | 1 + .../processor2/0.005/rho.sha512 | 1 + .../processor2/0.01/CH4.sha512 | 1 + .../processor2/0.01/CO2.sha512 | 1 + .../processor2/0.01/H2.sha512 | 1 + .../processor2/0.01/H2O.sha512 | 1 + .../processor2/0.01/N2.sha512 | 1 + .../processor2/0.01/O2.sha512 | 1 + .../processor2/0.01/T.sha512 | 1 + .../processor2/0.01/U.sha512 | 1 + .../processor2/0.01/p.sha512 | 1 + .../processor2/0.01/rho.sha512 | 1 + .../processor2/0/CH4.sha512 | 1 + .../processor2/0/CO.sha512 | 1 + .../processor2/0/CO2.sha512 | 1 + .../processor2/0/H2.sha512 | 1 + .../processor2/0/H2O.sha512 | 1 + .../processor2/0/N2.sha512 | 1 + .../processor2/0/O2.sha512 | 1 + .../processor2/0/T.sha512 | 1 + .../processor2/0/U.sha512 | 1 + .../processor2/0/p.sha512 | 1 + .../constant/polyMesh/boundary.sha512 | 1 + .../processor2/constant/polyMesh/faces.sha512 | 1 + .../constant/polyMesh/neighbour.sha512 | 1 + .../processor2/constant/polyMesh/owner.sha512 | 1 + .../constant/polyMesh/points.sha512 | 1 + .../processor3/0.005/CH4.sha512 | 1 + .../processor3/0.005/CO2.sha512 | 1 + .../processor3/0.005/H2.sha512 | 1 + .../processor3/0.005/H2O.sha512 | 1 + .../processor3/0.005/N2.sha512 | 1 + .../processor3/0.005/O2.sha512 | 1 + .../processor3/0.005/T.sha512 | 1 + .../processor3/0.005/U.sha512 | 1 + .../processor3/0.005/p.sha512 | 1 + .../processor3/0.005/rho.sha512 | 1 + .../processor3/0.01/CH4.sha512 | 1 + .../processor3/0.01/CO2.sha512 | 1 + .../processor3/0.01/H2.sha512 | 1 + .../processor3/0.01/H2O.sha512 | 1 + .../processor3/0.01/N2.sha512 | 1 + .../processor3/0.01/O2.sha512 | 1 + .../processor3/0.01/T.sha512 | 1 + .../processor3/0.01/U.sha512 | 1 + .../processor3/0.01/p.sha512 | 1 + .../processor3/0.01/rho.sha512 | 1 + .../processor3/0/CH4.sha512 | 1 + .../processor3/0/CO.sha512 | 1 + .../processor3/0/CO2.sha512 | 1 + .../processor3/0/H2.sha512 | 1 + .../processor3/0/H2O.sha512 | 1 + .../processor3/0/N2.sha512 | 1 + .../processor3/0/O2.sha512 | 1 + .../processor3/0/T.sha512 | 1 + .../processor3/0/U.sha512 | 1 + .../processor3/0/p.sha512 | 1 + .../constant/polyMesh/boundary.sha512 | 1 + .../processor3/constant/polyMesh/faces.sha512 | 1 + .../constant/polyMesh/neighbour.sha512 | 1 + .../processor3/constant/polyMesh/owner.sha512 | 1 + .../constant/polyMesh/points.sha512 | 1 + .../simplifiedSiwek-uncollated.foam.sha512 | 1 + .../system/controlDict.sha512 | 1 + Testing/Data/OpenFOAM/squareBend/100/T.sha512 | 1 + Testing/Data/OpenFOAM/squareBend/100/U.sha512 | 1 + Testing/Data/OpenFOAM/squareBend/100/p.sha512 | 1 + .../Data/OpenFOAM/squareBend/100/phi.sha512 | 1 + .../Data/OpenFOAM/squareBend/100/rho.sha512 | 1 + Testing/Data/OpenFOAM/squareBend/50/T.sha512 | 1 + Testing/Data/OpenFOAM/squareBend/50/U.sha512 | 1 + Testing/Data/OpenFOAM/squareBend/50/p.sha512 | 1 + .../Data/OpenFOAM/squareBend/50/phi.sha512 | 1 + .../Data/OpenFOAM/squareBend/50/rho.sha512 | 1 + .../constant/polyMesh/boundary.sha512 | 1 + .../constant/polyMesh/cellZones.sha512 | 1 + .../constant/polyMesh/faceZones.sha512 | 1 + .../squareBend/constant/polyMesh/faces.sha512 | 1 + .../constant/polyMesh/neighbour.sha512 | 1 + .../squareBend/constant/polyMesh/owner.sha512 | 1 + .../constant/polyMesh/points.sha512 | 1 + .../squareBend/squareBend.foam.sha512 | 1 + .../squareBend/system/controlDict.sha512 | 1 + .../2002/pointLocations.sha512 | 1 + .../valuePointPatch/2002/uniform/time.sha512 | 1 + .../constant/polyMesh/boundary.sha512 | 1 + .../constant/polyMesh/faces.sha512 | 1 + .../constant/polyMesh/neighbour.sha512 | 1 + .../constant/polyMesh/owner.sha512 | 1 + .../constant/polyMesh/points.sha512 | 1 + .../valuePointPatch/system/controlDict.sha512 | 1 + .../valuePointPatch/system/fvSchemes.sha512 | 1 + .../valuePointPatch/system/fvSolution.sha512 | 1 + .../valuePointPatch.foam.sha512 | 1 + ...nsfer2DYScalarsTransferFunction.vti.sha512 | 1 + Testing/Data/anisotropyTex.png.sha512 | 1 + Testing/Data/bc_struct.cgns.sha512 | 1 + Testing/Data/beach_gzip.nrrd.sha512 | 1 + Testing/Data/can-pvtu.hdf.sha512 | 1 + Testing/Data/can-vtu.hdf.sha512 | 1 + Testing/Data/can.pvtu.sha512 | 1 + Testing/Data/can.vtu.sha512 | 1 + Testing/Data/can/can_0.vtu.sha512 | 1 + Testing/Data/can/can_1.vtu.sha512 | 1 + Testing/Data/can/can_2.vtu.sha512 | 1 + .../cartesian-attr.bp.0.sha512 | 1 + .../profiling.json.sha512 | 1 + Testing/Data/cartesian-attr.bp.sha512 | 1 + Testing/Data/channelBump_solution.cgns.sha512 | 1 + Testing/Data/converge3.1-format.h5.sha512 | 1 + .../explicitStructuredGridEmpty.vtu.sha512 | 1 + Testing/Data/jacksonville_15.mtl.sha512 | 1 + Testing/Data/jacksonville_15.obj.sha512 | 1 + Testing/Data/jacksonville_15.png.sha512 | 1 + Testing/Data/linhex.vtu.sha512 | 1 + Testing/Data/mandelbrot-vti.hdf.sha512 | 1 + Testing/Data/mandelbrot.vti.sha512 | 1 + Testing/Data/mb-of-mps.vtm.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_0_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_10_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_11_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_12_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_13_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_14_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_1_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_2_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_3_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_4_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_5_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_6_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_7_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_8_0.vtp.sha512 | 1 + .../Data/mb-of-mps/mb-of-mps_9_0.vtp.sha512 | 1 + Testing/Data/mb_with_pieces.vtm.sha512 | 1 + .../pvi_Material_Remap2_0005_0_0.vtu.sha512 | 1 + .../pvi_Material_Remap2_0005_0_1.vtu.sha512 | 1 + .../pvi_Material_Remap2_0005_1_0.vtu.sha512 | 1 + .../pvi_Material_Remap2_0005_1_1.vtu.sha512 | 1 + .../pvi_Material_Remap2_0005_2_0.vtu.sha512 | 1 + .../pvi_Material_Remap2_0005_2_1.vtu.sha512 | 1 + Testing/Data/mg_diff/mg_diff_0000.vtm.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_0.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_1.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_10.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_11.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_12.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_13.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_14.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_15.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_2.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_3.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_4.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_5.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_6.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_7.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_8.vtu.sha512 | 1 + .../mg_diff_0000/mg_diff_0000_0_9.vtu.sha512 | 1 + Testing/Data/mg_diff/mg_diff_0062.vtm.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_0.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_1.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_10.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_11.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_12.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_13.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_14.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_15.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_2.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_3.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_4.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_5.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_6.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_7.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_8.vtu.sha512 | 1 + .../mg_diff_0062/mg_diff_0062_0_9.vtu.sha512 | 1 + Testing/Data/mixed-mb.vtm.sha512 | 1 + .../multiblock_overlapping_tetras.vtm.sha512 | 1 + ...ltiblock_overlapping_tetras_0_0.vtu.sha512 | 1 + ...ltiblock_overlapping_tetras_1_0.vtu.sha512 | 1 + Testing/Data/nanowireTB23K298.xyz.sha512 | 2 +- .../obj_multitexture_notexture.obj.sha512 | 1 + Testing/Data/omf-test-file.omf.sha512 | 1 + Testing/Data/pen_1.cur.sha512 | 1 + Testing/Data/pen_1.xcursor.sha512 | 1 + Testing/Data/post_5016_spray.h5.sha512 | 1 + .../Data/sliding_multi_block_end.vtm.sha512 | 1 + .../sliding_multi_block_end_0_0.vtu.sha512 | 1 + .../sliding_multi_block_end_1_0.vtu.sha512 | 1 + .../sliding_multi_block_end_2_0.vtu.sha512 | 1 + .../sliding_multi_block_end_3_0.vtu.sha512 | 1 + .../Data/sliding_multi_block_start.vtm.sha512 | 1 + .../sliding_multi_block_start_0_0.vtu.sha512 | 1 + .../sliding_multi_block_start_1_0.vtu.sha512 | 1 + .../sliding_multi_block_start_2_0.vtu.sha512 | 1 + .../sliding_multi_block_start_3_0.vtu.sha512 | 1 + Testing/Data/slightlyRotated.vtu.sha512 | 1 + Testing/Data/test_cylinder.cgns.sha512 | 1 + Testing/Data/test_node_and_cell.cgns.sha512 | 1 + Testing/Data/tet_hex.vtu.sha512 | 1 + .../profiling.json.sha512 | 1 + .../tris-blocks-time.bp.0.sha512 | 1 + .../tris-blocks-time.bp.1.sha512 | 1 + .../tris-blocks-time.bp.2.sha512 | 1 + .../tris-blocks-time.bp.3.sha512 | 1 + Testing/Data/tris-blocks-time.bp.sha512 | 1 + Testing/Data/vtk-uns-grid-2.json.sha512 | 1 + Testing/Data/vtk.tga.sha512 | 1 + Testing/Data/vtk_Anisotropy.png.sha512 | 1 + Testing/Data/wedge18.e.sha512 | 1 + .../Data/xml-without-idtype-tag.vtu.sha512 | 1 + Testing/External/CMakeLists.txt | 6 +- Testing/GenericBridge/vtkBridgeAttribute.cxx | 54 +- Testing/GenericBridge/vtkBridgeCell.cxx | 104 +- Testing/GenericBridge/vtkBridgeCell.h | 12 +- .../GenericBridge/vtkBridgeCellIterator.cxx | 32 +- .../vtkBridgeCellIteratorOnCellBoundaries.cxx | 18 +- .../vtkBridgeCellIteratorOnCellList.cxx | 18 +- .../vtkBridgeCellIteratorOnDataSet.cxx | 18 +- .../vtkBridgeCellIteratorOne.cxx | 30 +- .../vtkBridgeCellIteratorStrategy.cxx | 4 +- .../vtkBridgeCellIteratorStrategy.h | 4 +- Testing/GenericBridge/vtkBridgeDataSet.cxx | 36 +- Testing/GenericBridge/vtkBridgeExport.h | 1 + .../GenericBridge/vtkBridgePointIterator.cxx | 24 +- .../vtkBridgePointIteratorOnCell.cxx | 22 +- .../vtkBridgePointIteratorOnDataSet.cxx | 22 +- .../vtkBridgePointIteratorOne.cxx | 22 +- Testing/IOSQL/DatabaseSchemaWith2Tables.h | 2 +- Testing/Rendering/vtkRegressionTestImage.h | 4 +- Testing/Rendering/vtkTesting.cxx | 65 +- Testing/Rendering/vtkTesting.h | 58 +- Testing/Rendering/vtkTestingInteractor.cxx | 4 +- Testing/Rendering/vtkTestingInteractor.h | 6 +- ThirdParty/.clang-tidy | 29 + ThirdParty/UPDATING.md | 55 +- ThirdParty/cgns/CMakeLists.txt | 17 + ThirdParty/cgns/update.sh | 48 + ThirdParty/cgns/vtk.module | 7 + ThirdParty/cgns/vtk_cgns.h.in | 36 + ThirdParty/cgns/vtkcgns/CMakeLists.txt | 464 + ThirdParty/cgns/vtkcgns/README.kitware.md | 12 + ThirdParty/cgns/vtkcgns/README.md | 98 + ThirdParty/cgns/vtkcgns/license.txt | 35 + ThirdParty/cgns/vtkcgns/src/CMakeLists.txt | 757 + ThirdParty/cgns/vtkcgns/src/adf/ADF.h | 389 + .../cgns/vtkcgns/src/adf/ADF_interface.c | 4382 ++ .../cgns/vtkcgns/src/adf/ADF_internals.c | 8984 ++++ .../cgns/vtkcgns/src/adf/ADF_internals.h | 1041 + ThirdParty/cgns/vtkcgns/src/adfh/ADF.h | 54 + ThirdParty/cgns/vtkcgns/src/adfh/ADFH.c | 3926 ++ ThirdParty/cgns/vtkcgns/src/adfh/ADFH.h | 441 + .../cgns/vtkcgns/src/cg_hash_types.h.in | 21 + ThirdParty/cgns/vtkcgns/src/cg_hashmap.c | 676 + ThirdParty/cgns/vtkcgns/src/cg_hashmap.h | 87 + ThirdParty/cgns/vtkcgns/src/cgns_error.c | 80 + ThirdParty/cgns/vtkcgns/src/cgns_header.h | 1334 + ThirdParty/cgns/vtkcgns/src/cgns_internals.c | 14789 ++++++ ThirdParty/cgns/vtkcgns/src/cgns_io.c | 2027 + ThirdParty/cgns/vtkcgns/src/cgns_io.h | 473 + ThirdParty/cgns/vtkcgns/src/cgnsconfig.h.in | 59 + ThirdParty/cgns/vtkcgns/src/cgnslib.c | 14811 ++++++ ThirdParty/cgns/vtkcgns/src/cgnslib.h | 1635 + ThirdParty/cgns/vtkcgns/src/cgnstypes.h.in | 113 + ThirdParty/cgns/vtkcgns/src/pcgnslib.c | 2104 + ThirdParty/cgns/vtkcgns/src/pcgnslib.h | 165 + ThirdParty/cgns/vtkcgns/src/vtk_cgns_mangle.h | 824 + ThirdParty/cli11/CMakeLists.txt | 20 + ThirdParty/cli11/update.sh | 28 + ThirdParty/cli11/vtk.module | 5 + ThirdParty/cli11/vtk_cli11.h | 36 + ThirdParty/cli11/vtk_cli11_external.h.in | 26 + ThirdParty/cli11/vtk_cli11_forward.h | 36 + ThirdParty/cli11/vtkcli11/CLI/App.hpp | 3181 ++ ThirdParty/cli11/vtkcli11/CLI/CLI.hpp | 41 + ThirdParty/cli11/vtkcli11/CLI/Config.hpp | 361 + ThirdParty/cli11/vtkcli11/CLI/ConfigFwd.hpp | 145 + ThirdParty/cli11/vtkcli11/CLI/Error.hpp | 351 + ThirdParty/cli11/vtkcli11/CLI/Formatter.hpp | 292 + .../cli11/vtkcli11/CLI/FormatterFwd.hpp | 184 + ThirdParty/cli11/vtkcli11/CLI/Macros.hpp | 44 + ThirdParty/cli11/vtkcli11/CLI/Option.hpp | 1323 + ThirdParty/cli11/vtkcli11/CLI/Split.hpp | 143 + ThirdParty/cli11/vtkcli11/CLI/StringTools.hpp | 418 + ThirdParty/cli11/vtkcli11/CLI/Timer.hpp | 134 + ThirdParty/cli11/vtkcli11/CLI/TypeTools.hpp | 1548 + ThirdParty/cli11/vtkcli11/CLI/Validators.hpp | 1143 + ThirdParty/cli11/vtkcli11/CLI/Version.hpp | 16 + ThirdParty/cli11/vtkcli11/CMakeLists.txt | 3 + ThirdParty/cli11/vtkcli11/LICENSE | 25 + ThirdParty/cli11/vtkcli11/README.kitware.md | 8 + ThirdParty/cli11/vtkcli11/README.md | 1049 + ThirdParty/diy2/update.sh | 6 +- .../diy2/vtkdiy2/include/vtkdiy2/io/utils.hpp | 2 +- ThirdParty/eigen/CMakeLists.txt | 2 +- ThirdParty/eigen/update.sh | 4 +- ThirdParty/exodusII/CMakeLists.txt | 2 +- ThirdParty/exodusII/update.sh | 2 +- ThirdParty/exodusII/vtk.module | 2 + .../exodusII/vtkexodusII/CMakeLists.txt | 17 + ThirdParty/exodusII/vtkexodusII/README | 2 +- .../exodusII/vtkexodusII/README.kitware.md | 2 +- .../vtkexodusII/cmake/exodus_config.h.in | 5 +- .../exodusII/vtkexodusII/include/exodusII.h | 783 +- .../vtkexodusII/include/exodusII_cfg.h.in | 63 +- .../vtkexodusII/include/exodusII_int.h | 463 +- .../vtkexodusII/include/vtk_exodusII_mangle.h | 259 +- .../src/deprecated/ex_get_concat_node_sets.c | 33 +- .../src/deprecated/ex_get_concat_side_sets.c | 31 +- .../src/deprecated/ex_get_elem_attr.c | 32 +- .../src/deprecated/ex_get_elem_attr_names.c | 31 +- .../src/deprecated/ex_get_elem_blk_ids.c | 33 +- .../src/deprecated/ex_get_elem_block.c | 31 +- .../src/deprecated/ex_get_elem_conn.c | 31 +- .../src/deprecated/ex_get_elem_map.c | 31 +- .../src/deprecated/ex_get_elem_num_map.c | 31 +- .../src/deprecated/ex_get_elem_var.c | 33 +- .../src/deprecated/ex_get_elem_var_tab.c | 31 +- .../src/deprecated/ex_get_elem_var_time.c | 32 +- .../src/deprecated/ex_get_glob_var_time.c | 31 +- .../src/deprecated/ex_get_glob_vars.c | 31 +- .../src/deprecated/ex_get_n_attr.c | 31 +- .../src/deprecated/ex_get_n_conn.c | 31 +- .../src/deprecated/ex_get_n_coord.c | 31 +- .../src/deprecated/ex_get_n_elem_attr.c | 31 +- .../src/deprecated/ex_get_n_elem_conn.c | 31 +- .../src/deprecated/ex_get_n_elem_num_map.c | 31 +- .../src/deprecated/ex_get_n_elem_var.c | 34 +- .../src/deprecated/ex_get_n_nodal_var.c | 31 +- .../src/deprecated/ex_get_n_node_num_map.c | 31 +- .../src/deprecated/ex_get_n_node_set.c | 31 +- .../src/deprecated/ex_get_n_node_set_df.c | 31 +- .../src/deprecated/ex_get_n_one_attr.c | 31 +- .../src/deprecated/ex_get_n_side_set.c | 31 +- .../src/deprecated/ex_get_n_side_set_df.c | 31 +- .../vtkexodusII/src/deprecated/ex_get_n_var.c | 31 +- .../src/deprecated/ex_get_nodal_var.c | 32 +- .../src/deprecated/ex_get_nodal_var_time.c | 32 +- .../src/deprecated/ex_get_node_map.c | 31 +- .../src/deprecated/ex_get_node_num_map.c | 31 +- .../src/deprecated/ex_get_node_set.c | 31 +- .../deprecated/ex_get_node_set_dist_fact.c | 31 +- .../src/deprecated/ex_get_node_set_ids.c | 31 +- .../src/deprecated/ex_get_node_set_param.c | 31 +- .../src/deprecated/ex_get_nset_var.c | 31 +- .../src/deprecated/ex_get_nset_var_tab.c | 31 +- .../src/deprecated/ex_get_one_elem_attr.c | 31 +- .../src/deprecated/ex_get_partial_elem_attr.c | 31 +- .../src/deprecated/ex_get_partial_elem_conn.c | 31 +- .../src/deprecated/ex_get_partial_elem_map.c | 31 +- .../deprecated/ex_get_partial_elem_num_map.c | 31 +- .../src/deprecated/ex_get_partial_elem_var.c | 33 +- .../src/deprecated/ex_get_partial_nodal_var.c | 32 +- .../deprecated/ex_get_partial_node_num_map.c | 31 +- .../src/deprecated/ex_get_partial_node_set.c | 31 +- .../deprecated/ex_get_partial_node_set_df.c | 31 +- .../src/deprecated/ex_get_partial_side_set.c | 31 +- .../deprecated/ex_get_partial_side_set_df.c | 31 +- .../src/deprecated/ex_get_side_set.c | 31 +- .../deprecated/ex_get_side_set_dist_fact.c | 31 +- .../src/deprecated/ex_get_side_set_ids.c | 31 +- .../src/deprecated/ex_get_side_set_param.c | 31 +- .../src/deprecated/ex_get_sset_var.c | 31 +- .../src/deprecated/ex_get_sset_var_tab.c | 31 +- .../src/deprecated/ex_get_var_name.c | 31 +- .../src/deprecated/ex_get_var_names.c | 31 +- .../src/deprecated/ex_get_var_param.c | 31 +- .../src/deprecated/ex_get_var_tab.c | 31 +- .../src/deprecated/ex_put_concat_node_sets.c | 32 +- .../src/deprecated/ex_put_concat_side_sets.c | 31 +- .../src/deprecated/ex_put_concat_var_param.c | 33 +- .../src/deprecated/ex_put_elem_attr.c | 31 +- .../src/deprecated/ex_put_elem_attr_names.c | 31 +- .../src/deprecated/ex_put_elem_block.c | 31 +- .../src/deprecated/ex_put_elem_conn.c | 32 +- .../src/deprecated/ex_put_elem_map.c | 31 +- .../src/deprecated/ex_put_elem_num_map.c | 31 +- .../src/deprecated/ex_put_elem_var.c | 31 +- .../src/deprecated/ex_put_elem_var_slab.c | 31 +- .../src/deprecated/ex_put_elem_var_tab.c | 57 +- .../src/deprecated/ex_put_glob_vars.c | 33 +- .../src/deprecated/ex_put_n_attr.c | 31 +- .../src/deprecated/ex_put_n_coord.c | 31 +- .../src/deprecated/ex_put_n_elem_attr.c | 31 +- .../src/deprecated/ex_put_n_elem_conn.c | 31 +- .../src/deprecated/ex_put_n_elem_num_map.c | 31 +- .../src/deprecated/ex_put_n_nodal_var.c | 31 +- .../src/deprecated/ex_put_n_node_num_map.c | 31 +- .../src/deprecated/ex_put_n_node_set.c | 31 +- .../src/deprecated/ex_put_n_node_set_df.c | 31 +- .../src/deprecated/ex_put_n_one_attr.c | 31 +- .../src/deprecated/ex_put_n_side_set.c | 31 +- .../src/deprecated/ex_put_n_side_set_df.c | 31 +- .../vtkexodusII/src/deprecated/ex_put_n_var.c | 31 +- .../src/deprecated/ex_put_nodal_var_slab.c | 31 +- .../src/deprecated/ex_put_node_map.c | 31 +- .../src/deprecated/ex_put_node_num_map.c | 31 +- .../src/deprecated/ex_put_node_set.c | 31 +- .../deprecated/ex_put_node_set_dist_fact.c | 31 +- .../src/deprecated/ex_put_node_set_param.c | 32 +- .../src/deprecated/ex_put_nset_var.c | 31 +- .../src/deprecated/ex_put_nset_var_tab.c | 31 +- .../src/deprecated/ex_put_one_elem_attr.c | 31 +- .../src/deprecated/ex_put_partial_elem_attr.c | 31 +- .../src/deprecated/ex_put_partial_elem_conn.c | 31 +- .../src/deprecated/ex_put_partial_elem_map.c | 31 +- .../deprecated/ex_put_partial_elem_num_map.c | 31 +- .../src/deprecated/ex_put_partial_nodal_var.c | 31 +- .../deprecated/ex_put_partial_node_num_map.c | 31 +- .../src/deprecated/ex_put_partial_node_set.c | 31 +- .../deprecated/ex_put_partial_node_set_df.c | 31 +- .../src/deprecated/ex_put_partial_side_set.c | 31 +- .../deprecated/ex_put_partial_side_set_df.c | 31 +- .../src/deprecated/ex_put_side_set.c | 31 +- .../deprecated/ex_put_side_set_dist_fact.c | 31 +- .../src/deprecated/ex_put_side_set_param.c | 31 +- .../src/deprecated/ex_put_sset_var.c | 31 +- .../src/deprecated/ex_put_sset_var_tab.c | 31 +- .../src/deprecated/ex_put_var_name.c | 31 +- .../src/deprecated/ex_put_var_names.c | 31 +- .../src/deprecated/ex_put_var_param.c | 31 +- .../src/deprecated/ex_put_var_tab.c | 31 +- .../src/ex__put_homogenous_block_params.c | 404 + .../exodusII/vtkexodusII/src/ex_add_attr.c | 35 +- .../exodusII/vtkexodusII/src/ex_close.c | 37 +- ThirdParty/exodusII/vtkexodusII/src/ex_conv.c | 132 +- ThirdParty/exodusII/vtkexodusII/src/ex_copy.c | 86 +- .../exodusII/vtkexodusII/src/ex_create.c | 41 +- .../vtkexodusII/src/ex_create_group.c | 35 +- .../exodusII/vtkexodusII/src/ex_create_par.c | 62 +- .../vtkexodusII/src/ex_cvt_nodes_to_sides.c | 58 +- ThirdParty/exodusII/vtkexodusII/src/ex_err.c | 33 +- .../vtkexodusII/src/ex_get_all_times.c | 35 +- .../vtkexodusII/src/ex_get_assemblies.c | 60 + .../vtkexodusII/src/ex_get_assembly.c | 119 + .../exodusII/vtkexodusII/src/ex_get_attr.c | 35 +- .../vtkexodusII/src/ex_get_attr_names.c | 35 +- .../vtkexodusII/src/ex_get_attr_param.c | 35 +- .../vtkexodusII/src/ex_get_attribute.c | 315 + .../exodusII/vtkexodusII/src/ex_get_blob.c | 98 + .../exodusII/vtkexodusII/src/ex_get_blobs.c | 53 + .../exodusII/vtkexodusII/src/ex_get_block.c | 31 +- .../vtkexodusII/src/ex_get_block_param.c | 31 +- .../vtkexodusII/src/ex_get_block_params.c | 31 +- .../vtkexodusII/src/ex_get_cmap_params.c | 35 +- .../vtkexodusII/src/ex_get_concat_sets.c | 35 +- .../src/ex_get_concat_side_set_node_count.c | 37 +- .../exodusII/vtkexodusII/src/ex_get_conn.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_coord.c | 35 +- .../vtkexodusII/src/ex_get_coord_names.c | 35 +- .../src/ex_get_coordinate_frames.c | 35 +- .../vtkexodusII/src/ex_get_eb_info_global.c | 35 +- .../vtkexodusII/src/ex_get_elem_cmap.c | 35 +- .../vtkexodusII/src/ex_get_elem_type.c | 35 +- .../src/ex_get_entity_count_per_polyhedra.c | 35 +- .../src/ex_get_glob_var_time_int.c | 35 +- .../vtkexodusII/src/ex_get_glob_vars_int.c | 35 +- .../vtkexodusII/src/ex_get_group_id.c | 31 +- .../vtkexodusII/src/ex_get_group_ids.c | 44 +- .../exodusII/vtkexodusII/src/ex_get_id_map.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_ids.c | 117 +- .../exodusII/vtkexodusII/src/ex_get_info.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_init.c | 37 +- .../vtkexodusII/src/ex_get_init_ext.c | 73 +- .../vtkexodusII/src/ex_get_init_global.c | 144 +- .../vtkexodusII/src/ex_get_init_info.c | 35 +- .../vtkexodusII/src/ex_get_loadbal_param.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_map.c | 35 +- .../vtkexodusII/src/ex_get_map_param.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_name.c | 45 +- .../exodusII/vtkexodusII/src/ex_get_names.c | 67 +- .../vtkexodusII/src/ex_get_nodal_var_int.c | 36 +- .../src/ex_get_nodal_var_time_int.c | 36 +- .../vtkexodusII/src/ex_get_node_cmap.c | 35 +- .../vtkexodusII/src/ex_get_ns_param_global.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_num_map.c | 35 +- .../src/ex_get_object_truth_vector.c | 42 +- .../vtkexodusII/src/ex_get_one_attr.c | 35 +- .../vtkexodusII/src/ex_get_partial_attr.c | 35 +- .../vtkexodusII/src/ex_get_partial_conn.c | 35 +- .../vtkexodusII/src/ex_get_partial_coord.c | 35 +- .../src/ex_get_partial_coord_component.c | 35 +- .../vtkexodusII/src/ex_get_partial_id_map.c | 35 +- .../src/ex_get_partial_nodal_var_int.c | 36 +- .../vtkexodusII/src/ex_get_partial_num_map.c | 35 +- .../vtkexodusII/src/ex_get_partial_one_attr.c | 35 +- .../vtkexodusII/src/ex_get_partial_set.c | 35 +- .../src/ex_get_partial_set_dist_fact.c | 35 +- .../vtkexodusII/src/ex_get_partial_var.c | 37 +- .../src/ex_get_processor_elem_maps.c | 35 +- .../src/ex_get_processor_node_maps.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_prop.c | 41 +- .../vtkexodusII/src/ex_get_prop_array.c | 41 +- .../vtkexodusII/src/ex_get_prop_names.c | 36 +- .../exodusII/vtkexodusII/src/ex_get_qa.c | 35 +- .../src/ex_get_reduction_variable_name.c | 70 + .../src/ex_get_reduction_variable_names.c | 111 + .../src/ex_get_reduction_variable_param.c | 114 + .../vtkexodusII/src/ex_get_reduction_vars.c | 130 + .../exodusII/vtkexodusII/src/ex_get_set.c | 35 +- .../vtkexodusII/src/ex_get_set_dist_fact.c | 35 +- .../vtkexodusII/src/ex_get_set_param.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_sets.c | 35 +- .../src/ex_get_side_set_node_count.c | 37 +- .../src/ex_get_side_set_node_list.c | 37 +- .../src/ex_get_side_set_node_list_len.c | 39 +- .../vtkexodusII/src/ex_get_ss_param_global.c | 35 +- .../exodusII/vtkexodusII/src/ex_get_time.c | 33 +- .../vtkexodusII/src/ex_get_truth_table.c | 55 +- .../exodusII/vtkexodusII/src/ex_get_var.c | 35 +- .../vtkexodusII/src/ex_get_var_time.c | 37 +- .../vtkexodusII/src/ex_get_variable_name.c | 37 +- .../vtkexodusII/src/ex_get_variable_names.c | 37 +- .../vtkexodusII/src/ex_get_variable_param.c | 37 +- .../exodusII/vtkexodusII/src/ex_inquire.c | 128 +- .../vtkexodusII/src/ex_int_get_block_param.c | 54 +- .../exodusII/vtkexodusII/src/ex_ne_util.c | 37 +- ThirdParty/exodusII/vtkexodusII/src/ex_open.c | 80 +- .../exodusII/vtkexodusII/src/ex_open_par.c | 84 +- ThirdParty/exodusII/vtkexodusII/src/ex_opts.c | 31 +- .../vtkexodusII/src/ex_put_all_var_param.c | 31 +- .../src/ex_put_all_var_param_ext.c | 37 +- .../vtkexodusII/src/ex_put_assemblies.c | 202 + .../vtkexodusII/src/ex_put_assembly.c | 23 + .../exodusII/vtkexodusII/src/ex_put_attr.c | 35 +- .../vtkexodusII/src/ex_put_attr_names.c | 35 +- .../vtkexodusII/src/ex_put_attr_param.c | 35 +- .../vtkexodusII/src/ex_put_attribute.c | 285 + .../exodusII/vtkexodusII/src/ex_put_blob.c | 20 + .../exodusII/vtkexodusII/src/ex_put_blobs.c | 145 + .../exodusII/vtkexodusII/src/ex_put_block.c | 47 +- .../vtkexodusII/src/ex_put_block_param.c | 31 +- .../vtkexodusII/src/ex_put_block_params.c | 105 +- .../vtkexodusII/src/ex_put_cmap_params.c | 37 +- .../vtkexodusII/src/ex_put_cmap_params_cc.c | 37 +- .../src/ex_put_concat_all_blocks.c | 37 +- .../src/ex_put_concat_elem_block.c | 35 +- .../vtkexodusII/src/ex_put_concat_sets.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_conn.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_coord.c | 35 +- .../vtkexodusII/src/ex_put_coord_names.c | 35 +- .../src/ex_put_coordinate_frames.c | 35 +- .../vtkexodusII/src/ex_put_eb_info_global.c | 35 +- .../vtkexodusII/src/ex_put_elem_cmap.c | 35 +- .../src/ex_put_entity_count_per_polyhedra.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_id_map.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_info.c | 38 +- .../exodusII/vtkexodusII/src/ex_put_init.c | 32 +- .../vtkexodusII/src/ex_put_init_ext.c | 50 +- .../vtkexodusII/src/ex_put_init_global.c | 35 +- .../vtkexodusII/src/ex_put_init_info.c | 35 +- .../vtkexodusII/src/ex_put_loadbal_param.c | 40 +- .../vtkexodusII/src/ex_put_loadbal_param_cc.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_map.c | 35 +- .../vtkexodusII/src/ex_put_map_param.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_name.c | 41 +- .../exodusII/vtkexodusII/src/ex_put_names.c | 43 +- .../vtkexodusII/src/ex_put_nodal_var.c | 33 +- .../vtkexodusII/src/ex_put_nodal_var_int.c | 33 +- .../vtkexodusII/src/ex_put_node_cmap.c | 35 +- .../vtkexodusII/src/ex_put_ns_param_global.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_num_map.c | 35 +- .../vtkexodusII/src/ex_put_one_attr.c | 35 +- .../vtkexodusII/src/ex_put_partial_attr.c | 35 +- .../vtkexodusII/src/ex_put_partial_conn.c | 35 +- .../vtkexodusII/src/ex_put_partial_coord.c | 35 +- .../src/ex_put_partial_coord_component.c | 35 +- .../vtkexodusII/src/ex_put_partial_id_map.c | 37 +- .../src/ex_put_partial_nodal_var_int.c | 35 +- .../src/ex_put_partial_node_cmap.c | 179 + .../vtkexodusII/src/ex_put_partial_num_map.c | 35 +- .../vtkexodusII/src/ex_put_partial_one_attr.c | 35 +- .../vtkexodusII/src/ex_put_partial_set.c | 35 +- .../src/ex_put_partial_set_dist_fact.c | 35 +- .../vtkexodusII/src/ex_put_partial_var.c | 352 +- .../src/ex_put_processor_elem_maps.c | 35 +- .../src/ex_put_processor_node_maps.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_prop.c | 40 +- .../vtkexodusII/src/ex_put_prop_array.c | 41 +- .../vtkexodusII/src/ex_put_prop_names.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_qa.c | 36 +- .../src/ex_put_reduction_variable_name.c | 82 + .../src/ex_put_reduction_variable_names.c | 188 + .../src/ex_put_reduction_variable_param.c | 278 + .../vtkexodusII/src/ex_put_reduction_vars.c | 266 + .../exodusII/vtkexodusII/src/ex_put_set.c | 35 +- .../vtkexodusII/src/ex_put_set_dist_fact.c | 35 +- .../vtkexodusII/src/ex_put_set_param.c | 31 +- .../exodusII/vtkexodusII/src/ex_put_sets.c | 35 +- .../vtkexodusII/src/ex_put_ss_param_global.c | 35 +- .../exodusII/vtkexodusII/src/ex_put_time.c | 31 +- .../vtkexodusII/src/ex_put_truth_table.c | 56 +- .../exodusII/vtkexodusII/src/ex_put_var.c | 132 +- .../vtkexodusII/src/ex_put_variable_name.c | 37 +- .../vtkexodusII/src/ex_put_variable_names.c | 44 +- .../vtkexodusII/src/ex_put_variable_param.c | 113 +- .../exodusII/vtkexodusII/src/ex_threadsafe.c | 45 +- .../exodusII/vtkexodusII/src/ex_update.c | 35 +- .../exodusII/vtkexodusII/src/ex_utils.c | 399 +- ThirdParty/expat/CMakeLists.txt | 2 +- ThirdParty/expat/update.sh | 4 +- ThirdParty/exprtk/CMakeLists.txt | 17 + ThirdParty/exprtk/update.sh | 28 + ThirdParty/exprtk/vtk.module | 5 + ThirdParty/exprtk/vtk_exprtk.h.in | 27 + ThirdParty/exprtk/vtkexprtk/CMakeLists.txt | 6 + ThirdParty/exprtk/vtkexprtk/License.txt | 30 + ThirdParty/exprtk/vtkexprtk/README.kitware.md | 8 + ThirdParty/exprtk/vtkexprtk/exprtk.hpp | 40487 ++++++++++++++++ ThirdParty/exprtk/vtkexprtk/readme.txt | 4919 ++ ThirdParty/fides/CMakeLists.txt | 6 + ThirdParty/fides/update.sh | 29 + ThirdParty/fides/vtk.module | 9 + ThirdParty/fides/vtkfides/CMakeLists.txt | 110 + ThirdParty/fides/vtkfides/LICENSE.txt | 36 + ThirdParty/fides/vtkfides/README.kitware.md | 10 + ThirdParty/fides/vtkfides/README.md | 39 + .../cmake/FidesExportHeaderTemplate.h.in | 69 + .../fides/vtkfides/cmake/FidesModule.cmake | 21 + .../cmake/fides_generate_export_header.cmake | 28 + ThirdParty/fides/vtkfides/fides/Array.cxx | 1152 + ThirdParty/fides/vtkfides/fides/Array.h | 357 + .../fides/vtkfides/fides/CMakeLists.txt | 103 + ThirdParty/fides/vtkfides/fides/CellSet.cxx | 938 + ThirdParty/fides/vtkfides/fides/CellSet.h | 261 + ThirdParty/fides/vtkfides/fides/Configure.h | 50 + .../fides/vtkfides/fides/CoordinateSystem.cxx | 71 + .../fides/vtkfides/fides/CoordinateSystem.h | 65 + ThirdParty/fides/vtkfides/fides/DataModel.cxx | 100 + ThirdParty/fides/vtkfides/fides/DataModel.h | 86 + .../fides/vtkfides/fides/DataSetReader.cxx | 757 + .../fides/vtkfides/fides/DataSetReader.h | 149 + .../fides/vtkfides/fides/DataSetWriter.cxx | 1301 + .../fides/vtkfides/fides/DataSetWriter.h | 96 + .../fides/vtkfides/fides/DataSource.cxx | 877 + ThirdParty/fides/vtkfides/fides/DataSource.h | 211 + ThirdParty/fides/vtkfides/fides/Deprecated.h | 151 + .../fides/vtkfides/fides/FidesTypes.cxx | 134 + ThirdParty/fides/vtkfides/fides/FidesTypes.h | 164 + ThirdParty/fides/vtkfides/fides/Field.cxx | 219 + ThirdParty/fides/vtkfides/fides/Field.h | 109 + ThirdParty/fides/vtkfides/fides/FieldData.cxx | 41 + ThirdParty/fides/vtkfides/fides/FieldData.h | 55 + .../fides/vtkfides/fides/FieldDataManager.cxx | 59 + .../fides/vtkfides/fides/FieldDataManager.h | 74 + ThirdParty/fides/vtkfides/fides/Keys.cxx | 77 + ThirdParty/fides/vtkfides/fides/Keys.h | 79 + ThirdParty/fides/vtkfides/fides/MetaData.cxx | 19 + ThirdParty/fides/vtkfides/fides/MetaData.h | 229 + ThirdParty/fides/vtkfides/fides/Value.cxx | 172 + ThirdParty/fides/vtkfides/fides/Value.h | 151 + .../vtkfides/fides/predefined/CMakeLists.txt | 20 + .../fides/predefined/DataModelFactory.cxx | 125 + .../fides/predefined/DataModelFactory.h | 73 + .../predefined/DataModelHelperFunctions.cxx | 246 + .../predefined/DataModelHelperFunctions.h | 225 + .../predefined/InternalMetadataSource.cxx | 71 + .../fides/predefined/InternalMetadataSource.h | 68 + .../fides/predefined/PredefinedDataModel.cxx | 811 + .../fides/predefined/PredefinedDataModel.h | 218 + .../fides/predefined/SupportedDataModels.cxx | 38 + .../fides/predefined/SupportedDataModels.h | 46 + .../fides/vtkfides/fides/xgc/CMakeLists.txt | 11 + .../fides/vtkfides/fides/xgc/XGCCommon.cxx | 240 + .../fides/vtkfides/fides/xgc/XGCCommon.h | 76 + .../fides/vtkfides/thirdparty/UPDATING.md | 105 + .../thirdparty/rapidjson/CMakeLists.txt | 28 + .../thirdparty/rapidjson/fides_rapidjson.h.in | 23 + .../include/fidesrapidjson/allocators.h | 284 + .../fidesrapidjson/cursorstreamwrapper.h | 78 + .../include/fidesrapidjson/document.h | 2682 + .../include/fidesrapidjson/encodedstream.h | 299 + .../include/fidesrapidjson/encodings.h | 716 + .../include/fidesrapidjson/error/en.h | 74 + .../include/fidesrapidjson/error/error.h | 161 + .../include/fidesrapidjson/filereadstream.h | 99 + .../include/fidesrapidjson/filewritestream.h | 104 + .../include/fidesrapidjson/fwd.h | 151 + .../fidesrapidjson/internal/biginteger.h | 290 + .../include/fidesrapidjson/internal/clzll.h | 72 + .../include/fidesrapidjson/internal/diyfp.h | 257 + .../include/fidesrapidjson/internal/dtoa.h | 245 + .../include/fidesrapidjson/internal/ieee754.h | 78 + .../include/fidesrapidjson/internal/itoa.h | 308 + .../include/fidesrapidjson/internal/meta.h | 186 + .../include/fidesrapidjson/internal/pow10.h | 55 + .../include/fidesrapidjson/internal/regex.h | 739 + .../include/fidesrapidjson/internal/stack.h | 232 + .../include/fidesrapidjson/internal/strfunc.h | 69 + .../include/fidesrapidjson/internal/strtod.h | 290 + .../include/fidesrapidjson/internal/swap.h | 46 + .../include/fidesrapidjson/istreamwrapper.h | 128 + .../include/fidesrapidjson/memorybuffer.h | 70 + .../include/fidesrapidjson/memorystream.h | 71 + .../fidesrapidjson/msinttypes/inttypes.h | 316 + .../fidesrapidjson/msinttypes/stdint.h | 300 + .../include/fidesrapidjson/ostreamwrapper.h | 81 + .../include/fidesrapidjson/pointer.h | 1415 + .../include/fidesrapidjson/prettywriter.h | 277 + .../include/fidesrapidjson/rapidjson.h | 676 + .../include/fidesrapidjson/reader.h | 2231 + .../include/fidesrapidjson/schema.h | 2496 + .../include/fidesrapidjson/stream.h | 223 + .../include/fidesrapidjson/stringbuffer.h | 121 + .../include/fidesrapidjson/writer.h | 710 + .../rapidjson/fidesrapidjson/license.txt | 57 + .../rapidjson/fidesrapidjson/readme.md | 210 + .../vtkfides/thirdparty/rapidjson/update.sh | 26 + .../vtkfides/thirdparty/update-common.sh | 196 + ThirdParty/fmt/CMakeLists.txt | 20 + ThirdParty/fmt/update.sh | 32 + ThirdParty/fmt/vtk.module | 5 + ThirdParty/fmt/vtk_fmt.h.in | 49 + ThirdParty/fmt/vtkfmt/CMakeLists.txt | 44 + ThirdParty/fmt/vtkfmt/LICENSE.rst | 27 + ThirdParty/fmt/vtkfmt/README.kitware.md | 8 + ThirdParty/fmt/vtkfmt/README.rst | 528 + ThirdParty/fmt/vtkfmt/src/format.cc | 79 + ThirdParty/fmt/vtkfmt/src/os.cc | 361 + .../fmt/vtkfmt/support/cmake/cxx14.cmake | 70 + ThirdParty/fmt/vtkfmt/vtkfmt/args.h | 244 + ThirdParty/fmt/vtkfmt/vtkfmt/chrono.h | 1308 + ThirdParty/fmt/vtkfmt/vtkfmt/color.h | 627 + ThirdParty/fmt/vtkfmt/vtkfmt/compile.h | 639 + ThirdParty/fmt/vtkfmt/vtkfmt/core.h | 3006 ++ ThirdParty/fmt/vtkfmt/vtkfmt/format-inl.h | 2620 + ThirdParty/fmt/vtkfmt/vtkfmt/format.h | 2830 ++ ThirdParty/fmt/vtkfmt/vtkfmt/locale.h | 2 + ThirdParty/fmt/vtkfmt/vtkfmt/os.h | 517 + ThirdParty/fmt/vtkfmt/vtkfmt/ostream.h | 181 + ThirdParty/fmt/vtkfmt/vtkfmt/printf.h | 652 + ThirdParty/fmt/vtkfmt/vtkfmt/ranges.h | 468 + ThirdParty/fmt/vtkfmt/vtkfmt/xchar.h | 236 + ThirdParty/freetype/CMakeLists.txt | 4 +- ThirdParty/freetype/update.sh | 6 +- ThirdParty/gl2ps/CMakeLists.txt | 7 +- ThirdParty/gl2ps/update.sh | 2 +- ThirdParty/glew/CMakeLists.txt | 2 +- ThirdParty/glew/update.sh | 2 +- ThirdParty/glew/vtk_glew.h.in | 44 +- ThirdParty/hdf5/CMakeLists.txt | 11 +- ThirdParty/hdf5/update.sh | 11 +- ThirdParty/hdf5/vtk_hdf5.h.in | 2 + ThirdParty/imported.md | 16 +- ThirdParty/ioss/CMakeLists.txt | 30 + ThirdParty/ioss/update.sh | 62 + ThirdParty/ioss/vtk.module | 10 + ThirdParty/ioss/vtk_ioss.h.in | 27 + ThirdParty/ioss/vtkioss/CMakeLists.txt | 372 + ThirdParty/ioss/vtkioss/COPYRIGHT | 31 + ThirdParty/ioss/vtkioss/Ioss_Assembly.C | 157 + ThirdParty/ioss/vtkioss/Ioss_Assembly.h | 72 + ThirdParty/ioss/vtkioss/Ioss_Beam2.C | 131 + ThirdParty/ioss/vtkioss/Ioss_Beam2.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Beam3.C | 123 + ThirdParty/ioss/vtkioss/Ioss_Beam3.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Beam4.C | 123 + ThirdParty/ioss/vtkioss/Ioss_Beam4.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Blob.C | 49 + ThirdParty/ioss/vtkioss/Ioss_Blob.h | 56 + ThirdParty/ioss/vtkioss/Ioss_BoundingBox.h | 32 + ThirdParty/ioss/vtkioss/Ioss_CodeTypes.h | 108 + ThirdParty/ioss/vtkioss/Ioss_CommSet.C | 57 + ThirdParty/ioss/vtkioss/Ioss_CommSet.h | 52 + ThirdParty/ioss/vtkioss/Ioss_Compare.C | 1374 + ThirdParty/ioss/vtkioss/Ioss_Compare.h | 30 + .../ioss/vtkioss/Ioss_CompositeVariableType.C | 82 + .../ioss/vtkioss/Ioss_CompositeVariableType.h | 35 + .../ioss/vtkioss/Ioss_ConcreteVariableType.C | 486 + .../ioss/vtkioss/Ioss_ConcreteVariableType.h | 85 + .../vtkioss/Ioss_ConstructedVariableType.C | 33 + .../vtkioss/Ioss_ConstructedVariableType.h | 25 + .../ioss/vtkioss/Ioss_CoordinateFrame.C | 79 + .../ioss/vtkioss/Ioss_CoordinateFrame.h | 41 + ThirdParty/ioss/vtkioss/Ioss_CopyDatabase.C | 1480 + ThirdParty/ioss/vtkioss/Ioss_CopyDatabase.h | 29 + ThirdParty/ioss/vtkioss/Ioss_DBUsage.h | 47 + ThirdParty/ioss/vtkioss/Ioss_DataPool.h | 44 + ThirdParty/ioss/vtkioss/Ioss_DataSize.h | 18 + ThirdParty/ioss/vtkioss/Ioss_DatabaseIO.C | 1219 + ThirdParty/ioss/vtkioss/Ioss_DatabaseIO.h | 833 + ThirdParty/ioss/vtkioss/Ioss_Decomposition.C | 1501 + ThirdParty/ioss/vtkioss/Ioss_Decomposition.h | 673 + ThirdParty/ioss/vtkioss/Ioss_Doxygen.h | 201 + ThirdParty/ioss/vtkioss/Ioss_Edge2.C | 109 + ThirdParty/ioss/vtkioss/Ioss_Edge2.h | 56 + ThirdParty/ioss/vtkioss/Ioss_Edge2D2.C | 108 + ThirdParty/ioss/vtkioss/Ioss_Edge2D2.h | 56 + ThirdParty/ioss/vtkioss/Ioss_Edge2D3.C | 108 + ThirdParty/ioss/vtkioss/Ioss_Edge2D3.h | 56 + ThirdParty/ioss/vtkioss/Ioss_Edge3.C | 108 + ThirdParty/ioss/vtkioss/Ioss_Edge3.h | 56 + ThirdParty/ioss/vtkioss/Ioss_Edge4.C | 108 + ThirdParty/ioss/vtkioss/Ioss_Edge4.h | 56 + ThirdParty/ioss/vtkioss/Ioss_EdgeBlock.C | 56 + ThirdParty/ioss/vtkioss/Ioss_EdgeBlock.h | 56 + ThirdParty/ioss/vtkioss/Ioss_EdgeSet.C | 53 + ThirdParty/ioss/vtkioss/Ioss_EdgeSet.h | 57 + ThirdParty/ioss/vtkioss/Ioss_ElementBlock.C | 77 + ThirdParty/ioss/vtkioss/Ioss_ElementBlock.h | 59 + ThirdParty/ioss/vtkioss/Ioss_ElementSet.C | 52 + ThirdParty/ioss/vtkioss/Ioss_ElementSet.h | 57 + .../ioss/vtkioss/Ioss_ElementTopology.C | 349 + .../ioss/vtkioss/Ioss_ElementTopology.h | 133 + .../ioss/vtkioss/Ioss_ElementVariableType.h | 37 + ThirdParty/ioss/vtkioss/Ioss_EntityBlock.C | 115 + ThirdParty/ioss/vtkioss/Ioss_EntityBlock.h | 111 + ThirdParty/ioss/vtkioss/Ioss_EntitySet.C | 43 + ThirdParty/ioss/vtkioss/Ioss_EntitySet.h | 52 + ThirdParty/ioss/vtkioss/Ioss_EntityType.h | 37 + ThirdParty/ioss/vtkioss/Ioss_FaceBlock.C | 55 + ThirdParty/ioss/vtkioss/Ioss_FaceBlock.h | 56 + ThirdParty/ioss/vtkioss/Ioss_FaceGenerator.C | 537 + ThirdParty/ioss/vtkioss/Ioss_FaceGenerator.h | 136 + ThirdParty/ioss/vtkioss/Ioss_FaceSet.C | 53 + ThirdParty/ioss/vtkioss/Ioss_FaceSet.h | 57 + ThirdParty/ioss/vtkioss/Ioss_Field.C | 319 + ThirdParty/ioss/vtkioss/Ioss_Field.h | 172 + ThirdParty/ioss/vtkioss/Ioss_FieldManager.C | 143 + ThirdParty/ioss/vtkioss/Ioss_FieldManager.h | 63 + ThirdParty/ioss/vtkioss/Ioss_FileInfo.C | 408 + ThirdParty/ioss/vtkioss/Ioss_FileInfo.h | 107 + ThirdParty/ioss/vtkioss/Ioss_GetLongOpt.C | 412 + ThirdParty/ioss/vtkioss/Ioss_GetLongOpt.h | 115 + ThirdParty/ioss/vtkioss/Ioss_Getline.c | 2189 + ThirdParty/ioss/vtkioss/Ioss_Getline.h | 70 + ThirdParty/ioss/vtkioss/Ioss_Glob.h | 1696 + ThirdParty/ioss/vtkioss/Ioss_GroupingEntity.C | 472 + ThirdParty/ioss/vtkioss/Ioss_GroupingEntity.h | 739 + ThirdParty/ioss/vtkioss/Ioss_Hex16.C | 193 + ThirdParty/ioss/vtkioss/Ioss_Hex16.h | 62 + ThirdParty/ioss/vtkioss/Ioss_Hex20.C | 170 + ThirdParty/ioss/vtkioss/Ioss_Hex20.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Hex27.C | 171 + ThirdParty/ioss/vtkioss/Ioss_Hex27.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Hex32.C | 172 + ThirdParty/ioss/vtkioss/Ioss_Hex32.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Hex64.C | 175 + ThirdParty/ioss/vtkioss/Ioss_Hex64.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Hex8.C | 171 + ThirdParty/ioss/vtkioss/Ioss_Hex8.h | 60 + ThirdParty/ioss/vtkioss/Ioss_IOFactory.C | 170 + ThirdParty/ioss/vtkioss/Ioss_IOFactory.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Initializer.C | 91 + ThirdParty/ioss/vtkioss/Ioss_Initializer.h | 17 + ThirdParty/ioss/vtkioss/Ioss_Map.C | 501 + ThirdParty/ioss/vtkioss/Ioss_Map.h | 120 + .../ioss/vtkioss/Ioss_MeshCopyOptions.h | 42 + ThirdParty/ioss/vtkioss/Ioss_MeshType.h | 17 + .../vtkioss/Ioss_NamedSuffixVariableType.h | 46 + ThirdParty/ioss/vtkioss/Ioss_Node.C | 119 + ThirdParty/ioss/vtkioss/Ioss_Node.h | 56 + ThirdParty/ioss/vtkioss/Ioss_NodeBlock.C | 105 + ThirdParty/ioss/vtkioss/Ioss_NodeBlock.h | 74 + ThirdParty/ioss/vtkioss/Ioss_NodeSet.C | 49 + ThirdParty/ioss/vtkioss/Ioss_NodeSet.h | 54 + ThirdParty/ioss/vtkioss/Ioss_NullEntity.h | 43 + ThirdParty/ioss/vtkioss/Ioss_ParallelUtils.C | 582 + ThirdParty/ioss/vtkioss/Ioss_ParallelUtils.h | 292 + ThirdParty/ioss/vtkioss/Ioss_Property.C | 436 + ThirdParty/ioss/vtkioss/Ioss_Property.h | 134 + .../ioss/vtkioss/Ioss_PropertyManager.C | 161 + .../ioss/vtkioss/Ioss_PropertyManager.h | 62 + ThirdParty/ioss/vtkioss/Ioss_Pyramid13.C | 178 + ThirdParty/ioss/vtkioss/Ioss_Pyramid13.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Pyramid14.C | 178 + ThirdParty/ioss/vtkioss/Ioss_Pyramid14.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Pyramid18.C | 178 + ThirdParty/ioss/vtkioss/Ioss_Pyramid18.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Pyramid19.C | 178 + ThirdParty/ioss/vtkioss/Ioss_Pyramid19.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Pyramid5.C | 175 + ThirdParty/ioss/vtkioss/Ioss_Pyramid5.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Quad12.C | 112 + ThirdParty/ioss/vtkioss/Ioss_Quad12.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Quad16.C | 112 + ThirdParty/ioss/vtkioss/Ioss_Quad16.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Quad4.C | 112 + ThirdParty/ioss/vtkioss/Ioss_Quad4.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Quad6.C | 131 + ThirdParty/ioss/vtkioss/Ioss_Quad6.h | 57 + ThirdParty/ioss/vtkioss/Ioss_Quad8.C | 113 + ThirdParty/ioss/vtkioss/Ioss_Quad8.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Quad9.C | 112 + ThirdParty/ioss/vtkioss/Ioss_Quad9.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Region.C | 2598 + ThirdParty/ioss/vtkioss/Ioss_Region.h | 391 + ThirdParty/ioss/vtkioss/Ioss_ScopeGuard.h | 275 + ThirdParty/ioss/vtkioss/Ioss_SerializeIO.C | 99 + ThirdParty/ioss/vtkioss/Ioss_SerializeIO.h | 105 + ThirdParty/ioss/vtkioss/Ioss_Shell4.C | 161 + ThirdParty/ioss/vtkioss/Ioss_Shell4.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Shell8.C | 160 + ThirdParty/ioss/vtkioss/Ioss_Shell8.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Shell9.C | 160 + ThirdParty/ioss/vtkioss/Ioss_Shell9.h | 60 + ThirdParty/ioss/vtkioss/Ioss_ShellLine2D2.C | 116 + ThirdParty/ioss/vtkioss/Ioss_ShellLine2D2.h | 59 + ThirdParty/ioss/vtkioss/Ioss_ShellLine2D3.C | 118 + ThirdParty/ioss/vtkioss/Ioss_ShellLine2D3.h | 59 + ThirdParty/ioss/vtkioss/Ioss_SideBlock.C | 192 + ThirdParty/ioss/vtkioss/Ioss_SideBlock.h | 110 + ThirdParty/ioss/vtkioss/Ioss_SideSet.C | 221 + ThirdParty/ioss/vtkioss/Ioss_SideSet.h | 76 + ThirdParty/ioss/vtkioss/Ioss_SmartAssert.C | 223 + ThirdParty/ioss/vtkioss/Ioss_SmartAssert.h | 370 + ThirdParty/ioss/vtkioss/Ioss_Sort.h | 156 + ThirdParty/ioss/vtkioss/Ioss_Sphere.C | 126 + ThirdParty/ioss/vtkioss/Ioss_Sphere.h | 57 + ThirdParty/ioss/vtkioss/Ioss_Spring2.C | 104 + ThirdParty/ioss/vtkioss/Ioss_Spring2.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Spring3.C | 104 + ThirdParty/ioss/vtkioss/Ioss_Spring3.h | 58 + .../ioss/vtkioss/Ioss_StandardElementTypes.h | 75 + ThirdParty/ioss/vtkioss/Ioss_State.h | 38 + .../ioss/vtkioss/Ioss_StructuredBlock.C | 454 + .../ioss/vtkioss/Ioss_StructuredBlock.h | 355 + ThirdParty/ioss/vtkioss/Ioss_SubSystem.h | 43 + ThirdParty/ioss/vtkioss/Ioss_Super.C | 104 + ThirdParty/ioss/vtkioss/Ioss_Super.h | 67 + ThirdParty/ioss/vtkioss/Ioss_SurfaceSplit.h | 43 + ThirdParty/ioss/vtkioss/Ioss_Tet10.C | 169 + ThirdParty/ioss/vtkioss/Ioss_Tet10.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Tet11.C | 170 + ThirdParty/ioss/vtkioss/Ioss_Tet11.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Tet14.C | 174 + ThirdParty/ioss/vtkioss/Ioss_Tet14.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Tet15.C | 174 + ThirdParty/ioss/vtkioss/Ioss_Tet15.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Tet16.C | 173 + ThirdParty/ioss/vtkioss/Ioss_Tet16.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Tet4.C | 171 + ThirdParty/ioss/vtkioss/Ioss_Tet4.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Tet40.C | 173 + ThirdParty/ioss/vtkioss/Ioss_Tet40.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Tet7.C | 196 + ThirdParty/ioss/vtkioss/Ioss_Tet7.h | 63 + ThirdParty/ioss/vtkioss/Ioss_Tet8.C | 169 + ThirdParty/ioss/vtkioss/Ioss_Tet8.h | 60 + ThirdParty/ioss/vtkioss/Ioss_Tracer.C | 23 + ThirdParty/ioss/vtkioss/Ioss_Tracer.h | 24 + ThirdParty/ioss/vtkioss/Ioss_Transform.C | 33 + ThirdParty/ioss/vtkioss/Ioss_Transform.h | 65 + ThirdParty/ioss/vtkioss/Ioss_Tri13.C | 113 + ThirdParty/ioss/vtkioss/Ioss_Tri13.h | 59 + ThirdParty/ioss/vtkioss/Ioss_Tri3.C | 115 + ThirdParty/ioss/vtkioss/Ioss_Tri3.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Tri4.C | 112 + ThirdParty/ioss/vtkioss/Ioss_Tri4.h | 59 + ThirdParty/ioss/vtkioss/Ioss_Tri4a.C | 119 + ThirdParty/ioss/vtkioss/Ioss_Tri4a.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Tri6.C | 113 + ThirdParty/ioss/vtkioss/Ioss_Tri6.h | 59 + ThirdParty/ioss/vtkioss/Ioss_Tri7.C | 113 + ThirdParty/ioss/vtkioss/Ioss_Tri7.h | 59 + ThirdParty/ioss/vtkioss/Ioss_Tri9.C | 113 + ThirdParty/ioss/vtkioss/Ioss_Tri9.h | 59 + ThirdParty/ioss/vtkioss/Ioss_TriShell3.C | 162 + ThirdParty/ioss/vtkioss/Ioss_TriShell3.h | 61 + ThirdParty/ioss/vtkioss/Ioss_TriShell4.C | 160 + ThirdParty/ioss/vtkioss/Ioss_TriShell4.h | 61 + ThirdParty/ioss/vtkioss/Ioss_TriShell6.C | 142 + ThirdParty/ioss/vtkioss/Ioss_TriShell6.h | 59 + ThirdParty/ioss/vtkioss/Ioss_TriShell7.C | 142 + ThirdParty/ioss/vtkioss/Ioss_TriShell7.h | 59 + ThirdParty/ioss/vtkioss/Ioss_Unknown.C | 115 + ThirdParty/ioss/vtkioss/Ioss_Unknown.h | 58 + ThirdParty/ioss/vtkioss/Ioss_Utils.C | 1398 + ThirdParty/ioss/vtkioss/Ioss_Utils.h | 513 + ThirdParty/ioss/vtkioss/Ioss_VariableType.C | 313 + ThirdParty/ioss/vtkioss/Ioss_VariableType.h | 108 + ThirdParty/ioss/vtkioss/Ioss_Version.h | 15 + ThirdParty/ioss/vtkioss/Ioss_Wedge12.C | 192 + ThirdParty/ioss/vtkioss/Ioss_Wedge12.h | 62 + ThirdParty/ioss/vtkioss/Ioss_Wedge15.C | 172 + ThirdParty/ioss/vtkioss/Ioss_Wedge15.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Wedge16.C | 172 + ThirdParty/ioss/vtkioss/Ioss_Wedge16.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Wedge18.C | 172 + ThirdParty/ioss/vtkioss/Ioss_Wedge18.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Wedge20.C | 170 + ThirdParty/ioss/vtkioss/Ioss_Wedge20.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Wedge21.C | 170 + ThirdParty/ioss/vtkioss/Ioss_Wedge21.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Wedge24.C | 170 + ThirdParty/ioss/vtkioss/Ioss_Wedge24.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Wedge52.C | 170 + ThirdParty/ioss/vtkioss/Ioss_Wedge52.h | 61 + ThirdParty/ioss/vtkioss/Ioss_Wedge6.C | 173 + ThirdParty/ioss/vtkioss/Ioss_Wedge6.h | 62 + .../ioss/vtkioss/Ioss_ZoneConnectivity.C | 419 + .../ioss/vtkioss/Ioss_ZoneConnectivity.h | 148 + ThirdParty/ioss/vtkioss/README.kitware.md | 11 + ThirdParty/ioss/vtkioss/bhopscotch_map.h | 734 + ThirdParty/ioss/vtkioss/bhopscotch_set.h | 586 + ThirdParty/ioss/vtkioss/catch.hpp | 17937 +++++++ .../ioss/vtkioss/cgns/Iocgns_DatabaseIO.C | 3191 ++ .../ioss/vtkioss/cgns/Iocgns_DatabaseIO.h | 217 + .../vtkioss/cgns/Iocgns_DecompositionData.C | 1381 + .../vtkioss/cgns/Iocgns_DecompositionData.h | 257 + ThirdParty/ioss/vtkioss/cgns/Iocgns_Defines.h | 17 + .../ioss/vtkioss/cgns/Iocgns_IOFactory.C | 138 + .../ioss/vtkioss/cgns/Iocgns_IOFactory.h | 36 + .../ioss/vtkioss/cgns/Iocgns_Initializer.C | 20 + .../ioss/vtkioss/cgns/Iocgns_Initializer.h | 22 + .../vtkioss/cgns/Iocgns_ParallelDatabaseIO.C | 2614 + .../vtkioss/cgns/Iocgns_ParallelDatabaseIO.h | 231 + .../vtkioss/cgns/Iocgns_StructuredZoneData.C | 495 + .../vtkioss/cgns/Iocgns_StructuredZoneData.h | 101 + ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.C | 3013 ++ ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.h | 328 + .../ioss/vtkioss/cmake/SEACASIoss_config.h.in | 18 + .../ioss/vtkioss/exodus/Ioex_BaseDatabaseIO.C | 2899 ++ .../ioss/vtkioss/exodus/Ioex_BaseDatabaseIO.h | 331 + .../ioss/vtkioss/exodus/Ioex_DatabaseIO.C | 5473 +++ .../ioss/vtkioss/exodus/Ioex_DatabaseIO.h | 238 + .../vtkioss/exodus/Ioex_DecompositionData.C | 1848 + .../vtkioss/exodus/Ioex_DecompositionData.h | 270 + .../ioss/vtkioss/exodus/Ioex_IOFactory.C | 167 + .../ioss/vtkioss/exodus/Ioex_IOFactory.h | 36 + .../ioss/vtkioss/exodus/Ioex_Internals.C | 4294 ++ .../ioss/vtkioss/exodus/Ioex_Internals.h | 421 + .../vtkioss/exodus/Ioex_ParallelDatabaseIO.C | 4790 ++ .../vtkioss/exodus/Ioex_ParallelDatabaseIO.h | 264 + .../ioss/vtkioss/exodus/Ioex_SuperElement.C | 283 + .../ioss/vtkioss/exodus/Ioex_SuperElement.h | 59 + ThirdParty/ioss/vtkioss/exodus/Ioex_Utils.C | 737 + ThirdParty/ioss/vtkioss/exodus/Ioex_Utils.h | 140 + .../ioss/vtkioss/gen_struc/Iogs_DatabaseIO.C | 721 + .../ioss/vtkioss/gen_struc/Iogs_DatabaseIO.h | 208 + .../vtkioss/gen_struc/Iogs_GeneratedMesh.C | 912 + .../vtkioss/gen_struc/Iogs_GeneratedMesh.h | 405 + .../vtkioss/generated/Iogn_DashSurfaceMesh.C | 421 + .../vtkioss/generated/Iogn_DashSurfaceMesh.h | 258 + .../ioss/vtkioss/generated/Iogn_DatabaseIO.C | 866 + .../ioss/vtkioss/generated/Iogn_DatabaseIO.h | 210 + .../vtkioss/generated/Iogn_GeneratedMesh.C | 1573 + .../vtkioss/generated/Iogn_GeneratedMesh.h | 495 + .../ioss/vtkioss/heartbeat/Iohb_DatabaseIO.C | 596 + .../ioss/vtkioss/heartbeat/Iohb_DatabaseIO.h | 201 + .../ioss/vtkioss/heartbeat/Iohb_Layout.C | 44 + .../ioss/vtkioss/heartbeat/Iohb_Layout.h | 120 + .../ioss/vtkioss/hopscotch_growth_policy.h | 404 + ThirdParty/ioss/vtkioss/hopscotch_hash.h | 1883 + ThirdParty/ioss/vtkioss/hopscotch_map.h | 735 + ThirdParty/ioss/vtkioss/hopscotch_set.h | 592 + .../ioss/vtkioss/init/Ionit_Initializer.C | 106 + .../ioss/vtkioss/init/Ionit_Initializer.h | 32 + ThirdParty/ioss/vtkioss/pdqsort.h | 533 + .../vtkioss/private_copy_fmt/fmt/chrono.h | 1118 + .../ioss/vtkioss/private_copy_fmt/fmt/color.h | 603 + .../vtkioss/private_copy_fmt/fmt/compile.h | 701 + .../ioss/vtkioss/private_copy_fmt/fmt/core.h | 2130 + .../vtkioss/private_copy_fmt/fmt/format-inl.h | 2801 ++ .../vtkioss/private_copy_fmt/fmt/format.h | 3960 ++ .../vtkioss/private_copy_fmt/fmt/locale.h | 64 + .../ioss/vtkioss/private_copy_fmt/fmt/os.h | 480 + .../vtkioss/private_copy_fmt/fmt/ostream.h | 177 + .../ioss/vtkioss/private_copy_fmt/fmt/posix.h | 2 + .../vtkioss/private_copy_fmt/fmt/printf.h | 751 + .../vtkioss/private_copy_fmt/fmt/ranges.h | 396 + ThirdParty/ioss/vtkioss/robin_growth_policy.h | 406 + ThirdParty/ioss/vtkioss/robin_hash.h | 1586 + ThirdParty/ioss/vtkioss/robin_map.h | 807 + ThirdParty/ioss/vtkioss/robin_set.h | 660 + ThirdParty/ioss/vtkioss/tokenize.C | 27 + ThirdParty/ioss/vtkioss/tokenize.h | 23 + .../ioss/vtkioss/transform/Iotr_Factory.C | 66 + .../ioss/vtkioss/transform/Iotr_Initializer.C | 27 + .../ioss/vtkioss/transform/Iotr_Initializer.h | 23 + .../ioss/vtkioss/transform/Iotr_MinMax.C | 155 + .../ioss/vtkioss/transform/Iotr_MinMax.h | 50 + .../ioss/vtkioss/transform/Iotr_Offset.C | 77 + .../ioss/vtkioss/transform/Iotr_Offset.h | 53 + .../ioss/vtkioss/transform/Iotr_Offset3D.C | 104 + .../ioss/vtkioss/transform/Iotr_Offset3D.h | 54 + .../ioss/vtkioss/transform/Iotr_Scale.C | 71 + .../ioss/vtkioss/transform/Iotr_Scale.h | 53 + .../ioss/vtkioss/transform/Iotr_Scale3D.C | 104 + .../ioss/vtkioss/transform/Iotr_Scale3D.h | 57 + .../ioss/vtkioss/transform/Iotr_Tensor.C | 131 + .../ioss/vtkioss/transform/Iotr_Tensor.h | 60 + .../vtkioss/transform/Iotr_VectorMagnitude.C | 75 + .../vtkioss/transform/Iotr_VectorMagnitude.h | 46 + ThirdParty/ioss/vtkioss/vtk_ioss_mangle.h | 35 + ThirdParty/jpeg/CMakeLists.txt | 2 +- ThirdParty/jpeg/update.sh | 2 +- ThirdParty/jsoncpp/CMakeLists.txt | 2 +- ThirdParty/jsoncpp/update.sh | 8 +- ThirdParty/kissfft/update.sh | 2 +- ThirdParty/kissfft/vtk_kissfft.h.in | 4 +- ThirdParty/kissfft/vtkkissfft/CMakeLists.txt | 1 + ThirdParty/libproj/vtk_libproj.h.in | 7 +- ThirdParty/libxml2/CMakeLists.txt | 2 +- ThirdParty/libxml2/update.sh | 13 +- ThirdParty/loguru/CMakeLists.txt | 2 +- ThirdParty/loguru/update.sh | 2 +- ThirdParty/loguru/vtkloguru/README.md | 2 +- ThirdParty/loguru/vtkloguru/loguru.cpp | 248 +- ThirdParty/loguru/vtkloguru/loguru.hpp | 116 +- ThirdParty/lz4/CMakeLists.txt | 2 +- ThirdParty/lz4/update.sh | 2 +- ThirdParty/lzma/CMakeLists.txt | 2 +- ThirdParty/lzma/update.sh | 7 +- ThirdParty/netcdf/CMakeLists.txt | 17 +- ThirdParty/netcdf/update.sh | 4 +- ThirdParty/ogg/CMakeLists.txt | 2 +- ThirdParty/ogg/update.sh | 2 +- ThirdParty/pegtl/CMakeLists.txt | 2 +- ThirdParty/pegtl/update.sh | 2 +- ThirdParty/pegtl/vtkpegtl/LICENSE | 2 +- ThirdParty/pegtl/vtkpegtl/README.md | 11 +- .../pegtl/vtkpegtl/include/tao/pegtl.hpp | 2 +- .../tao/pegtl/analysis/analyze_cycles.hpp | 4 +- .../include/tao/pegtl/analysis/counted.hpp | 6 +- .../include/tao/pegtl/analysis/generic.hpp | 10 +- .../tao/pegtl/analysis/grammar_info.hpp | 2 +- .../tao/pegtl/analysis/insert_guard.hpp | 2 +- .../tao/pegtl/analysis/insert_rules.hpp | 45 - .../include/tao/pegtl/analysis/rule_info.hpp | 2 +- .../include/tao/pegtl/analysis/rule_type.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/analyze.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/apply_mode.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/argv_input.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/ascii.hpp | 2 +- .../include/tao/pegtl/buffer_input.hpp | 4 +- .../include/tao/pegtl/change_action.hpp | 2 +- .../tao/pegtl/change_action_and_state.hpp | 2 +- .../tao/pegtl/change_action_and_states.hpp | 2 +- .../include/tao/pegtl/change_control.hpp | 2 +- .../include/tao/pegtl/change_state.hpp | 2 +- .../include/tao/pegtl/change_states.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/config.hpp | 2 +- .../include/tao/pegtl/contrib/abnf.hpp | 2 +- .../include/tao/pegtl/contrib/alphabet.hpp | 106 +- .../include/tao/pegtl/contrib/changes.hpp | 2 +- .../include/tao/pegtl/contrib/counter.hpp | 2 +- .../include/tao/pegtl/contrib/http.hpp | 37 +- .../tao/pegtl/contrib/icu/internal.hpp | 28 +- .../include/tao/pegtl/contrib/icu/utf16.hpp | 2 +- .../include/tao/pegtl/contrib/icu/utf32.hpp | 2 +- .../include/tao/pegtl/contrib/icu/utf8.hpp | 2 +- .../include/tao/pegtl/contrib/if_then.hpp | 2 +- .../include/tao/pegtl/contrib/integer.hpp | 2 +- .../include/tao/pegtl/contrib/json.hpp | 10 +- .../tao/pegtl/contrib/json_pointer.hpp | 2 +- .../include/tao/pegtl/contrib/parse_tree.hpp | 231 +- .../tao/pegtl/contrib/parse_tree_to_dot.hpp | 11 +- .../include/tao/pegtl/contrib/raw_string.hpp | 5 +- .../tao/pegtl/contrib/remove_first_state.hpp | 38 +- .../tao/pegtl/contrib/remove_last_states.hpp | 106 + .../tao/pegtl/contrib/rep_one_min_max.hpp | 2 +- .../include/tao/pegtl/contrib/rep_string.hpp | 2 +- .../tao/pegtl/contrib/shuffle_states.hpp | 174 + .../include/tao/pegtl/contrib/to_string.hpp | 2 +- .../include/tao/pegtl/contrib/tracer.hpp | 2 +- .../include/tao/pegtl/contrib/unescape.hpp | 2 +- .../include/tao/pegtl/contrib/uri.hpp | 2 +- .../include/tao/pegtl/cstream_input.hpp | 2 +- .../include/tao/pegtl/disable_action.hpp | 2 +- .../include/tao/pegtl/discard_input.hpp | 2 +- .../tao/pegtl/discard_input_on_failure.hpp | 2 +- .../tao/pegtl/discard_input_on_success.hpp | 2 +- .../include/tao/pegtl/enable_action.hpp | 2 +- .../pegtl/vtkpegtl/include/tao/pegtl/eol.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/eol_pair.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/file_input.hpp | 2 +- .../include/tao/pegtl/input_error.hpp | 2 +- .../include/tao/pegtl/internal/action.hpp | 13 +- .../tao/pegtl/internal/action_input.hpp | 2 +- .../include/tao/pegtl/internal/alnum.hpp | 2 +- .../include/tao/pegtl/internal/alpha.hpp | 2 +- .../tao/pegtl/internal/always_false.hpp | 2 +- .../include/tao/pegtl/internal/any.hpp | 13 +- .../include/tao/pegtl/internal/apply.hpp | 2 +- .../include/tao/pegtl/internal/apply0.hpp | 2 +- .../tao/pegtl/internal/apply0_single.hpp | 2 +- .../tao/pegtl/internal/apply_single.hpp | 2 +- .../include/tao/pegtl/internal/at.hpp | 17 +- .../include/tao/pegtl/internal/bof.hpp | 2 +- .../include/tao/pegtl/internal/bol.hpp | 2 +- .../include/tao/pegtl/internal/bump.hpp | 2 +- .../include/tao/pegtl/internal/bump_help.hpp | 2 +- .../include/tao/pegtl/internal/bytes.hpp | 2 +- .../include/tao/pegtl/internal/control.hpp | 13 +- .../tao/pegtl/internal/cr_crlf_eol.hpp | 2 +- .../include/tao/pegtl/internal/cr_eol.hpp | 2 +- .../include/tao/pegtl/internal/crlf_eol.hpp | 2 +- .../tao/pegtl/internal/cstream_reader.hpp | 4 +- .../tao/pegtl/internal/cstring_reader.hpp | 2 +- .../include/tao/pegtl/internal/demangle.hpp | 2 +- .../tao/pegtl/internal/demangle_cxxabi.hpp | 2 +- .../tao/pegtl/internal/demangle_nop.hpp | 2 +- .../tao/pegtl/internal/demangle_sanitise.hpp | 2 +- .../include/tao/pegtl/internal/disable.hpp | 13 +- .../include/tao/pegtl/internal/discard.hpp | 2 +- .../include/tao/pegtl/internal/dusel_mode.hpp | 2 +- .../tao/pegtl/internal/duseltronik.hpp | 2 +- .../include/tao/pegtl/internal/enable.hpp | 13 +- .../include/tao/pegtl/internal/endian.hpp | 2 +- .../include/tao/pegtl/internal/endian_gcc.hpp | 10 +- .../include/tao/pegtl/internal/endian_win.hpp | 6 +- .../include/tao/pegtl/internal/eof.hpp | 2 +- .../include/tao/pegtl/internal/eol.hpp | 2 +- .../include/tao/pegtl/internal/eolf.hpp | 2 +- .../tao/pegtl/internal/file_mapper_posix.hpp | 2 +- .../tao/pegtl/internal/file_mapper_win32.hpp | 2 +- .../tao/pegtl/internal/file_opener.hpp | 2 +- .../tao/pegtl/internal/file_reader.hpp | 8 +- .../include/tao/pegtl/internal/has_apply.hpp | 2 +- .../include/tao/pegtl/internal/has_apply0.hpp | 2 +- .../include/tao/pegtl/internal/has_match.hpp | 2 +- .../include/tao/pegtl/internal/identifier.hpp | 2 +- .../include/tao/pegtl/internal/if_apply.hpp | 2 +- .../include/tao/pegtl/internal/if_missing.hpp | 2 +- .../include/tao/pegtl/internal/if_must.hpp | 5 +- .../tao/pegtl/internal/if_must_else.hpp | 2 +- .../tao/pegtl/internal/if_then_else.hpp | 2 +- .../include/tao/pegtl/internal/input_pair.hpp | 2 +- .../tao/pegtl/internal/integer_sequence.hpp | 2 +- .../tao/pegtl/internal/istream_reader.hpp | 2 +- .../include/tao/pegtl/internal/istring.hpp | 2 +- .../include/tao/pegtl/internal/iterator.hpp | 2 +- .../tao/pegtl/internal/lf_crlf_eol.hpp | 2 +- .../include/tao/pegtl/internal/lf_eol.hpp | 2 +- .../include/tao/pegtl/internal/list.hpp | 2 +- .../include/tao/pegtl/internal/list_must.hpp | 2 +- .../include/tao/pegtl/internal/list_tail.hpp | 2 +- .../tao/pegtl/internal/list_tail_pad.hpp | 2 +- .../include/tao/pegtl/internal/marker.hpp | 2 +- .../include/tao/pegtl/internal/must.hpp | 19 +- .../include/tao/pegtl/internal/not_at.hpp | 17 +- .../include/tao/pegtl/internal/one.hpp | 28 +- .../include/tao/pegtl/internal/opt.hpp | 16 +- .../include/tao/pegtl/internal/pad.hpp | 2 +- .../include/tao/pegtl/internal/pad_opt.hpp | 2 +- .../include/tao/pegtl/internal/peek_char.hpp | 10 +- .../tao/pegtl/internal/peek_mask_uint.hpp | 10 +- .../tao/pegtl/internal/peek_mask_uint8.hpp | 10 +- .../include/tao/pegtl/internal/peek_uint.hpp | 10 +- .../include/tao/pegtl/internal/peek_uint8.hpp | 10 +- .../include/tao/pegtl/internal/peek_utf16.hpp | 12 +- .../include/tao/pegtl/internal/peek_utf32.hpp | 10 +- .../include/tao/pegtl/internal/peek_utf8.hpp | 21 +- .../tao/pegtl/internal/pegtl_string.hpp | 4 +- .../include/tao/pegtl/internal/plus.hpp | 13 +- .../include/tao/pegtl/internal/raise.hpp | 2 +- .../include/tao/pegtl/internal/range.hpp | 15 +- .../include/tao/pegtl/internal/ranges.hpp | 15 +- .../include/tao/pegtl/internal/read_uint.hpp | 2 +- .../include/tao/pegtl/internal/rematch.hpp | 2 +- .../include/tao/pegtl/internal/rep.hpp | 21 +- .../include/tao/pegtl/internal/rep_min.hpp | 2 +- .../tao/pegtl/internal/rep_min_max.hpp | 27 +- .../include/tao/pegtl/internal/rep_opt.hpp | 13 +- .../include/tao/pegtl/internal/require.hpp | 2 +- .../tao/pegtl/internal/result_on_found.hpp | 2 +- .../tao/pegtl/internal/rule_conjunction.hpp | 67 - .../include/tao/pegtl/internal/rules.hpp | 2 +- .../include/tao/pegtl/internal/seq.hpp | 15 +- .../tao/pegtl/internal/skip_control.hpp | 2 +- .../include/tao/pegtl/internal/sor.hpp | 2 +- .../include/tao/pegtl/internal/star.hpp | 12 +- .../include/tao/pegtl/internal/star_must.hpp | 2 +- .../include/tao/pegtl/internal/state.hpp | 13 +- .../include/tao/pegtl/internal/string.hpp | 2 +- .../include/tao/pegtl/internal/trivial.hpp | 2 +- .../tao/pegtl/internal/try_catch_type.hpp | 16 +- .../include/tao/pegtl/internal/until.hpp | 17 +- .../include/tao/pegtl/istream_input.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/match.hpp | 2 +- .../include/tao/pegtl/memory_input.hpp | 25 +- .../vtkpegtl/include/tao/pegtl/mmap_input.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/normal.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/nothing.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/parse.hpp | 2 +- .../include/tao/pegtl/parse_error.hpp | 5 +- .../vtkpegtl/include/tao/pegtl/position.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/read_input.hpp | 2 +- .../include/tao/pegtl/require_apply.hpp | 2 +- .../include/tao/pegtl/require_apply0.hpp | 2 +- .../include/tao/pegtl/rewind_mode.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/rules.hpp | 6 +- .../include/tao/pegtl/string_input.hpp | 2 +- .../include/tao/pegtl/tracking_mode.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/uint16.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/uint32.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/uint64.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/uint8.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/utf16.hpp | 4 +- .../vtkpegtl/include/tao/pegtl/utf32.hpp | 4 +- .../pegtl/vtkpegtl/include/tao/pegtl/utf8.hpp | 2 +- .../vtkpegtl/include/tao/pegtl/version.hpp | 6 +- ThirdParty/png/update.sh | 2 +- ThirdParty/pugixml/CMakeLists.txt | 7 +- ThirdParty/pugixml/update.sh | 4 +- ThirdParty/pugixml/vtkpugixml/CMakeLists.txt | 316 +- ThirdParty/pugixml/vtkpugixml/LICENSE | 22 - ThirdParty/pugixml/vtkpugixml/LICENSE.md | 24 + .../pugixml/vtkpugixml/README.kitware.md | 12 +- ThirdParty/pugixml/vtkpugixml/readme.txt | 4 +- .../pugixml/vtkpugixml/src/pugiconfig.hpp.in | 9 +- ThirdParty/pugixml/vtkpugixml/src/pugixml.cpp | 355 +- ThirdParty/pugixml/vtkpugixml/src/pugixml.hpp | 38 +- ThirdParty/sqlite/CMakeLists.txt | 2 +- ThirdParty/sqlite/update.sh | 6 +- ThirdParty/tiff/CMakeLists.txt | 2 +- ThirdParty/tiff/update.sh | 28 +- ThirdParty/utf8/update.sh | 8 +- ThirdParty/vpic/vtkvpic/VPICGlobal.cxx | 6 +- ThirdParty/vtkm/vtkvtkm/CMakeLists.txt | 27 +- .../xdmf2/vtkxdmf2/libsrc/CMakeLists.txt | 5 +- .../vtkxdmf2/libsrc/CheckCXXSourceRuns.cmake | 62 - ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfHDF.cxx | 2 +- ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfObject.h | 6 +- Utilities/Benchmarks/CMakeLists.txt | 46 +- Utilities/Benchmarks/GLBenchmarking.cxx | 4 +- Utilities/Benchmarks/vtkRenderTimings.cxx | 4 +- Utilities/DICOMParser/DICOMAppHelper.cxx | 18 +- Utilities/DICOMParser/DICOMAppHelper.h | 12 +- Utilities/DICOMParser/DICOMFile.cxx | 1 - Utilities/DICOMParser/DICOMParser.cxx | 14 +- Utilities/Doxygen/CMakeLists.txt | 12 +- Utilities/Doxygen/doc_class2onlineexamples.py | 325 + Utilities/Doxygen/doc_extra_stylesheet.css | 50 + Utilities/Doxygen/doc_makeall.cmake.in | 13 + Utilities/Doxygen/doc_version.pl | 12 +- Utilities/Doxygen/doxyfile.in | 13 +- ...acklist.txt.in => sanitizer_ignore.txt.in} | 0 Utilities/Java/vtkJavaUtil.cxx | 500 +- Utilities/Java/vtkJavaUtil.h | 53 +- Utilities/KWIML/CMakeLists.txt | 7 +- Utilities/KWSys/CMakeLists.txt | 4 + Utilities/KWSys/vtksys/CMakeLists.txt | 20 +- Utilities/KWSys/vtksys/Directory.cxx | 39 +- Utilities/KWSys/vtksys/Directory.hxx.in | 6 +- Utilities/KWSys/vtksys/EncodingC.c | 2 +- Utilities/KWSys/vtksys/Glob.hxx.in | 7 +- Utilities/KWSys/vtksys/ProcessUNIX.c | 12 +- Utilities/KWSys/vtksys/Status.cxx | 60 + Utilities/KWSys/vtksys/Status.hxx.in | 104 + Utilities/KWSys/vtksys/SystemInformation.cxx | 29 +- Utilities/KWSys/vtksys/SystemTools.cxx | 454 +- Utilities/KWSys/vtksys/SystemTools.hxx.in | 75 +- Utilities/KWSys/vtksys/Terminal.c | 10 +- Utilities/KWSys/vtksys/testDirectory.cxx | 6 +- Utilities/KWSys/vtksys/testDynamicLoader.cxx | 23 +- Utilities/KWSys/vtksys/testStatus.cxx | 129 + Utilities/KWSys/vtksys/testSystemTools.cxx | 57 +- Utilities/Maintenance/SourceTarball.bash | 105 +- .../release/backport-commits-for-milestone.py | 223 - Utilities/Maintenance/release/gitlabapi.py | 71 - .../Maintenance/release/make-changelog.sh | 17 - Utilities/Maintenance/release/prep-emails.py | 41 - Utilities/Maintenance/release/send-emails.sh | 23 - Utilities/Maintenance/semanticDiffVersion.py | 208 +- Utilities/Maintenance/vtk_generate_pyi.py | 561 + Utilities/MetaIO/.clang-tidy | 105 + Utilities/MetaIO/vtkmetaio/CMakeLists.txt | 39 +- .../MetaIO/vtkmetaio/localMetaConfiguration.h | 58 +- Utilities/MetaIO/vtkmetaio/metaArray.cxx | 1056 +- Utilities/MetaIO/vtkmetaio/metaArray.h | 303 +- Utilities/MetaIO/vtkmetaio/metaArrow.cxx | 193 +- Utilities/MetaIO/vtkmetaio/metaArrow.h | 98 +- Utilities/MetaIO/vtkmetaio/metaBlob.cxx | 426 +- Utilities/MetaIO/vtkmetaio/metaBlob.h | 141 +- Utilities/MetaIO/vtkmetaio/metaCommand.cxx | 2441 +- Utilities/MetaIO/vtkmetaio/metaCommand.h | 490 +- Utilities/MetaIO/vtkmetaio/metaContour.cxx | 885 +- Utilities/MetaIO/vtkmetaio/metaContour.h | 215 +- Utilities/MetaIO/vtkmetaio/metaDTITube.cxx | 746 +- Utilities/MetaIO/vtkmetaio/metaDTITube.h | 219 +- Utilities/MetaIO/vtkmetaio/metaEllipse.cxx | 166 +- Utilities/MetaIO/vtkmetaio/metaEllipse.h | 86 +- Utilities/MetaIO/vtkmetaio/metaEvent.h | 48 +- Utilities/MetaIO/vtkmetaio/metaFEMObject.cxx | 1223 +- Utilities/MetaIO/vtkmetaio/metaFEMObject.h | 291 +- Utilities/MetaIO/vtkmetaio/metaForm.cxx | 849 +- Utilities/MetaIO/vtkmetaio/metaForm.h | 320 +- Utilities/MetaIO/vtkmetaio/metaGaussian.cxx | 134 +- Utilities/MetaIO/vtkmetaio/metaGaussian.h | 149 +- Utilities/MetaIO/vtkmetaio/metaGroup.cxx | 112 +- Utilities/MetaIO/vtkmetaio/metaGroup.h | 69 +- Utilities/MetaIO/vtkmetaio/metaITKUtils.h | 137 - Utilities/MetaIO/vtkmetaio/metaImage.cxx | 3361 +- Utilities/MetaIO/vtkmetaio/metaImage.h | 691 +- Utilities/MetaIO/vtkmetaio/metaImageTypes.h | 41 +- Utilities/MetaIO/vtkmetaio/metaImageUtils.cxx | 35 +- Utilities/MetaIO/vtkmetaio/metaImageUtils.h | 38 +- Utilities/MetaIO/vtkmetaio/metaLandmark.cxx | 398 +- Utilities/MetaIO/vtkmetaio/metaLandmark.h | 141 +- Utilities/MetaIO/vtkmetaio/metaLine.cxx | 446 +- Utilities/MetaIO/vtkmetaio/metaLine.h | 144 +- Utilities/MetaIO/vtkmetaio/metaMesh.cxx | 1515 +- Utilities/MetaIO/vtkmetaio/metaMesh.h | 420 +- Utilities/MetaIO/vtkmetaio/metaObject.cxx | 1732 +- Utilities/MetaIO/vtkmetaio/metaObject.h | 724 +- Utilities/MetaIO/vtkmetaio/metaOutput.cxx | 651 - Utilities/MetaIO/vtkmetaio/metaOutput.h | 174 - Utilities/MetaIO/vtkmetaio/metaScene.cxx | 508 +- Utilities/MetaIO/vtkmetaio/metaScene.h | 124 +- Utilities/MetaIO/vtkmetaio/metaSurface.cxx | 410 +- Utilities/MetaIO/vtkmetaio/metaSurface.h | 144 +- Utilities/MetaIO/vtkmetaio/metaTransform.cxx | 481 +- Utilities/MetaIO/vtkmetaio/metaTransform.h | 173 +- Utilities/MetaIO/vtkmetaio/metaTube.cxx | 2087 +- Utilities/MetaIO/vtkmetaio/metaTube.h | 286 +- Utilities/MetaIO/vtkmetaio/metaTubeGraph.cxx | 544 +- Utilities/MetaIO/vtkmetaio/metaTubeGraph.h | 195 +- Utilities/MetaIO/vtkmetaio/metaTypes.h | 326 +- Utilities/MetaIO/vtkmetaio/metaUtils.cxx | 1526 +- Utilities/MetaIO/vtkmetaio/metaUtils.h | 554 +- Utilities/MetaIO/vtkmetaio/metaVesselTube.cxx | 88 +- Utilities/MetaIO/vtkmetaio/metaVesselTube.h | 59 +- Utilities/OpenGL/CMakeLists.txt | 20 + .../vtkWin32OutputWindowProcess.c | 21 +- Utilities/Python/CMakeLists.txt | 26 +- Utilities/Python/vtkPython.h | 1 - .../Testing/Python/CMakeLists.txt | 4 +- Utilities/PythonInterpreter/vtk.module | 1 + .../vtkPythonInteractiveInterpreter.cxx | 24 +- .../vtkPythonInteractiveInterpreter.h | 4 +- .../vtkPythonInterpreter.cxx | 94 +- .../PythonInterpreter/vtkPythonInterpreter.h | 35 +- .../vtkPythonStdStreamCaptureHelper.h | 66 +- Utilities/Scripts/SetupGitAliases.sh | 4 - Utilities/Scripts/git-gerrit-push | 3 - Utilities/octree/octree/octree.h | 10 +- Utilities/octree/octree/octree_node.h | 2 +- Views/Context2D/CMakeLists.txt | 2 +- Views/Context2D/vtkContextInteractorStyle.cxx | 104 +- Views/Context2D/vtkContextInteractorStyle.h | 18 + Views/Context2D/vtkContextView.cxx | 10 +- Views/Core/vtkConvertSelectionDomain.cxx | 14 +- Views/Core/vtkDataRepresentation.cxx | 57 +- Views/Core/vtkDataRepresentation.h | 20 +- Views/Core/vtkEmptyRepresentation.cxx | 2 +- Views/Core/vtkRenderViewBase.h | 4 +- Views/Core/vtkView.cxx | 54 +- Views/Core/vtkView.h | 8 +- Views/Core/vtkViewTheme.cxx | 16 +- Views/Core/vtkViewTheme.h | 84 +- Views/Infovis/Testing/Cxx/TestColumnTree.cxx | 2 +- .../Testing/Cxx/TestDendrogramItem.cxx | 2 +- .../Testing/Cxx/TestHeatmapCategoryLegend.cxx | 2 +- Views/Infovis/Testing/Cxx/TestHeatmapItem.cxx | 2 +- .../Testing/Cxx/TestHeatmapScalarLegend.cxx | 2 +- .../Testing/Cxx/TestTanglegramItem.cxx | 2 +- .../Cxx/TestTreeHeatmapAutoCollapse.cxx | 2 +- .../Testing/Cxx/TestTreeHeatmapItem.cxx | 2 +- Views/Infovis/vtkApplyColors.h | 68 +- Views/Infovis/vtkApplyIcons.h | 28 +- Views/Infovis/vtkDendrogramItem.cxx | 78 +- Views/Infovis/vtkDendrogramItem.h | 36 +- Views/Infovis/vtkGraphItem.cxx | 8 +- Views/Infovis/vtkGraphItem.h | 14 +- Views/Infovis/vtkGraphLayoutView.cxx | 140 +- Views/Infovis/vtkGraphLayoutView.h | 120 +- Views/Infovis/vtkHeatmapItem.cxx | 62 +- Views/Infovis/vtkHeatmapItem.h | 26 +- Views/Infovis/vtkHierarchicalGraphPipeline.h | 44 +- Views/Infovis/vtkHierarchicalGraphView.cxx | 50 +- Views/Infovis/vtkHierarchicalGraphView.h | 38 +- Views/Infovis/vtkIcicleView.cxx | 22 +- Views/Infovis/vtkIcicleView.h | 18 +- .../vtkInteractorStyleAreaSelectHover.cxx | 20 +- .../vtkInteractorStyleAreaSelectHover.h | 16 +- .../vtkInteractorStyleTreeMapHover.cxx | 8 +- .../Infovis/vtkInteractorStyleTreeMapHover.h | 28 +- ...rallelCoordinatesHistogramRepresentation.h | 24 +- .../vtkParallelCoordinatesRepresentation.cxx | 27 +- .../vtkParallelCoordinatesRepresentation.h | 70 +- Views/Infovis/vtkParallelCoordinatesView.cxx | 25 +- Views/Infovis/vtkParallelCoordinatesView.h | 4 +- Views/Infovis/vtkRenderView.cxx | 6 +- Views/Infovis/vtkRenderView.h | 36 +- .../vtkRenderedGraphRepresentation.cxx | 10 +- .../Infovis/vtkRenderedGraphRepresentation.h | 58 +- .../vtkRenderedHierarchyRepresentation.cxx | 2 +- .../vtkRenderedHierarchyRepresentation.h | 12 +- Views/Infovis/vtkRenderedRepresentation.cxx | 27 +- Views/Infovis/vtkRenderedRepresentation.h | 15 +- .../vtkRenderedSurfaceRepresentation.cxx | 20 +- .../vtkRenderedSurfaceRepresentation.h | 4 +- .../vtkRenderedTreeAreaRepresentation.cxx | 10 +- .../vtkRenderedTreeAreaRepresentation.h | 94 +- Views/Infovis/vtkSCurveSpline.cxx | 10 +- Views/Infovis/vtkSCurveSpline.h | 2 +- Views/Infovis/vtkTanglegramItem.cxx | 44 +- Views/Infovis/vtkTanglegramItem.h | 30 +- Views/Infovis/vtkTreeAreaView.cxx | 100 +- Views/Infovis/vtkTreeAreaView.h | 88 +- Views/Infovis/vtkTreeHeatmapItem.cxx | 62 +- Views/Infovis/vtkTreeHeatmapItem.h | 12 +- Views/Infovis/vtkTreeMapView.cxx | 20 +- Views/Infovis/vtkTreeMapView.h | 8 +- Views/Infovis/vtkTreeRingView.cxx | 24 +- Views/Infovis/vtkTreeRingView.h | 22 +- Views/Qt/CMakeLists.txt | 8 +- Views/Qt/Testing/Cxx/TestVtkQtTableView.cxx | 2 +- Views/Qt/vtkQtAnnotationView.cxx | 12 +- Views/Qt/vtkQtAnnotationView.h | 2 +- Views/Qt/vtkQtListView.cxx | 30 +- Views/Qt/vtkQtListView.h | 22 +- Views/Qt/vtkQtRecordView.cxx | 12 +- Views/Qt/vtkQtRecordView.h | 4 +- Views/Qt/vtkQtTableRepresentation.cxx | 22 +- Views/Qt/vtkQtTableRepresentation.h | 16 +- Views/Qt/vtkQtTableView.cxx | 32 +- Views/Qt/vtkQtTableView.h | 34 +- Views/Qt/vtkQtTreeView.cxx | 61 +- Views/Qt/vtkQtTreeView.h | 16 +- Views/Qt/vtkQtView.cxx | 16 +- Views/Qt/vtkQtView.h | 2 +- Wrapping/Java/CMakeLists.txt | 7 +- Wrapping/Java/JavaInstall.cmake.in | 50 - Wrapping/Java/Maven/pom.xml.in | 2 +- Wrapping/Java/Testing/Java/CMakeLists.txt | 2 + Wrapping/Java/vtk/AxesActor.java | 6 +- .../jogl/vtkAbstractJoglComponent.java | 2 + .../jogl/vtkJoglCanvasComponent.java | 2 +- .../rendering/jogl/vtkJoglPanelComponent.java | 2 +- .../vtk/rendering/swt/vtkSwtComponent.java | 1 + .../vtkSwtInteractorForwarderDecorator.java | 6 +- .../vtk/rendering/vtkInteractorForwarder.java | 28 +- Wrapping/Java/vtk/sample/InternalFrames.java | 2 +- Wrapping/Java/vtk/vtkCanvas.java | 59 +- .../Java/vtk/vtkJavaMemoryManagerImpl.java | 4 +- Wrapping/Java/vtk/vtkPanel.java | 239 +- Wrapping/Java/vtk/vtkRenderWindowPanel.java | 22 +- Wrapping/Python/CMakeLists.txt | 65 +- Wrapping/Python/README.md | 559 +- Wrapping/Python/Testing/CMakeLists.txt | 1 + Wrapping/Python/Testing/Python/CMakeLists.txt | 3 + .../Testing/Python/TestErrorObserver.py | 26 + Wrapping/Python/vtk.py | 2 + Wrapping/Python/vtkPythonAppInit.cxx | 1 + Wrapping/Python/vtkmodules/__init__.py | 16 - Wrapping/Python/vtkmodules/__init__.py.in | 65 + .../vtkmodules/numpy_interface/algorithms.py | 11 +- .../qt/QVTKRenderWindowInteractor.py | 97 +- Wrapping/Python/vtkmodules/qt/__init__.py | 8 +- .../Python/vtkmodules/test/ErrorObserver.py | 53 + Wrapping/Python/vtkmodules/test/Testing.py | 5 +- Wrapping/Python/vtkmodules/test/__init__.py | 2 +- .../Python/vtkmodules/util/numpy_support.py | 2 +- Wrapping/PythonCore/CMakeLists.txt | 39 +- Wrapping/PythonCore/PyVTKEnum.cxx | 6 +- Wrapping/PythonCore/PyVTKExtras.cxx | 10 +- Wrapping/PythonCore/PyVTKMethodDescriptor.cxx | 17 +- Wrapping/PythonCore/PyVTKMethodDescriptor.h | 3 +- Wrapping/PythonCore/PyVTKNamespace.cxx | 16 +- Wrapping/PythonCore/PyVTKObject.cxx | 63 +- Wrapping/PythonCore/PyVTKObject.h | 15 +- Wrapping/PythonCore/PyVTKReference.cxx | 125 +- Wrapping/PythonCore/PyVTKReference.h | 13 +- Wrapping/PythonCore/PyVTKSpecialObject.cxx | 23 +- Wrapping/PythonCore/PyVTKSpecialObject.h | 3 +- Wrapping/PythonCore/PyVTKTemplate.cxx | 79 +- Wrapping/PythonCore/README.md | 98 + Wrapping/PythonCore/vtkPythonArgs.cxx | 164 +- Wrapping/PythonCore/vtkPythonArgs.h | 558 +- Wrapping/PythonCore/vtkPythonCommand.cxx | 4 +- Wrapping/PythonCore/vtkPythonCompatibility.h | 87 +- Wrapping/PythonCore/vtkPythonOverload.cxx | 72 +- Wrapping/PythonCore/vtkPythonOverload.h | 4 +- Wrapping/PythonCore/vtkPythonUtil.cxx | 108 +- Wrapping/PythonCore/vtkPythonUtil.h | 19 +- Wrapping/PythonCore/vtkSmartPyObject.cxx | 29 +- Wrapping/PythonCore/vtkSmartPyObject.h | 3 +- Wrapping/Tools/CMakeLists.txt | 2 + Wrapping/Tools/README.md | 248 + Wrapping/Tools/README.txt | 67 - Wrapping/Tools/lex.yy.c | 5573 +-- Wrapping/Tools/vtkParse.h | 7 + Wrapping/Tools/vtkParse.l | 503 +- Wrapping/Tools/vtkParse.tab.c | 10819 ++--- Wrapping/Tools/vtkParse.y | 1309 +- Wrapping/Tools/vtkParseAttributes.h | 31 + Wrapping/Tools/vtkParseData.c | 16 +- Wrapping/Tools/vtkParseData.h | 52 +- Wrapping/Tools/vtkParseExtras.c | 15 +- Wrapping/Tools/vtkParseHierarchy.c | 64 +- Wrapping/Tools/vtkParseHierarchy.h | 4 +- Wrapping/Tools/vtkParseJava.c | 598 +- Wrapping/Tools/vtkParseJavaBeans.c | 118 +- Wrapping/Tools/vtkParseMain.c | 30 +- Wrapping/Tools/vtkParseMerge.c | 7 +- Wrapping/Tools/vtkParsePreprocess.c | 105 +- Wrapping/Tools/vtkParsePreprocess.h | 14 +- Wrapping/Tools/vtkParseString.c | 37 +- Wrapping/Tools/vtkParseString.h | 16 +- Wrapping/Tools/vtkParseSystem.c | 403 + Wrapping/Tools/vtkParseSystem.h | 72 + Wrapping/Tools/vtkParseType.h | 10 +- Wrapping/Tools/vtkWrap.c | 85 +- Wrapping/Tools/vtkWrap.h | 6 + Wrapping/Tools/vtkWrapHierarchy.c | 8 +- Wrapping/Tools/vtkWrapJava.c | 858 +- Wrapping/Tools/vtkWrapPython.c | 57 +- Wrapping/Tools/vtkWrapPythonClass.c | 224 +- Wrapping/Tools/vtkWrapPythonClass.h | 13 +- Wrapping/Tools/vtkWrapPythonConstant.c | 46 +- Wrapping/Tools/vtkWrapPythonEnum.c | 15 +- Wrapping/Tools/vtkWrapPythonInit.c | 7 +- Wrapping/Tools/vtkWrapPythonMethod.c | 99 +- Wrapping/Tools/vtkWrapPythonMethod.h | 6 +- Wrapping/Tools/vtkWrapPythonMethodDef.c | 187 +- Wrapping/Tools/vtkWrapPythonNamespace.c | 5 +- Wrapping/Tools/vtkWrapPythonOverload.c | 66 +- Wrapping/Tools/vtkWrapPythonOverload.h | 4 +- Wrapping/Tools/vtkWrapPythonTemplate.c | 17 +- Wrapping/Tools/vtkWrapPythonType.c | 67 +- Wrapping/Tools/vtkWrapText.c | 222 +- Wrapping/Tools/vtkWrapText.h | 5 + 9037 files changed, 613808 insertions(+), 198692 deletions(-) create mode 100644 .clang-tidy create mode 100644 .kitware-release-paraview.json delete mode 100644 Accelerators/Vtkm/CMakeLists.txt create mode 100644 Accelerators/Vtkm/Core/CMakeLists.txt create mode 100644 Accelerators/Vtkm/Core/Testing/CMakeLists.txt create mode 100644 Accelerators/Vtkm/Core/Testing/Cxx/CMakeLists.txt create mode 100644 Accelerators/Vtkm/Core/Testing/Cxx/TestVTKMDataArray.cxx create mode 100644 Accelerators/Vtkm/Core/Testing/Cxx/TestVTKMImplicitDataArray.cxx create mode 100644 Accelerators/Vtkm/Core/Testing/Data/Baseline/TestVTKMImplicitDataArray.png.sha512 create mode 100644 Accelerators/Vtkm/Core/vtk.module create mode 100644 Accelerators/Vtkm/Core/vtkmConfigCore.h.in create mode 100644 Accelerators/Vtkm/Core/vtkmDataArray.cxx create mode 100644 Accelerators/Vtkm/Core/vtkmDataArray.h create mode 100644 Accelerators/Vtkm/Core/vtkmFilterPolicy.h create mode 100644 Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.cxx create mode 100644 Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.h create mode 100644 Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.hxx create mode 100644 Accelerators/Vtkm/Core/vtkmlib/PortalTraits.h create mode 100644 Accelerators/Vtkm/Core/vtkmlib/Portals.cxx create mode 100644 Accelerators/Vtkm/Core/vtkmlib/Portals.h rename Accelerators/Vtkm/{ => Core}/vtkmlib/Portals.hxx (100%) create mode 100644 Accelerators/Vtkm/Core/vtkmlib/vtkmDataArray.hxx create mode 100644 Accelerators/Vtkm/DataModel/CMakeLists.txt create mode 100644 Accelerators/Vtkm/DataModel/Testing/CMakeLists.txt create mode 100644 Accelerators/Vtkm/DataModel/Testing/Cxx/CMakeLists.txt create mode 100644 Accelerators/Vtkm/DataModel/Testing/Cxx/TestVTKMDataSet.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtk.module create mode 100644 Accelerators/Vtkm/DataModel/vtkmConfigDataModel.h.in create mode 100644 Accelerators/Vtkm/DataModel/vtkmDataSet.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtkmDataSet.h create mode 100644 Accelerators/Vtkm/DataModel/vtkmFilterPolicy.h create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.h create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.hxx rename Accelerators/Vtkm/{ => DataModel}/vtkmlib/ArrayConvertersReal.cxx (100%) rename Accelerators/Vtkm/{ => DataModel}/vtkmlib/ArrayConvertersSigned.cxx (100%) rename Accelerators/Vtkm/{ => DataModel}/vtkmlib/ArrayConvertersUnsigned.cxx (100%) create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/CellSetConverters.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/CellSetConverters.h create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.h create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.h create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.h create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/PolyDataConverter.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/PolyDataConverter.h create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/UnstructuredGridConverter.cxx create mode 100644 Accelerators/Vtkm/DataModel/vtkmlib/UnstructuredGridConverter.h create mode 100644 Accelerators/Vtkm/Filters/CMakeLists.txt rename Accelerators/Vtkm/{ => Filters}/Testing/CMakeLists.txt (100%) create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/CMakeLists.txt rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMCleanGrid.cxx (100%) create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMClip.cxx create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMClipWithImplicitFunction.cxx rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMCoordinateSystemTransform.cxx (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMExternalFaces.cxx (100%) create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMExtractVOI.cxx create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMGradient.cxx create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMGradientAndVorticity.cxx rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMHistogram.cxx (100%) create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMLevelOfDetail.cxx rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMMarchingCubes.cxx (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMMarchingCubes2.cxx (100%) create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMNDHistogram.cxx create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPointElevation.cxx rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMPointTransform.cxx (100%) create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPolyDataNormals.cxx create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMProbe.cxx create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMThreshold.cxx create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMThreshold2.cxx create mode 100644 Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMTriangleMeshPointNormals.cxx rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMWarpScalar.cxx (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Cxx/TestVTKMWarpVector.cxx (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMCleanGrid.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMClip.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMClipWithImplicitFunction.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMExternalFaces.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMExtractVOI.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMLevelOfDetail.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMMarchingCubes.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMMarchingCubes2.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMMarchingCubes_1.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMPointElevation.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMPointTransform.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMPolyDataNormals.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMThreshold.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMThreshold2.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMThreshold_1.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMTriangleMeshPointNormals.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMWarpScalar.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Data/Baseline/TestVTKMWarpVector.png.sha512 (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Python/CMakeLists.txt (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Python/TestVTKMAverageToCells.py (100%) rename Accelerators/Vtkm/{ => Filters}/Testing/Python/TestVTKMAverageToPoints.py (100%) create mode 100644 Accelerators/Vtkm/Filters/vtk.module create mode 100644 Accelerators/Vtkm/Filters/vtkmAverageToCells.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmAverageToCells.h create mode 100644 Accelerators/Vtkm/Filters/vtkmAverageToPoints.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmAverageToPoints.h create mode 100644 Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmCleanGrid.h create mode 100644 Accelerators/Vtkm/Filters/vtkmClip.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmClip.h create mode 100644 Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithField.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmClipInternals.h create mode 100644 Accelerators/Vtkm/Filters/vtkmConfigFilters.h.in create mode 100644 Accelerators/Vtkm/Filters/vtkmContour.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmContour.h create mode 100644 Accelerators/Vtkm/Filters/vtkmCoordinateSystemTransform.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmCoordinateSystemTransform.h create mode 100644 Accelerators/Vtkm/Filters/vtkmExternalFaces.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmExternalFaces.h create mode 100644 Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmExtractVOI.h create mode 100644 Accelerators/Vtkm/Filters/vtkmGradient.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmGradient.h create mode 100644 Accelerators/Vtkm/Filters/vtkmHistogram.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmHistogram.h create mode 100644 Accelerators/Vtkm/Filters/vtkmImageConnectivity.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmImageConnectivity.h create mode 100644 Accelerators/Vtkm/Filters/vtkmLevelOfDetail.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmLevelOfDetail.h create mode 100644 Accelerators/Vtkm/Filters/vtkmNDHistogram.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmNDHistogram.h create mode 100644 Accelerators/Vtkm/Filters/vtkmPointElevation.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmPointElevation.h create mode 100644 Accelerators/Vtkm/Filters/vtkmPointTransform.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmPointTransform.h create mode 100644 Accelerators/Vtkm/Filters/vtkmPolyDataNormals.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmPolyDataNormals.h create mode 100644 Accelerators/Vtkm/Filters/vtkmProbe.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmProbe.h create mode 100644 Accelerators/Vtkm/Filters/vtkmThreshold.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmThreshold.h create mode 100644 Accelerators/Vtkm/Filters/vtkmTriangleMeshPointNormals.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmTriangleMeshPointNormals.h create mode 100644 Accelerators/Vtkm/Filters/vtkmWarpScalar.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmWarpScalar.h create mode 100644 Accelerators/Vtkm/Filters/vtkmWarpVector.cxx create mode 100644 Accelerators/Vtkm/Filters/vtkmWarpVector.h delete mode 100644 Accelerators/Vtkm/Testing/Cxx/CMakeLists.txt delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMClip.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMClipWithImplicitFunction.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMDataArray.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMDataSet.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMExtractVOI.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMGradient.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMGradientAndVorticity.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMLevelOfDetail.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMNDHistogram.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMPointElevation.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMPolyDataNormals.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMProbe.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMThreshold.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMThreshold2.cxx delete mode 100644 Accelerators/Vtkm/Testing/Cxx/TestVTKMTriangleMeshPointNormals.cxx delete mode 100644 Accelerators/Vtkm/vtk.module delete mode 100644 Accelerators/Vtkm/vtkmAverageToCells.cxx delete mode 100644 Accelerators/Vtkm/vtkmAverageToCells.h delete mode 100644 Accelerators/Vtkm/vtkmAverageToPoints.cxx delete mode 100644 Accelerators/Vtkm/vtkmAverageToPoints.h delete mode 100644 Accelerators/Vtkm/vtkmCleanGrid.cxx delete mode 100644 Accelerators/Vtkm/vtkmCleanGrid.h delete mode 100644 Accelerators/Vtkm/vtkmClip.cxx delete mode 100644 Accelerators/Vtkm/vtkmClip.h delete mode 100644 Accelerators/Vtkm/vtkmConfig.h.in delete mode 100644 Accelerators/Vtkm/vtkmContour.cxx delete mode 100644 Accelerators/Vtkm/vtkmContour.h delete mode 100644 Accelerators/Vtkm/vtkmCoordinateSystemTransform.cxx delete mode 100644 Accelerators/Vtkm/vtkmCoordinateSystemTransform.h delete mode 100644 Accelerators/Vtkm/vtkmDataArray.cxx delete mode 100644 Accelerators/Vtkm/vtkmDataArray.h delete mode 100644 Accelerators/Vtkm/vtkmDataArray.hxx delete mode 100644 Accelerators/Vtkm/vtkmDataSet.cxx delete mode 100644 Accelerators/Vtkm/vtkmDataSet.h delete mode 100644 Accelerators/Vtkm/vtkmExternalFaces.cxx delete mode 100644 Accelerators/Vtkm/vtkmExternalFaces.h delete mode 100644 Accelerators/Vtkm/vtkmExtractVOI.cxx delete mode 100644 Accelerators/Vtkm/vtkmExtractVOI.h delete mode 100644 Accelerators/Vtkm/vtkmFilterPolicy.h delete mode 100644 Accelerators/Vtkm/vtkmGradient.cxx delete mode 100644 Accelerators/Vtkm/vtkmGradient.h delete mode 100644 Accelerators/Vtkm/vtkmHistogram.cxx delete mode 100644 Accelerators/Vtkm/vtkmHistogram.h delete mode 100644 Accelerators/Vtkm/vtkmImageConnectivity.cxx delete mode 100644 Accelerators/Vtkm/vtkmImageConnectivity.h delete mode 100644 Accelerators/Vtkm/vtkmLevelOfDetail.cxx delete mode 100644 Accelerators/Vtkm/vtkmLevelOfDetail.h delete mode 100644 Accelerators/Vtkm/vtkmNDHistogram.cxx delete mode 100644 Accelerators/Vtkm/vtkmNDHistogram.h delete mode 100644 Accelerators/Vtkm/vtkmPointElevation.cxx delete mode 100644 Accelerators/Vtkm/vtkmPointElevation.h delete mode 100644 Accelerators/Vtkm/vtkmPointTransform.cxx delete mode 100644 Accelerators/Vtkm/vtkmPointTransform.h delete mode 100644 Accelerators/Vtkm/vtkmPolyDataNormals.cxx delete mode 100644 Accelerators/Vtkm/vtkmPolyDataNormals.h delete mode 100644 Accelerators/Vtkm/vtkmProbe.cxx delete mode 100644 Accelerators/Vtkm/vtkmProbe.h delete mode 100644 Accelerators/Vtkm/vtkmThreshold.cxx delete mode 100644 Accelerators/Vtkm/vtkmThreshold.h delete mode 100644 Accelerators/Vtkm/vtkmTriangleMeshPointNormals.cxx delete mode 100644 Accelerators/Vtkm/vtkmTriangleMeshPointNormals.h delete mode 100644 Accelerators/Vtkm/vtkmWarpScalar.cxx delete mode 100644 Accelerators/Vtkm/vtkmWarpScalar.h delete mode 100644 Accelerators/Vtkm/vtkmWarpVector.cxx delete mode 100644 Accelerators/Vtkm/vtkmWarpVector.h delete mode 100644 Accelerators/Vtkm/vtkmlib/ArrayConverters.cxx delete mode 100644 Accelerators/Vtkm/vtkmlib/ArrayConverters.h delete mode 100644 Accelerators/Vtkm/vtkmlib/ArrayConverters.hxx delete mode 100644 Accelerators/Vtkm/vtkmlib/CellSetConverters.cxx delete mode 100644 Accelerators/Vtkm/vtkmlib/CellSetConverters.h delete mode 100644 Accelerators/Vtkm/vtkmlib/DataSetConverters.cxx delete mode 100644 Accelerators/Vtkm/vtkmlib/DataSetConverters.h delete mode 100644 Accelerators/Vtkm/vtkmlib/ImageDataConverter.cxx delete mode 100644 Accelerators/Vtkm/vtkmlib/ImageDataConverter.h delete mode 100644 Accelerators/Vtkm/vtkmlib/ImplicitFunctionConverter.cxx delete mode 100644 Accelerators/Vtkm/vtkmlib/ImplicitFunctionConverter.h delete mode 100644 Accelerators/Vtkm/vtkmlib/PolyDataConverter.cxx delete mode 100644 Accelerators/Vtkm/vtkmlib/PolyDataConverter.h delete mode 100644 Accelerators/Vtkm/vtkmlib/PortalTraits.h delete mode 100644 Accelerators/Vtkm/vtkmlib/Portals.cxx delete mode 100644 Accelerators/Vtkm/vtkmlib/Portals.h delete mode 100644 Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.cxx delete mode 100644 Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.h delete mode 100644 CMake/CheckCXXSourceRuns.cmake create mode 100644 CMake/FindCGNS.cmake create mode 100644 CMake/FindExprTk.cmake create mode 100644 CMake/FindMEMKIND.cmake delete mode 100644 CMake/FindOpenMP.cmake create mode 100644 CMake/FindSDL2.cmake delete mode 100644 CMake/NewCMake/CMakeParseArguments.cmake delete mode 100644 CMake/NewCMake/FindPackageHandleStandardArgs.cmake delete mode 100644 CMake/NewCMake/FindPackageMessage.cmake delete mode 100644 CMake/NewCMake/SelectLibraryConfigurations.cmake create mode 100644 CMake/VTKDetermineVersion.cmake delete mode 100644 CMake/patches/3.11/BasicConfigVersion-AnyNewerVersion.cmake.in delete mode 100644 CMake/patches/3.11/BasicConfigVersion-ExactVersion.cmake.in delete mode 100644 CMake/patches/3.11/BasicConfigVersion-SameMajorVersion.cmake.in delete mode 100644 CMake/patches/3.11/BasicConfigVersion-SameMinorVersion.cmake.in delete mode 100644 CMake/patches/3.11/CMakePackageConfigHelpers.cmake delete mode 100644 CMake/patches/3.11/WriteBasicConfigVersionFile.cmake delete mode 100644 CMake/patches/3.16/FindMPI.cmake delete mode 100644 CMake/patches/3.16/FindMPI/libver_mpi.c delete mode 100644 CMake/patches/3.16/FindMPI/test_mpi.c create mode 100644 CMake/patches/3.19/FindJPEG.cmake create mode 100644 CMake/patches/3.19/FindLibArchive.cmake create mode 100644 CMake/patches/3.19/FindSQLite3.cmake create mode 100644 CMake/patches/3.19/FindX11.cmake create mode 100644 CMake/patches/3.20/FindGDAL.cmake create mode 100644 CMake/patches/3.22/FindMPI.cmake rename CMake/patches/{3.16 => 3.22}/FindMPI/fortranparam_mpi.f90.in (100%) create mode 100644 CMake/patches/3.22/FindMPI/libver_mpi.c rename CMake/patches/{3.16 => 3.22}/FindMPI/libver_mpi.f90.in (100%) rename CMake/patches/{3.16 => 3.22}/FindMPI/mpiver.f90.in (100%) create mode 100644 CMake/patches/3.22/FindMPI/test_mpi.c rename CMake/patches/{3.16 => 3.22}/FindMPI/test_mpi.f90.in (100%) delete mode 100644 CMake/patches/99/FindGDAL.cmake delete mode 100644 CMake/patches/99/FindJPEG.cmake delete mode 100644 CMake/patches/99/FindLibArchive.cmake delete mode 100644 CMake/patches/99/FindSQLite3.cmake delete mode 100644 CMake/patches/99/FindX11.cmake delete mode 100644 CMake/vtkCompilerDynamicAnalysisFlags.cmake delete mode 100644 CMake/vtkDirectories.cmake create mode 100644 CMake/vtkQt.cmake create mode 100644 CMake/vtkSanitize.cmake create mode 100644 CMake/vtkSanitizeFlags.cmake delete mode 100644 CMake/vtkTestVideoForWindows.cmake create mode 100644 Charts/Core/Testing/Cxx/TestChartMatrix2.cxx create mode 100644 Charts/Core/Testing/Cxx/TestChartMatrix3.cxx create mode 100644 Charts/Core/Testing/Cxx/TestChartPicking.cxx create mode 100644 Charts/Core/Testing/Cxx/TestChartXYZMarginsRotations.cxx create mode 100644 Charts/Core/Testing/Cxx/TestChartXYZOuterEdgeLabelling.cxx create mode 100644 Charts/Core/Testing/Cxx/TestChartXYZUnconstrained.cxx create mode 100644 Charts/Core/Testing/Cxx/TestColorTransferControlPointsItem.cxx create mode 100644 Charts/Core/Testing/Cxx/TestCompositeControlPointsItem.cxx delete mode 100644 Charts/Core/Testing/Cxx/TestControlPointsItem.cxx create mode 100644 Charts/Core/Testing/Cxx/TestLinePlotSelectionMultiBlock.cxx create mode 100644 Charts/Core/Testing/Cxx/TestPlotBarRangeHandlesItem.cxx create mode 100644 Charts/Core/Testing/Cxx/TestPlotRangeHandlesItem.cxx create mode 100644 Charts/Core/Testing/Data/Baseline/TestChartMatrix2.png.sha512 create mode 100644 Charts/Core/Testing/Data/Baseline/TestChartMatrix3.png.sha512 create mode 100644 Charts/Core/Testing/Data/Baseline/TestChartXYZMarginsRotations.png.sha512 create mode 100644 Charts/Core/Testing/Data/Baseline/TestChartXYZOuterEdgeLabelling.png.sha512 create mode 100644 Charts/Core/Testing/Data/Baseline/TestChartXYZUnconstrained.png.sha512 create mode 100644 Charts/Core/Testing/Data/Baseline/TestLinePlotSelectionMultiBlock.png.sha512 create mode 100644 Charts/Core/vtkPlotBarRangeHandlesItem.cxx create mode 100644 Charts/Core/vtkPlotBarRangeHandlesItem.h create mode 100644 Charts/Core/vtkPlotRangeHandlesItem.cxx create mode 100644 Charts/Core/vtkPlotRangeHandlesItem.h create mode 100644 Common/Core/SMP/Common/vtkSMPThreadLocalAPI.h create mode 100644 Common/Core/SMP/Common/vtkSMPThreadLocalImplAbstract.h create mode 100644 Common/Core/SMP/Common/vtkSMPToolsAPI.cxx create mode 100644 Common/Core/SMP/Common/vtkSMPToolsAPI.h create mode 100644 Common/Core/SMP/Common/vtkSMPToolsImpl.h create mode 100644 Common/Core/SMP/Common/vtkSMPToolsInternal.h delete mode 100644 Common/Core/SMP/OpenMP/vtkAtomic.cxx delete mode 100644 Common/Core/SMP/OpenMP/vtkAtomic.h.in delete mode 100644 Common/Core/SMP/OpenMP/vtkSMPThreadLocal.h.in create mode 100644 Common/Core/SMP/OpenMP/vtkSMPThreadLocalBackend.cxx create mode 100644 Common/Core/SMP/OpenMP/vtkSMPThreadLocalBackend.h delete mode 100644 Common/Core/SMP/OpenMP/vtkSMPThreadLocalImpl.cxx create mode 100644 Common/Core/SMP/OpenMP/vtkSMPThreadLocalImpl.h delete mode 100644 Common/Core/SMP/OpenMP/vtkSMPThreadLocalImpl.h.in delete mode 100644 Common/Core/SMP/OpenMP/vtkSMPTools.cxx create mode 100644 Common/Core/SMP/OpenMP/vtkSMPToolsImpl.cxx create mode 100644 Common/Core/SMP/OpenMP/vtkSMPToolsImpl.txx delete mode 100644 Common/Core/SMP/OpenMP/vtkSMPToolsInternal.h.in create mode 100644 Common/Core/SMP/STDThread/vtkSMPThreadLocalBackend.cxx create mode 100644 Common/Core/SMP/STDThread/vtkSMPThreadLocalBackend.h create mode 100644 Common/Core/SMP/STDThread/vtkSMPThreadLocalImpl.h create mode 100644 Common/Core/SMP/STDThread/vtkSMPThreadPool.cxx create mode 100644 Common/Core/SMP/STDThread/vtkSMPThreadPool.h create mode 100644 Common/Core/SMP/STDThread/vtkSMPToolsImpl.cxx create mode 100644 Common/Core/SMP/STDThread/vtkSMPToolsImpl.txx delete mode 100644 Common/Core/SMP/Sequential/vtkAtomic.cxx delete mode 100644 Common/Core/SMP/Sequential/vtkAtomic.h.in delete mode 100644 Common/Core/SMP/Sequential/vtkSMPThreadLocal.h.in create mode 100644 Common/Core/SMP/Sequential/vtkSMPThreadLocalImpl.h delete mode 100644 Common/Core/SMP/Sequential/vtkSMPTools.cxx create mode 100644 Common/Core/SMP/Sequential/vtkSMPToolsImpl.cxx create mode 100644 Common/Core/SMP/Sequential/vtkSMPToolsImpl.txx delete mode 100644 Common/Core/SMP/Sequential/vtkSMPToolsInternal.h.in delete mode 100644 Common/Core/SMP/TBB/vtkAtomic.h.in delete mode 100644 Common/Core/SMP/TBB/vtkSMPThreadLocal.h.in create mode 100644 Common/Core/SMP/TBB/vtkSMPThreadLocalImpl.h delete mode 100644 Common/Core/SMP/TBB/vtkSMPTools.cxx create mode 100644 Common/Core/SMP/TBB/vtkSMPToolsImpl.cxx create mode 100644 Common/Core/SMP/TBB/vtkSMPToolsImpl.txx delete mode 100644 Common/Core/SMP/TBB/vtkSMPToolsInternal.h.in create mode 100644 Common/Core/Testing/Cxx/TestBitArray.cxx create mode 100644 Common/Core/Testing/Cxx/TestCLI11.cxx create mode 100644 Common/Core/Testing/Cxx/TestFMT.cxx create mode 100644 Common/Core/Testing/Cxx/TestLoggerDisableSignalHandler.cmake create mode 100644 Common/Core/Testing/Cxx/TestLoggerDisableSignalHandler.cxx create mode 100644 Common/Core/Testing/Python/TestFilePath.py create mode 100644 Common/Core/Testing/Python/TestVersion.py delete mode 100644 Common/Core/vtkAtomicTypeConcepts.h create mode 100644 Common/Core/vtkBuild.h.in create mode 100644 Common/Core/vtkCompiler.h create mode 100644 Common/Core/vtkConfigure.h delete mode 100644 Common/Core/vtkConfigure.h.in create mode 100644 Common/Core/vtkConfigureDeprecated.h.in delete mode 100644 Common/Core/vtkDataArrayTemplate.h create mode 100644 Common/Core/vtkDebug.h.in create mode 100644 Common/Core/vtkDebugRangeIterators.h.in create mode 100644 Common/Core/vtkDeprecation.h create mode 100644 Common/Core/vtkEndian.h.in create mode 100644 Common/Core/vtkFeatures.h.in create mode 100644 Common/Core/vtkGenericDataArrayValueRangeInstantiate.cxx.in create mode 100644 Common/Core/vtkLegacy.h.in create mode 100644 Common/Core/vtkMathPrivate.hxx create mode 100644 Common/Core/vtkMatrixUtilities.h create mode 100644 Common/Core/vtkOptions.h.in create mode 100644 Common/Core/vtkPlatform.h.in create mode 100644 Common/Core/vtkSMP.h.in create mode 100644 Common/Core/vtkSMPThreadLocal.h create mode 100644 Common/Core/vtkSMPTools.cxx delete mode 100644 Common/Core/vtkSOADataArrayTemplateInstantiate.cxx create mode 100644 Common/Core/vtkSOADataArrayTemplateInstantiate.cxx.in delete mode 100644 Common/Core/vtkScaledSOADataArrayTemplateInstantiate.cxx create mode 100644 Common/Core/vtkScaledSOADataArrayTemplateInstantiate.cxx.in create mode 100644 Common/Core/vtkThreads.h.in create mode 100644 Common/Core/vtkToolkits.h delete mode 100644 Common/Core/vtkToolkits.h.in create mode 100644 Common/Core/vtkVariantCast.cxx create mode 100644 Common/Core/vtkVersionFull.h.in create mode 100644 Common/DataModel/Testing/Cxx/TestCellInflation.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestDataAssembly.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestDataAssemblyUtilities.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestHyperTreeGridBitmask.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestHyperTreeGridElderChildIndex.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestIncrementalOctreePointLocator.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestMemkindData.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestPiecewiseFunction.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestSimpleIncrementalOctreePointLocator.cxx create mode 100644 Common/DataModel/Testing/Cxx/TestThreadedCopy.cxx delete mode 100644 Common/DataModel/Testing/Data/Baseline/quadraticIntersection_1.png.sha512 delete mode 100644 Common/DataModel/Testing/Data/Baseline/quadraticIntersection_2.png.sha512 create mode 100755 Common/DataModel/Testing/Python/TestComputeBounds.py create mode 100755 Common/DataModel/Testing/Python/TestStaticPointLocatorWithDataSet.py create mode 100644 Common/DataModel/vtkCompositeDataSet.txx create mode 100644 Common/DataModel/vtkDataAssembly.cxx create mode 100644 Common/DataModel/vtkDataAssembly.h create mode 100644 Common/DataModel/vtkDataAssemblyUtilities.cxx create mode 100644 Common/DataModel/vtkDataAssemblyUtilities.h create mode 100644 Common/DataModel/vtkDataAssemblyVisitor.h create mode 100644 Common/DataModel/vtkTriQuadraticPyramid.cxx create mode 100644 Common/DataModel/vtkTriQuadraticPyramid.h create mode 100644 Common/ExecutionModel/vtkPartitionedDataSetAlgorithm.cxx create mode 100644 Common/ExecutionModel/vtkPartitionedDataSetAlgorithm.h create mode 100644 Common/ExecutionModel/vtkPartitionedDataSetCollectionAlgorithm.cxx create mode 100644 Common/ExecutionModel/vtkPartitionedDataSetCollectionAlgorithm.h create mode 100644 Common/Math/Testing/Cxx/TestQuaternionInterpolator.cxx create mode 100644 Common/Math/Testing/Cxx/UnitTestFFT.cxx create mode 100644 Common/Math/vtkFFT.cxx create mode 100644 Common/Math/vtkFFT.h create mode 100644 Common/Misc/Testing/Cxx/UnitTestExprTkFunctionParser.cxx create mode 100644 Common/Misc/vtkExprTkFunctionParser.cxx create mode 100644 Common/Misc/vtkExprTkFunctionParser.h create mode 100644 Common/System/Testing/Cxx/TestExecutableRunner.cxx create mode 100644 Common/System/vtkExecutableRunner.cxx create mode 100644 Common/System/vtkExecutableRunner.h create mode 100755 Common/Transforms/Testing/Python/TestThreadedPointTransformation.py create mode 100644 Documentation/Doxygen/DataAssembly.md create mode 100644 Documentation/Doxygen/IOHDFFormat.md create mode 100644 Documentation/Doxygen/PythonWrappers.md create mode 100644 Documentation/Doxygen/vtkhdf-image-data.svg create mode 100644 Documentation/Doxygen/vtkhdf-unstructured-grid.svg create mode 100644 Documentation/dev/git/deprecation.md create mode 100644 Documentation/release/9.1.md create mode 100644 Documentation/release/imgs/9.1/AMRDetonationVelodyne.png create mode 100644 Documentation/release/imgs/9.1/Doxygen_CrossReference_Examples.png create mode 100644 Documentation/release/imgs/9.1/TestGPURayCastMapperRectilinearGrid.png create mode 100644 Documentation/release/imgs/9.1/TestGPURayCastVolumeGhostArrays.png create mode 100644 Documentation/release/imgs/9.1/TestGPURayCastVolumeUniformGridBlanking.png create mode 100644 Documentation/release/imgs/9.1/interactive_2d_after.png create mode 100644 Documentation/release/imgs/9.1/interactive_2d_before.png delete mode 100644 Domains/Chemistry/Testing/Python/CMakeLists.txt delete mode 100644 Domains/Chemistry/Testing/Python/MoleculeXYZ.py delete mode 100644 Domains/Chemistry/vtkCMLMoleculeReader.cxx delete mode 100644 Domains/Chemistry/vtkCMLMoleculeReader.h delete mode 100644 Domains/Chemistry/vtkGaussianCubeReader2.cxx delete mode 100644 Domains/Chemistry/vtkGaussianCubeReader2.h delete mode 100644 Domains/Chemistry/vtkVASPAnimationReader.h delete mode 100644 Domains/Chemistry/vtkVASPTessellationReader.cxx delete mode 100644 Domains/Chemistry/vtkVASPTessellationReader.h delete mode 100644 Domains/Chemistry/vtkXYZMolReader2.cxx delete mode 100644 Domains/Chemistry/vtkXYZMolReader2.h delete mode 100755 Examples/Annotation/Python/DispAllFonts.py delete mode 100755 Examples/Annotation/Python/TestText.py delete mode 100755 Examples/Annotation/Python/TestTextOldWay.py delete mode 100644 Examples/Annotation/Python/UNMAINTAINED.md delete mode 100755 Examples/Annotation/Python/annotatePick.py delete mode 100755 Examples/Annotation/Python/cubeAxes.py delete mode 100755 Examples/Annotation/Python/labeledMesh.py delete mode 100755 Examples/Annotation/Python/multiLineText.py delete mode 100755 Examples/Annotation/Python/textOrigin.py delete mode 100755 Examples/Annotation/Python/xyPlot.py delete mode 100644 Examples/Array/Cxx/AdjacencyMatrix.cxx delete mode 100644 Examples/Array/Cxx/ArrayBasics.cxx delete mode 100644 Examples/Array/Cxx/ArrayIteration.cxx delete mode 100644 Examples/Array/Cxx/CMakeLists.txt delete mode 100644 Examples/Array/Cxx/IdentityMatrix.cxx delete mode 100644 Examples/Array/Cxx/UNMAINTAINED.md delete mode 100644 Examples/Build/vtkLocal/CMakeLists.txt delete mode 100644 Examples/Build/vtkLocal/JavaDependencies.cmake.in delete mode 100644 Examples/Build/vtkLocal/README delete mode 100644 Examples/Build/vtkLocal/vtkLocalExample.cxx delete mode 100644 Examples/Build/vtkLocal/vtkLocalExample.h delete mode 100755 Examples/DataManipulation/Python/Arrays.py delete mode 100755 Examples/DataManipulation/Python/BuildUGrid.py delete mode 100755 Examples/DataManipulation/Python/CreateStrip.py delete mode 100755 Examples/DataManipulation/Python/FinancialField.py delete mode 100644 Examples/DataManipulation/Python/UNMAINTAINED.md delete mode 100755 Examples/DataManipulation/Python/marching.py delete mode 100755 Examples/DataManipulation/Python/pointToCellData.py create mode 100644 Examples/Emscripten/Cxx/Cone/CMakeLists.txt create mode 100644 Examples/Emscripten/Cxx/Cone/Cone.cxx create mode 100644 Examples/Emscripten/Cxx/Cone/README.md create mode 100644 Examples/Emscripten/Cxx/Cone/index.html create mode 100644 Examples/Emscripten/Cxx/ConeFullScreen/CMakeLists.txt create mode 100644 Examples/Emscripten/Cxx/ConeFullScreen/ConeFullScreen.cxx create mode 100644 Examples/Emscripten/Cxx/ConeFullScreen/README.md create mode 100644 Examples/Emscripten/Cxx/ConeFullScreen/index.html create mode 100644 Examples/Emscripten/Cxx/MultiCone/CMakeLists.txt create mode 100644 Examples/Emscripten/Cxx/MultiCone/MultiCone.cxx create mode 100644 Examples/Emscripten/Cxx/MultiCone/README.md create mode 100644 Examples/Emscripten/Cxx/MultiCone/index.html create mode 100644 Examples/Emscripten/Cxx/README.md create mode 100644 Examples/Emscripten/Cxx/WrappedMace/CMakeLists.txt create mode 100644 Examples/Emscripten/Cxx/WrappedMace/README.md create mode 100644 Examples/Emscripten/Cxx/WrappedMace/WrappedMace.cxx create mode 100644 Examples/Emscripten/Cxx/WrappedMace/index.html delete mode 100755 Examples/GUI/Python/BoxWidget.py delete mode 100755 Examples/GUI/Python/CustomInteraction.py delete mode 100755 Examples/GUI/Python/ImagePlaneWidget.py delete mode 100755 Examples/GUI/Python/ImageTracerWidget.py delete mode 100755 Examples/GUI/Python/ImplicitPlaneWidget.py delete mode 100644 Examples/GUI/Python/OrthogonalPlanesWithTkPhoto.py delete mode 100755 Examples/GUI/Python/ProbeWithPointWidget.py delete mode 100755 Examples/GUI/Python/ProbingWithPlaneWidget.py delete mode 100755 Examples/GUI/Python/SphereWidget.py delete mode 100755 Examples/GUI/Python/StreamlinesWithLineWidget.py delete mode 100755 Examples/GUI/Python/TransformWithBoxWidget.py delete mode 100644 Examples/GUI/Python/UNMAINTAINED.md delete mode 100755 Examples/GUI/Python/VolumeRenderWithBoxWidget.py delete mode 100644 Examples/Graphics/Python/SegmentAndBrokenLineSources.py delete mode 100644 Examples/Graphics/Python/SingleYoungsMaterialInterface.py delete mode 100644 Examples/Graphics/Python/UNMAINTAINED.md delete mode 100644 Examples/IO/Python/UNMAINTAINED.md delete mode 100755 Examples/IO/Python/flamingo.py delete mode 100755 Examples/IO/Python/stl.py delete mode 100755 Examples/ImageProcessing/Python/Contours2D.py delete mode 100755 Examples/ImageProcessing/Python/ImageInteractor.py delete mode 100755 Examples/ImageProcessing/Python/ImageInteractorReslice.py delete mode 100755 Examples/ImageProcessing/Python/ImageSlicing.py delete mode 100644 Examples/ImageProcessing/Python/UNMAINTAINED.md delete mode 100644 Examples/Infovis/Java/Focus.java delete mode 100644 Examples/Infovis/Java/HelloWorld.java delete mode 100644 Examples/Infovis/Java/TreeViews.java delete mode 100644 Examples/Infovis/Java/UNMAINTAINED.md delete mode 100644 Examples/Infovis/Python/Rcalculator_mst.py delete mode 100644 Examples/Infovis/Python/Rcalculator_vd.py delete mode 100644 Examples/Infovis/Python/Rinterface.py delete mode 100644 Examples/Infovis/Python/Rrand_table.py delete mode 100644 Examples/Infovis/Python/UNMAINTAINED.md delete mode 100644 Examples/Infovis/Python/adjacency_matrix_to_graph.py delete mode 100644 Examples/Infovis/Python/aggregate.py delete mode 100644 Examples/Infovis/Python/authors.csv delete mode 100644 Examples/Infovis/Python/boost_bfs.py delete mode 100644 Examples/Infovis/Python/boost_centrality.py delete mode 100644 Examples/Infovis/Python/boost_mst.py delete mode 100644 Examples/Infovis/Python/boost_mst_extract_graph.py delete mode 100644 Examples/Infovis/Python/boost_mst_with_hgv.py delete mode 100644 Examples/Infovis/Python/circular_vertices.py delete mode 100644 Examples/Infovis/Python/columns.csv delete mode 100644 Examples/Infovis/Python/cone_layout.py delete mode 100644 Examples/Infovis/Python/contingency_port_protocol.py delete mode 100644 Examples/Infovis/Python/create_tree.py delete mode 100755 Examples/Infovis/Python/csv_to_graph.py delete mode 100644 Examples/Infovis/Python/database_query1.py delete mode 100644 Examples/Infovis/Python/databases.py delete mode 100644 Examples/Infovis/Python/databases2.py delete mode 100644 Examples/Infovis/Python/delimited_text_reader1.py delete mode 100644 Examples/Infovis/Python/delimited_text_reader2.py delete mode 100755 Examples/Infovis/Python/dimacs.py delete mode 100644 Examples/Infovis/Python/displayVTKHierarchy.py delete mode 100644 Examples/Infovis/Python/edges.csv delete mode 100644 Examples/Infovis/Python/filters.py delete mode 100644 Examples/Infovis/Python/geoview.py delete mode 100644 Examples/Infovis/Python/graph1.py delete mode 100644 Examples/Infovis/Python/graph3d.py delete mode 100644 Examples/Infovis/Python/graph_selection_subtract.py delete mode 100644 Examples/Infovis/Python/graph_tree_ring.py delete mode 100644 Examples/Infovis/Python/gui.py delete mode 100644 Examples/Infovis/Python/hello_world.py delete mode 100644 Examples/Infovis/Python/hierarchical_graph.py delete mode 100644 Examples/Infovis/Python/icicle_view.py delete mode 100644 Examples/Infovis/Python/icicle_view_simple.py delete mode 100755 Examples/Infovis/Python/kcore.py delete mode 100644 Examples/Infovis/Python/labels.py delete mode 100644 Examples/Infovis/Python/merge_graphs.py delete mode 100644 Examples/Infovis/Python/mysql_database.py delete mode 100644 Examples/Infovis/Python/nodes.csv delete mode 100644 Examples/Infovis/Python/programmable_pipeline.py delete mode 100644 Examples/Infovis/Python/programmable_pipeline2.py delete mode 100644 Examples/Infovis/Python/psql_database.py delete mode 100644 Examples/Infovis/Python/random3d.py delete mode 100644 Examples/Infovis/Python/selection.py delete mode 100644 Examples/Infovis/Python/selection_domain.py delete mode 100644 Examples/Infovis/Python/simple_selection.py delete mode 100644 Examples/Infovis/Python/statistics_temperatures.py delete mode 100644 Examples/Infovis/Python/streaming_statistics.py delete mode 100644 Examples/Infovis/Python/streaming_statistics_pyqt.py delete mode 100644 Examples/Infovis/Python/table_data.csv delete mode 100644 Examples/Infovis/Python/tables1.py delete mode 100644 Examples/Infovis/Python/tables2.py delete mode 100644 Examples/Infovis/Python/tables3.py delete mode 100644 Examples/Infovis/Python/tables4.py delete mode 100644 Examples/Infovis/Python/tables_adv.py delete mode 100644 Examples/Infovis/Python/temperatures.csv delete mode 100644 Examples/Infovis/Python/theme.py delete mode 100644 Examples/Infovis/Python/tree1.py delete mode 100644 Examples/Infovis/Python/tree_map.py delete mode 100644 Examples/Infovis/Python/treemap_view.py delete mode 100644 Examples/Infovis/Python/treering_hierarchical_view.py delete mode 100644 Examples/Infovis/Python/treering_view.py delete mode 100644 Examples/Infovis/Python/treering_view_simple.py delete mode 100644 Examples/Infovis/Python/treetest.xml delete mode 100644 Examples/Infovis/Python/vertex_degree_programmable.py delete mode 100644 Examples/Infovis/Python/views.py delete mode 100644 Examples/Infovis/Python/vtkclasses.xml delete mode 100644 Examples/Infovis/Python/vtklibrary.xml delete mode 100644 Examples/LIC/Python/CylinderAndPolarAxes.py delete mode 100644 Examples/LIC/Python/UNMAINTAINED.md delete mode 100755 Examples/Medical/Python/Medical1.py delete mode 100755 Examples/Medical/Python/Medical2.py delete mode 100755 Examples/Medical/Python/Medical3.py delete mode 100755 Examples/Medical/Python/Medical4.py delete mode 100644 Examples/Medical/Python/UNMAINTAINED.md delete mode 100755 Examples/Modelling/Python/DelMesh.py delete mode 100755 Examples/Modelling/Python/Delaunay3D.py delete mode 100755 Examples/Modelling/Python/PerlinTerrain.py delete mode 100755 Examples/Modelling/Python/SpherePuzzle.py delete mode 100755 Examples/Modelling/Python/constrainedDelaunay.py delete mode 100755 Examples/Modelling/Python/expCos.py delete mode 100755 Examples/Modelling/Python/faultLines.py delete mode 100755 Examples/Modelling/Python/hello.py delete mode 100755 Examples/Modelling/Python/iceCream.py delete mode 100755 Examples/Modelling/Python/procrustesAlignment.py delete mode 100755 Examples/Modelling/Python/reconstructSurface.py delete mode 100644 Examples/ParallelProcessing/MPI/Python/ParallelCone.py delete mode 100644 Examples/ParallelProcessing/MPI/Python/UNMAINTAINED.md delete mode 100644 Examples/Rendering/Cxx/AmbientSpheres.cxx delete mode 100644 Examples/Rendering/Cxx/CMakeLists.txt delete mode 100644 Examples/Rendering/Cxx/Cylinder.cxx delete mode 100644 Examples/Rendering/Cxx/DiffuseSpheres.cxx delete mode 100644 Examples/Rendering/Cxx/SpecularSpheres.cxx delete mode 100755 Examples/Rendering/Python/CADPart.py delete mode 100755 Examples/Rendering/Python/CSpline.py delete mode 100755 Examples/Rendering/Python/Cylinder.py delete mode 100755 Examples/Rendering/Python/FilterCADPart.py delete mode 100755 Examples/Rendering/Python/RenderLargeImage.py delete mode 100755 Examples/Rendering/Python/TPlane.py delete mode 100644 Examples/Rendering/Python/UNMAINTAINED.md delete mode 100755 Examples/Rendering/Python/assembly.py delete mode 100755 Examples/Rendering/Python/rainbow.py create mode 100644 Examples/RunExample.cmake delete mode 100644 Examples/Statistics/CMakeLists.txt delete mode 100644 Examples/Statistics/ExampleDescriptiveStatistics.cxx delete mode 100644 Examples/Statistics/ExampleKMeansStatistics.cxx delete mode 100644 Examples/Statistics/UNMAINTAINED.md delete mode 100644 Examples/Tutorial/README.txt delete mode 100644 Examples/Tutorial/Step1/Cxx/CMakeLists.txt delete mode 100644 Examples/Tutorial/Step1/Cxx/Cone.cxx delete mode 100644 Examples/Tutorial/Step1/Java/Cone.java delete mode 100644 Examples/Tutorial/Step1/Java/UNMAINTAINED.md delete mode 100755 Examples/Tutorial/Step1/Python/Cone.py delete mode 100644 Examples/Tutorial/Step1/Python/UNMAINTAINED.md delete mode 100644 Examples/Tutorial/Step2/Cxx/CMakeLists.txt delete mode 100644 Examples/Tutorial/Step2/Cxx/Cone2.cxx delete mode 100644 Examples/Tutorial/Step2/Java/Cone2.java delete mode 100644 Examples/Tutorial/Step2/Java/UNMAINTAINED.md delete mode 100755 Examples/Tutorial/Step2/Python/Cone2.py delete mode 100644 Examples/Tutorial/Step2/Python/UNMAINTAINED.md delete mode 100644 Examples/Tutorial/Step3/Cxx/CMakeLists.txt delete mode 100644 Examples/Tutorial/Step3/Cxx/Cone3.cxx delete mode 100644 Examples/Tutorial/Step3/Java/Cone3.java delete mode 100644 Examples/Tutorial/Step3/Java/UNMAINTAINED.md delete mode 100755 Examples/Tutorial/Step3/Python/Cone3.py delete mode 100644 Examples/Tutorial/Step3/Python/UNMAINTAINED.md delete mode 100644 Examples/Tutorial/Step4/Cxx/CMakeLists.txt delete mode 100644 Examples/Tutorial/Step4/Cxx/Cone4.cxx delete mode 100644 Examples/Tutorial/Step4/Java/Cone4.java delete mode 100644 Examples/Tutorial/Step4/Java/UNMAINTAINED.md delete mode 100755 Examples/Tutorial/Step4/Python/Cone4.py delete mode 100644 Examples/Tutorial/Step4/Python/UNMAINTAINED.md delete mode 100644 Examples/Tutorial/Step5/Cxx/CMakeLists.txt delete mode 100644 Examples/Tutorial/Step5/Cxx/Cone5.cxx delete mode 100644 Examples/Tutorial/Step5/Java/Cone5.java delete mode 100644 Examples/Tutorial/Step5/Java/UNMAINTAINED.md delete mode 100755 Examples/Tutorial/Step5/Python/Cone5.py delete mode 100644 Examples/Tutorial/Step5/Python/UNMAINTAINED.md delete mode 100644 Examples/Tutorial/Step6/Cxx/CMakeLists.txt delete mode 100644 Examples/Tutorial/Step6/Cxx/Cone6.cxx delete mode 100755 Examples/Tutorial/Step6/Python/Cone6.py delete mode 100644 Examples/Tutorial/Step6/Python/UNMAINTAINED.md delete mode 100644 Examples/VisualizationAlgorithms/Cxx/BandedContours.cxx delete mode 100644 Examples/VisualizationAlgorithms/Cxx/Baseline/TestBandedContours.png.sha512 delete mode 100644 Examples/VisualizationAlgorithms/Cxx/Baseline/TestFilledContours.png.sha512 delete mode 100644 Examples/VisualizationAlgorithms/Cxx/Baseline/TestFilledContours_1.png.sha512 delete mode 100644 Examples/VisualizationAlgorithms/Cxx/Baseline/TestTubesWithVaryingRadiusAndColors.png.sha512 delete mode 100644 Examples/VisualizationAlgorithms/Cxx/CMakeLists.txt delete mode 100644 Examples/VisualizationAlgorithms/Cxx/FilledContours.cxx delete mode 100644 Examples/VisualizationAlgorithms/Cxx/TestBandedContours.cxx delete mode 100644 Examples/VisualizationAlgorithms/Cxx/TestFilledContours.cxx delete mode 100644 Examples/VisualizationAlgorithms/Cxx/TestTubesWithVaryingRadiusAndColors.cxx delete mode 100644 Examples/VisualizationAlgorithms/Cxx/TubesWithVaryingRadiusAndColors.cxx delete mode 100755 Examples/VisualizationAlgorithms/Python/BandContourTerrain.py delete mode 100755 Examples/VisualizationAlgorithms/Python/ClipCow.py delete mode 100755 Examples/VisualizationAlgorithms/Python/ColorIsosurface.py delete mode 100755 Examples/VisualizationAlgorithms/Python/CutCombustor.py delete mode 100755 Examples/VisualizationAlgorithms/Python/DepthSort.py delete mode 100755 Examples/VisualizationAlgorithms/Python/ExtractGeometry.py delete mode 100755 Examples/VisualizationAlgorithms/Python/ExtractUGrid.py delete mode 100755 Examples/VisualizationAlgorithms/Python/GenerateTextureCoords.py delete mode 100755 Examples/VisualizationAlgorithms/Python/SubsampleGrid.py delete mode 100755 Examples/VisualizationAlgorithms/Python/TextureThreshold.py delete mode 100644 Examples/VisualizationAlgorithms/Python/UNMAINTAINED.md delete mode 100755 Examples/VisualizationAlgorithms/Python/VisQuad.py delete mode 100755 Examples/VisualizationAlgorithms/Python/deciFran.py delete mode 100755 Examples/VisualizationAlgorithms/Python/imageWarp.py delete mode 100755 Examples/VisualizationAlgorithms/Python/officeTube.py delete mode 100755 Examples/VisualizationAlgorithms/Python/officeTubes.py delete mode 100755 Examples/VisualizationAlgorithms/Python/probeComb.py delete mode 100755 Examples/VisualizationAlgorithms/Python/smoothFran.py delete mode 100755 Examples/VisualizationAlgorithms/Python/spikeF.py delete mode 100755 Examples/VisualizationAlgorithms/Python/streamSurface.py delete mode 100755 Examples/VisualizationAlgorithms/Python/warpComb.py delete mode 100644 Examples/VolumeRendering/Cxx/CMakeLists.txt delete mode 100644 Examples/VolumeRendering/Cxx/FixedPointVolumeRayCastMapperCT.cxx delete mode 100644 Examples/VolumeRendering/Cxx/GPURenderDemo.cxx delete mode 100755 Examples/VolumeRendering/Python/PseudoVolumeRendering.py delete mode 100755 Examples/VolumeRendering/Python/SimpleRayCast.py delete mode 100644 Examples/VolumeRendering/Python/UNMAINTAINED.md delete mode 100755 Examples/VolumeRendering/Python/VolumePicker.py delete mode 100644 Examples/Widgets/Cxx/BalloonWidget.cxx delete mode 100644 Examples/Widgets/Cxx/Baseline/TestBalloonWidget.png.sha512 delete mode 100644 Examples/Widgets/Cxx/Baseline/TestSlider.png.sha512 delete mode 100644 Examples/Widgets/Cxx/Baseline/TestSlider2D.png.sha512 delete mode 100644 Examples/Widgets/Cxx/Baseline/TestSlider2D_1.png.sha512 delete mode 100644 Examples/Widgets/Cxx/Baseline/TestSlider2D_2.png.sha512 delete mode 100644 Examples/Widgets/Cxx/CMakeLists.txt delete mode 100644 Examples/Widgets/Cxx/Slider.cxx delete mode 100644 Examples/Widgets/Cxx/Slider2D.cxx delete mode 100644 Examples/Widgets/Cxx/SplineWidget.cxx delete mode 100644 Examples/Widgets/Cxx/TestBalloonWidget.cxx delete mode 100644 Examples/Widgets/Cxx/TestSlider.cxx delete mode 100644 Examples/Widgets/Cxx/TestSlider2D.cxx create mode 100644 Filters/AMR/Testing/Cxx/TestAMRGhostZones.cxx create mode 100644 Filters/Core/Testing/Cxx/Test3DLinearGridPlaneCutterCellData.cxx create mode 100644 Filters/Core/Testing/Cxx/TestDataObjectToPartitionedDataSetCollection.cxx create mode 100644 Filters/Core/Testing/Cxx/TestGlyph3DFollowCamera.cxx create mode 100644 Filters/Core/Testing/Cxx/TestMaskPointsModes.cxx create mode 100644 Filters/Core/Testing/Cxx/TestPartitionedDataSetCollectionConvertors.cxx create mode 100644 Filters/Core/Testing/Cxx/TestSlicePlanePrecision.cxx create mode 100644 Filters/Core/Testing/Cxx/TestTubeBender.cxx create mode 100644 Filters/Core/Testing/Cxx/TestUnstructuredGridToExplicitStructuredGridEmpty.cxx create mode 100644 Filters/Core/Testing/Cxx/TestVaryRadiusTubeFilter.cxx create mode 100644 Filters/Core/Testing/Data/Baseline/CellDataToPointData2.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/Test3DLinearGridPlaneCutterCellData.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestBinnedDecimation.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestCompositeDataSetPlaneCutter.png.sha512 delete mode 100644 Filters/Core/Testing/Data/Baseline/TestExplicitStructuredGridCrop.png.md5 create mode 100644 Filters/Core/Testing/Data/Baseline/TestExplicitStructuredGridCrop.png.sha512 delete mode 100644 Filters/Core/Testing/Data/Baseline/TestExplicitStructuredGridToUnstructuredGrid.png.md5 create mode 100644 Filters/Core/Testing/Data/Baseline/TestExplicitStructuredGridToUnstructuredGrid.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestFlyingEdges2DThinPixel.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestFlyingEdges3DThinSlice.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestFlyingEdgesPlaneCutterThinSlice.png.sha512 delete mode 100644 Filters/Core/Testing/Data/Baseline/TestImageDataToExplicitStructuredGrid.png.md5 create mode 100644 Filters/Core/Testing/Data/Baseline/TestImageDataToExplicitStructuredGrid.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestMaskPointsModes.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestOrientedFlyingEdgesPlaneCutter.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestOrientedFlyingEdgesPlaneCutter2.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestPointDataToCellData2.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestPolyDataEdgeConnectivityFilter.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestPolyDataEdgeConnectivityFilter2.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestPolyDataEdgeConnectivityFilter3.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestPolyDataEdgeConnectivityFilter4.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestPolyDataPlaneClipper.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestPolyDataPlaneClipper2.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestTubeBender.png.sha512 delete mode 100644 Filters/Core/Testing/Data/Baseline/TestUnstructuredGridToExplicitStructuredGrid.png.md5 create mode 100644 Filters/Core/Testing/Data/Baseline/TestUnstructuredGridToExplicitStructuredGrid.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestUnstructuredGridToExplicitStructuredGridEmpty.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestVaryRadiusTubeFilter.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestWindowedSincPolyDataFilter.png.sha512 create mode 100644 Filters/Core/Testing/Data/Baseline/TestWindowedSincPolyDataFilter2.png.sha512 delete mode 100644 Filters/Core/Testing/Data/Baseline/cutPolygons_1.png.sha512 create mode 100755 Filters/Core/Testing/Python/CellDataToPointData2.py create mode 100755 Filters/Core/Testing/Python/TestBinnedDecimation.py create mode 100644 Filters/Core/Testing/Python/TestCompositeDataSetPlaneCutter.py create mode 100755 Filters/Core/Testing/Python/TestContourFilter.py create mode 100755 Filters/Core/Testing/Python/TestFlyingEdges2DThinPixel.py create mode 100755 Filters/Core/Testing/Python/TestFlyingEdges3DThinSlice.py create mode 100755 Filters/Core/Testing/Python/TestFlyingEdgesPlaneCutterThinSlice.py create mode 100755 Filters/Core/Testing/Python/TestOrientedFlyingEdgesPlaneCutter.py create mode 100755 Filters/Core/Testing/Python/TestOrientedFlyingEdgesPlaneCutter2.py create mode 100755 Filters/Core/Testing/Python/TestPointDataToCellData2.py create mode 100755 Filters/Core/Testing/Python/TestPolyDataEdgeConnectivityFilter.py create mode 100755 Filters/Core/Testing/Python/TestPolyDataEdgeConnectivityFilter2.py create mode 100755 Filters/Core/Testing/Python/TestPolyDataEdgeConnectivityFilter3.py create mode 100755 Filters/Core/Testing/Python/TestPolyDataEdgeConnectivityFilter4.py create mode 100755 Filters/Core/Testing/Python/TestPolyDataPlaneClipper.py create mode 100755 Filters/Core/Testing/Python/TestPolyDataPlaneClipper2.py create mode 100755 Filters/Core/Testing/Python/TestWindowedSincPolyDataFilter.py create mode 100755 Filters/Core/Testing/Python/TestWindowedSincPolyDataFilter2.py create mode 100644 Filters/Core/vtkBinnedDecimation.cxx create mode 100644 Filters/Core/vtkBinnedDecimation.h create mode 100644 Filters/Core/vtkConvertToMultiBlockDataSet.cxx create mode 100644 Filters/Core/vtkConvertToMultiBlockDataSet.h create mode 100644 Filters/Core/vtkConvertToPartitionedDataSetCollection.cxx create mode 100644 Filters/Core/vtkConvertToPartitionedDataSetCollection.h create mode 100644 Filters/Core/vtkPassThrough.cxx create mode 100644 Filters/Core/vtkPassThrough.h create mode 100644 Filters/Core/vtkPolyDataEdgeConnectivityFilter.cxx create mode 100644 Filters/Core/vtkPolyDataEdgeConnectivityFilter.h create mode 100644 Filters/Core/vtkPolyDataPlaneClipper.cxx create mode 100644 Filters/Core/vtkPolyDataPlaneClipper.h create mode 100644 Filters/Core/vtkRemoveUnusedPoints.cxx create mode 100644 Filters/Core/vtkRemoveUnusedPoints.h create mode 100644 Filters/Core/vtkTubeBender.cxx create mode 100644 Filters/Core/vtkTubeBender.h create mode 100644 Filters/Extraction/Testing/Cxx/TestExtractBlockUsingDataAssembly.cxx create mode 100644 Filters/Extraction/Testing/Cxx/TestExtractCells.cxx create mode 100644 Filters/Extraction/Testing/Cxx/TestExtractExodusGlobalTemporalVariables.cxx create mode 100644 Filters/Extraction/Testing/Cxx/TestExtractGridPieces.cxx create mode 100644 Filters/Extraction/Testing/Cxx/TestExtractSelectionUsingDataAssembly.cxx create mode 100644 Filters/Extraction/vtkExtractBlockUsingDataAssembly.cxx create mode 100644 Filters/Extraction/vtkExtractBlockUsingDataAssembly.h create mode 100644 Filters/FlowPaths/Testing/Cxx/TestParallelVectors.cxx create mode 100644 Filters/FlowPaths/Testing/Cxx/TestStreamSurface.cxx create mode 100644 Filters/FlowPaths/Testing/Cxx/TestVectorFieldTopology.cxx create mode 100644 Filters/FlowPaths/Testing/Cxx/TestVortexCore.cxx create mode 100644 Filters/FlowPaths/Testing/Data/Baseline/TestParallelVectors.png.sha512 create mode 100644 Filters/FlowPaths/Testing/Data/Baseline/TestStreamSurface.png.sha512 create mode 100644 Filters/FlowPaths/Testing/Data/Baseline/TestVectorFieldTopology.png.sha512 create mode 100644 Filters/FlowPaths/vtkParallelVectors.cxx create mode 100644 Filters/FlowPaths/vtkParallelVectors.h create mode 100644 Filters/FlowPaths/vtkStreamSurface.cxx create mode 100644 Filters/FlowPaths/vtkStreamSurface.h create mode 100644 Filters/FlowPaths/vtkVectorFieldTopology.cxx create mode 100644 Filters/FlowPaths/vtkVectorFieldTopology.h create mode 100644 Filters/FlowPaths/vtkVortexCore.cxx create mode 100644 Filters/FlowPaths/vtkVortexCore.h create mode 100644 Filters/General/Testing/Cxx/TestAnimateModes.cxx create mode 100644 Filters/General/Testing/Cxx/TestDeflectNormals.cxx create mode 100644 Filters/General/Testing/Cxx/TestExtractGhostCells.cxx create mode 100644 Filters/General/Testing/Cxx/TestGroupDataSetsFilter.cxx create mode 100644 Filters/General/Testing/Cxx/TestMergeCells.cxx create mode 100644 Filters/General/Testing/Cxx/TestMergeTimeFilter.cxx create mode 100644 Filters/General/Testing/Cxx/TestMergeVectorComponents.cxx create mode 100644 Filters/General/Testing/Cxx/TestTableFFT.cxx create mode 100644 Filters/General/Testing/Cxx/TestTemporalPathLineFilter.cxx create mode 100644 Filters/General/Testing/Data/Baseline/TestAnimateModes.png.sha512 create mode 100644 Filters/General/Testing/Data/Baseline/TestDeflectNormals.png.sha512 create mode 100644 Filters/General/Testing/Data/Baseline/TestGroupTimeStepsFilter.png.sha512 create mode 100644 Filters/General/Testing/Data/Baseline/TestRemovePolyData.png.sha512 create mode 100644 Filters/General/Testing/Data/Baseline/TestRemovePolyData2.png.sha512 create mode 100644 Filters/General/Testing/Data/Baseline/TestRemovePolyData3.png.sha512 create mode 100644 Filters/General/Testing/Data/Baseline/TestSparseCellLocator.png.sha512 create mode 100644 Filters/General/Testing/Python/TestGroupTimeStepsFilter.py create mode 100755 Filters/General/Testing/Python/TestRemovePolyData.py create mode 100755 Filters/General/Testing/Python/TestRemovePolyData2.py create mode 100755 Filters/General/Testing/Python/TestRemovePolyData3.py create mode 100755 Filters/General/Testing/Python/TestSparseCellLocator.py create mode 100755 Filters/General/Testing/Python/TestWarpScalar.py create mode 100755 Filters/General/Testing/Python/TestWarpVector.py create mode 100644 Filters/General/vtkAnimateModes.cxx create mode 100644 Filters/General/vtkAnimateModes.h create mode 100644 Filters/General/vtkDeflectNormals.cxx create mode 100644 Filters/General/vtkDeflectNormals.h create mode 100644 Filters/General/vtkEqualizerFilter.cxx create mode 100644 Filters/General/vtkEqualizerFilter.h create mode 100644 Filters/General/vtkExtractGhostCells.cxx create mode 100644 Filters/General/vtkExtractGhostCells.h create mode 100644 Filters/General/vtkGroupDataSetsFilter.cxx create mode 100644 Filters/General/vtkGroupDataSetsFilter.h create mode 100644 Filters/General/vtkGroupTimeStepsFilter.cxx create mode 100644 Filters/General/vtkGroupTimeStepsFilter.h create mode 100644 Filters/General/vtkMergeTimeFilter.cxx create mode 100644 Filters/General/vtkMergeTimeFilter.h create mode 100644 Filters/General/vtkMergeVectorComponents.cxx create mode 100644 Filters/General/vtkMergeVectorComponents.h delete mode 100644 Filters/General/vtkPassThrough.cxx delete mode 100644 Filters/General/vtkPassThrough.h create mode 100644 Filters/General/vtkRemovePolyData.cxx create mode 100644 Filters/General/vtkRemovePolyData.h create mode 100644 Filters/General/vtkSphericalHarmonics.cxx create mode 100644 Filters/General/vtkSphericalHarmonics.h create mode 100644 Filters/General/vtkTableFFT.cxx create mode 100644 Filters/General/vtkTableFFT.h create mode 100644 Filters/Geometry/Testing/Cxx/TestDataSetSurfaceFilterWithBlankedImageData.cxx create mode 100644 Filters/Geometry/Testing/Cxx/TestRegularGridDataSetSurfaceFilter.cxx delete mode 100644 Filters/Geometry/Testing/Cxx/TestStructuredGridGhostDataGenerator.cxx delete mode 100644 Filters/Geometry/Testing/Cxx/TestUniformGridGhostDataGenerator.cxx create mode 100644 Filters/Geometry/Testing/Data/Baseline/TestDataSetSurfaceFilterWithBlankedImageData.png.sha512 delete mode 100644 Filters/Geometry/Testing/Data/Baseline/TestExplicitStructuredGridSurfaceFilter.png.md5 create mode 100644 Filters/Geometry/Testing/Data/Baseline/TestExplicitStructuredGridSurfaceFilter.png.sha512 create mode 100644 Filters/Geometry/Testing/Data/Baseline/TestGeometryFilter.png.sha512 create mode 100644 Filters/Geometry/Testing/Data/Baseline/TestGeometryFilter2.png.sha512 create mode 100644 Filters/Geometry/Testing/Data/Baseline/TestMarkBoundaryFilter.png.sha512 create mode 100644 Filters/Geometry/Testing/Data/Baseline/TestMarkBoundaryFilter2.png.sha512 create mode 100644 Filters/Geometry/Testing/Data/Baseline/TestRegularGridDataSetSurfaceFilter.png.sha512 create mode 100755 Filters/Geometry/Testing/Python/TestGeometryFilter.py create mode 100755 Filters/Geometry/Testing/Python/TestGeometryFilter2.py create mode 100755 Filters/Geometry/Testing/Python/TestMarkBoundaryFilter.py create mode 100755 Filters/Geometry/Testing/Python/TestMarkBoundaryFilter2.py create mode 100644 Filters/Geometry/vtkMarkBoundaryFilter.cxx create mode 100644 Filters/Geometry/vtkMarkBoundaryFilter.h create mode 100644 Filters/Hybrid/Testing/Cxx/TestTemporalCacheMemkind.cxx create mode 100644 Filters/Hybrid/Testing/Cxx/TestTemporalInterpolator.cxx create mode 100644 Filters/Hybrid/Testing/Data/Baseline/TestTemporalInterpolator.png.sha512 create mode 100644 Filters/Modeling/Testing/Cxx/TestRotationalExtrusion2.cxx create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter2.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter3.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter3_1.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter4.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter4_1.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter5.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter6.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestImprintFilter6_1.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestPointSampler2.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/TestRotationalExtrusion2.png.sha512 create mode 100644 Filters/Modeling/Testing/Data/Baseline/smoothCyl2_1.png.sha512 create mode 100755 Filters/Modeling/Testing/Python/TestImprintFilter.py create mode 100755 Filters/Modeling/Testing/Python/TestImprintFilter2.py create mode 100755 Filters/Modeling/Testing/Python/TestImprintFilter3.py create mode 100755 Filters/Modeling/Testing/Python/TestImprintFilter4.py create mode 100755 Filters/Modeling/Testing/Python/TestImprintFilter5.py create mode 100755 Filters/Modeling/Testing/Python/TestImprintFilter6.py create mode 100755 Filters/Modeling/Testing/Python/TestPointSampler2.py create mode 100644 Filters/Modeling/vtkImageDataOutlineFilter.cxx create mode 100644 Filters/Modeling/vtkImageDataOutlineFilter.h create mode 100644 Filters/Modeling/vtkImprintFilter.cxx create mode 100644 Filters/Modeling/vtkImprintFilter.h create mode 100644 Filters/Parallel/Testing/Cxx/TestPOutlineFilter.cxx create mode 100644 Filters/Parallel/Testing/Cxx/TestPartitionBalancer.cxx create mode 100644 Filters/Parallel/vtkPConvertToMultiBlockDataSet.cxx create mode 100644 Filters/Parallel/vtkPConvertToMultiBlockDataSet.h create mode 100644 Filters/Parallel/vtkPartitionBalancer.cxx create mode 100644 Filters/Parallel/vtkPartitionBalancer.h create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestGenerateGlobalIdsSphere.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestGhostCellsGenerator.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestOverlappingCellsDetector.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestPStructuredGridGhostDataGenerator.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestPUniformGridGhostDataGenerator.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestPUnstructuredGridGhostCellsGenerator.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestProbeLineFilter.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestRedistributeDataSetFilterOnIOSS.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestRedistributeDataSetFilterWithPolyData.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestStructuredGridGhostDataGenerator.cxx create mode 100644 Filters/ParallelDIY2/Testing/Cxx/TestUniformGridGhostDataGenerator.cxx rename Filters/{Geometry => ParallelDIY2}/Testing/Cxx/TestUnstructuredGridGeometryFilterGhostCells.cxx (100%) create mode 100644 Filters/ParallelDIY2/Testing/Data/Baseline/TestRedistributeDataSetFilterWithPolyData.png.sha512 create mode 100644 Filters/ParallelDIY2/vtkGhostCellsGenerator.cxx create mode 100644 Filters/ParallelDIY2/vtkGhostCellsGenerator.h create mode 100644 Filters/ParallelDIY2/vtkOverlappingCellsDetector.cxx create mode 100644 Filters/ParallelDIY2/vtkOverlappingCellsDetector.h create mode 100644 Filters/ParallelDIY2/vtkProbeLineFilter.cxx create mode 100644 Filters/ParallelDIY2/vtkProbeLineFilter.h delete mode 100644 Filters/ParallelGeometry/Testing/Cxx/TestPStructuredGridGhostDataGenerator.cxx delete mode 100644 Filters/ParallelGeometry/Testing/Cxx/TestPUniformGridGhostDataGenerator.cxx delete mode 100644 Filters/ParallelGeometry/Testing/Cxx/TestPUnstructuredGridGhostCellsGenerator.cxx create mode 100644 Filters/Points/Testing/Cxx/TestConvertToPointCloud.cxx create mode 100644 Filters/Points/Testing/Cxx/TestPoissonDiskSampler.cxx create mode 100644 Filters/Points/Testing/Data/Baseline/TestConvertToPointCloud.png.sha512 create mode 100644 Filters/Points/Testing/Data/Baseline/TestPointSmoothingFilter.png.sha512 create mode 100644 Filters/Points/Testing/Data/Baseline/TestPointSmoothingFilter2.png.sha512 create mode 100644 Filters/Points/Testing/Data/Baseline/TestPointSmoothingFilter3.png.sha512 create mode 100755 Filters/Points/Testing/Python/TestPointSmoothingFilter.py create mode 100755 Filters/Points/Testing/Python/TestPointSmoothingFilter2.py create mode 100755 Filters/Points/Testing/Python/TestPointSmoothingFilter3.py create mode 100644 Filters/Points/vtkConvertToPointCloud.cxx create mode 100644 Filters/Points/vtkConvertToPointCloud.h create mode 100644 Filters/Points/vtkPointSmoothingFilter.cxx create mode 100644 Filters/Points/vtkPointSmoothingFilter.h create mode 100644 Filters/Points/vtkPoissonDiskSampler.cxx create mode 100644 Filters/Points/vtkPoissonDiskSampler.h delete mode 100644 Filters/SMP/Testing/Cxx/TestSMPTransform.cxx delete mode 100644 Filters/SMP/Testing/Cxx/TestSMPWarp.cxx delete mode 100644 Filters/SMP/Testing/Cxx/TestThreadedSynchronizedTemplates3D.cxx delete mode 100644 Filters/SMP/Testing/Cxx/TestThreadedSynchronizedTemplatesCutter3D.cxx delete mode 100644 Filters/SMP/vtkSMPContourGridManyPieces.cxx delete mode 100644 Filters/SMP/vtkSMPContourGridManyPieces.h delete mode 100644 Filters/SMP/vtkSMPTransform.cxx delete mode 100644 Filters/SMP/vtkSMPTransform.h delete mode 100644 Filters/SMP/vtkSMPWarpVector.cxx delete mode 100644 Filters/SMP/vtkSMPWarpVector.h delete mode 100644 Filters/SMP/vtkThreadedSynchronizedTemplates3D.cxx delete mode 100644 Filters/SMP/vtkThreadedSynchronizedTemplates3D.h delete mode 100644 Filters/SMP/vtkThreadedSynchronizedTemplatesCutter3D.cxx delete mode 100644 Filters/SMP/vtkThreadedSynchronizedTemplatesCutter3D.h create mode 100644 Filters/Sources/Testing/Cxx/TestPartitionedDataSetSource.cxx delete mode 100644 Filters/Sources/Testing/Data/Baseline/TestQuadrangleCapsuleSource.vtp delete mode 100644 Filters/Sources/Testing/Data/Baseline/TestTriangularCapsuleSource.vtp create mode 100644 Filters/Sources/vtkHandleSource.cxx create mode 100644 Filters/Sources/vtkHandleSource.h create mode 100644 Filters/Sources/vtkPartitionedDataSetCollectionSource.cxx create mode 100644 Filters/Sources/vtkPartitionedDataSetCollectionSource.h create mode 100644 Filters/Sources/vtkPartitionedDataSetSource.cxx create mode 100644 Filters/Sources/vtkPartitionedDataSetSource.h create mode 100644 Filters/Sources/vtkPointHandleSource.cxx create mode 100644 Filters/Sources/vtkPointHandleSource.h create mode 100644 GUISupport/Qt/Testing/Cxx/TestQtWithChartHistogram2D.cxx create mode 100644 GUISupport/Qt/Testing/Data/Baseline/TestQVTKOpenGLNativeWidgetWithChartHistogram2D.png.sha512 create mode 100644 GUISupport/Qt/Testing/Data/Baseline/TestQVTKOpenGLStereoWidgetWithChartHistogram2D.png.sha512 create mode 100644 GUISupport/Qt/Testing/Data/Baseline/TestQVTKOpenGLWidgetWithChartHistogram2D.png.sha512 create mode 100644 GUISupport/Qt/Testing/Data/Baseline/TestQVTKOpenGLWindowWithChartHistogram2D.png.sha512 create mode 100644 GUISupport/Qt/Testing/Data/Baseline/TestQVTKRenderWidgetWithChartHistogram2D.png.sha512 create mode 100644 GUISupport/QtQuick/CMakeLists.txt create mode 100644 GUISupport/QtQuick/QQuickVTKInteractiveWidget.cxx create mode 100644 GUISupport/QtQuick/QQuickVTKInteractiveWidget.h create mode 100644 GUISupport/QtQuick/QQuickVTKInteractorAdapter.cxx create mode 100644 GUISupport/QtQuick/QQuickVTKInteractorAdapter.h create mode 100644 GUISupport/QtQuick/QQuickVTKRenderItem.cxx create mode 100644 GUISupport/QtQuick/QQuickVTKRenderItem.h create mode 100644 GUISupport/QtQuick/QQuickVTKRenderWindow.cxx create mode 100644 GUISupport/QtQuick/QQuickVTKRenderWindow.h create mode 100644 GUISupport/QtQuick/Testing/CMakeLists.txt create mode 100644 GUISupport/QtQuick/Testing/Cxx/CMakeLists.txt create mode 100644 GUISupport/QtQuick/Testing/Cxx/TestQQuickVTK.qrc create mode 100644 GUISupport/QtQuick/Testing/Cxx/TestQQuickVTKRenderItem.cxx create mode 100644 GUISupport/QtQuick/Testing/Cxx/TestQQuickVTKRenderItem.qml.in create mode 100644 GUISupport/QtQuick/Testing/Cxx/TestQQuickVTKRenderItemWidget.cxx create mode 100644 GUISupport/QtQuick/Testing/Cxx/TestQQuickVTKRenderItemWidget.qml.in create mode 100644 GUISupport/QtQuick/Testing/Cxx/TestQQuickVTKRenderWindow.cxx create mode 100644 GUISupport/QtQuick/Testing/Cxx/TestQQuickVTKRenderWindow.qml create mode 100644 GUISupport/QtQuick/Testing/Cxx/TestQQuickVTKRenderWindow.qml.in create mode 100644 GUISupport/QtQuick/Testing/Data/Baseline/TestQQuickVTKRenderItem.png.sha512 create mode 100644 GUISupport/QtQuick/Testing/Data/Baseline/TestQQuickVTKRenderItemWidget.png.sha512 create mode 100644 GUISupport/QtQuick/Testing/Data/Baseline/TestQQuickVTKRenderWindow.png.sha512 create mode 100644 GUISupport/QtQuick/qml/CMakeLists.txt create mode 100644 GUISupport/QtQuick/qml/QQmlVTKPlugin.cxx create mode 100644 GUISupport/QtQuick/qml/QQmlVTKPlugin.h create mode 100644 GUISupport/QtQuick/qml/plugins.qmltypes create mode 100644 GUISupport/QtQuick/qml/qmldir.in create mode 100644 GUISupport/QtQuick/vtk.module delete mode 100644 Geovis/Core/Testing/Cxx/TestGeoAssignCoordinates.cxx delete mode 100644 Geovis/Core/Testing/Cxx/TestGeoGraticule.cxx delete mode 100644 Geovis/Core/Testing/Cxx/TestGlobeSource.cxx delete mode 100644 Geovis/Core/Testing/Data/Baseline/TestGeoAssignCoordinates.png.sha512 delete mode 100644 Geovis/Core/Testing/Data/Baseline/TestGeoGraticule.png.sha512 delete mode 100644 Geovis/Core/Testing/Data/Baseline/TestGlobeSource.png.sha512 create mode 100644 IO/AMR/Testing/Cxx/TestAMReXGridReaderNonZeroOrigin.cxx create mode 100644 IO/AMR/Testing/Cxx/TestVelodyneReader.cxx create mode 100644 IO/AMR/vtkAMRVelodyneReader.cxx create mode 100644 IO/AMR/vtkAMRVelodyneReader.h create mode 100644 IO/AMR/vtkAMRVelodyneReaderInternal.cxx create mode 100644 IO/AMR/vtkAMRVelodyneReaderInternal.h create mode 100644 IO/CGNS/CMakeLists.txt create mode 100644 IO/CGNS/Testing/CMakeLists.txt create mode 100644 IO/CGNS/Testing/Cxx/CMakeLists.txt create mode 100644 IO/CGNS/Testing/Cxx/TestCGNSNoFlowSolutionPointers.cxx create mode 100644 IO/CGNS/Testing/Cxx/TestCGNSReader.cxx create mode 100644 IO/CGNS/Testing/Cxx/TestCGNSReaderMeshCaching.cxx create mode 100644 IO/CGNS/Testing/Cxx/TestCGNSUnsteadyFields.cxx create mode 100644 IO/CGNS/Testing/Cxx/TestCGNSUnsteadyGrid.cxx create mode 100644 IO/CGNS/Testing/Cxx/TestReadCGNSSolution.cxx create mode 100644 IO/CGNS/cgio_helpers.cxx create mode 100644 IO/CGNS/cgio_helpers.h create mode 100644 IO/CGNS/resources/CGNSReader.xml create mode 100644 IO/CGNS/vtk.module create mode 100644 IO/CGNS/vtkCGNSCache.h create mode 100644 IO/CGNS/vtkCGNSFileSeriesReader.cxx create mode 100644 IO/CGNS/vtkCGNSFileSeriesReader.h create mode 100644 IO/CGNS/vtkCGNSReader.cxx create mode 100644 IO/CGNS/vtkCGNSReader.h create mode 100644 IO/CGNS/vtkCGNSReaderInternal.cxx create mode 100644 IO/CGNS/vtkCGNSReaderInternal.h create mode 100644 IO/CGNS/vtkFileSeriesHelper.cxx create mode 100644 IO/CGNS/vtkFileSeriesHelper.h create mode 100644 IO/CONVERGECFD/CMakeLists.txt create mode 100644 IO/CONVERGECFD/Testing/CMakeLists.txt create mode 100644 IO/CONVERGECFD/Testing/Cxx/CMakeLists.txt create mode 100644 IO/CONVERGECFD/Testing/Cxx/TestCONVERGECFDReader.cxx create mode 100644 IO/CONVERGECFD/vtk.module create mode 100644 IO/CONVERGECFD/vtkCONVERGECFDReader.cxx create mode 100644 IO/CONVERGECFD/vtkCONVERGECFDReader.h create mode 100644 IO/Chemistry/CMakeLists.txt create mode 100644 IO/Chemistry/Testing/CMakeLists.txt create mode 100644 IO/Chemistry/Testing/Cxx/CMakeLists.txt rename {Domains => IO}/Chemistry/Testing/Cxx/TestCMLMoleculeReader.cxx (100%) create mode 100644 IO/Chemistry/Testing/Cxx/TestPDBReader.cxx rename {Domains => IO}/Chemistry/Testing/Cxx/TestVASPAnimationReader.cxx (100%) rename {Domains => IO}/Chemistry/Testing/Cxx/TestVASPTessellationReader.cxx (100%) rename {Domains => IO}/Chemistry/Testing/Data/Baseline/TestCMLMoleculeReader.png.sha512 (100%) rename {Domains => IO}/Chemistry/Testing/Data/Baseline/TestVASPAnimationReader.png.sha512 (100%) rename {Domains => IO}/Chemistry/Testing/Data/Baseline/TestVASPAnimationReader_1.png.sha512 (100%) rename {Domains => IO}/Chemistry/Testing/Data/Baseline/TestVASPTessellationReader.png.sha512 (100%) rename {Domains => IO}/Chemistry/Testing/Data/Baseline/TestVASPTessellationReader_1.png.sha512 (100%) create mode 100644 IO/Chemistry/Testing/Data/Baseline/TestXYZMol.png.sha512 create mode 100644 IO/Chemistry/Testing/Data/Baseline/caffeine.png.sha512 create mode 100644 IO/Chemistry/Testing/Data/Baseline/caffeine_notrailingwhitespaces.png.sha512 rename {Domains => IO}/Chemistry/Testing/Data/VASP/NPT_Z_ANIMATE.out.sha512 (100%) rename {Domains => IO}/Chemistry/Testing/Data/VASP/NPT_Z_TESSELLATE.out.sha512 (100%) create mode 100644 IO/Chemistry/Testing/Python/CMakeLists.txt create mode 100644 IO/Chemistry/Testing/Python/MoleculeXYZ.py rename IO/{Geometry => Chemistry}/Testing/Python/TestXYZMol.py (100%) rename IO/{Geometry => Chemistry}/Testing/Python/caffeine.py (100%) rename IO/{Geometry => Chemistry}/Testing/Python/caffeine_notrailingwhitespaces.py (100%) create mode 100644 IO/Chemistry/vtk.module create mode 100644 IO/Chemistry/vtkCMLMoleculeReader.cxx create mode 100644 IO/Chemistry/vtkCMLMoleculeReader.h create mode 100644 IO/Chemistry/vtkGaussianCubeReader.cxx create mode 100644 IO/Chemistry/vtkGaussianCubeReader.h create mode 100644 IO/Chemistry/vtkGaussianCubeReader2.cxx create mode 100644 IO/Chemistry/vtkGaussianCubeReader2.h create mode 100644 IO/Chemistry/vtkMoleculeReaderBase.cxx create mode 100644 IO/Chemistry/vtkMoleculeReaderBase.h create mode 100644 IO/Chemistry/vtkPDBReader.cxx create mode 100644 IO/Chemistry/vtkPDBReader.h rename {Domains => IO}/Chemistry/vtkVASPAnimationReader.cxx (100%) create mode 100644 IO/Chemistry/vtkVASPAnimationReader.h create mode 100644 IO/Chemistry/vtkVASPTessellationReader.cxx create mode 100644 IO/Chemistry/vtkVASPTessellationReader.h create mode 100644 IO/Chemistry/vtkXYZMolReader.cxx create mode 100644 IO/Chemistry/vtkXYZMolReader.h create mode 100644 IO/Chemistry/vtkXYZMolReader2.cxx create mode 100644 IO/Chemistry/vtkXYZMolReader2.h create mode 100644 IO/EnSight/Testing/Data/Baseline/EnSightGoldAsymTensor.png.sha512 create mode 100644 IO/EnSight/Testing/Data/Baseline/EnSightGoldAsymTensorBin.png.sha512 create mode 100644 IO/EnSight/Testing/Data/Baseline/EnSightGoldFortran.png.sha512 create mode 100755 IO/EnSight/Testing/Python/EnSightGoldAsymTensor.py create mode 100755 IO/EnSight/Testing/Python/EnSightGoldAsymTensorBin.py create mode 100755 IO/EnSight/Testing/Python/EnSightGoldFortran.py create mode 100644 IO/EnSight/Testing/Python/EnSightGoldUndefAndPartialAscii.py create mode 100755 IO/EnSight/Testing/Python/EnSightGoldUndefAndPartialBin.py create mode 100644 IO/Exodus/Testing/Cxx/TestExodusWedge18.cxx create mode 100644 IO/Exodus/Testing/Data/Baseline/TestExodusWedge18.png.sha512 create mode 100644 IO/Fides/CMakeLists.txt create mode 100644 IO/Fides/Testing/CMakeLists.txt create mode 100644 IO/Fides/Testing/Python/CMakeLists.txt create mode 100755 IO/Fides/Testing/Python/TestFidesBasic.py create mode 100644 IO/Fides/vtk.module create mode 100644 IO/Fides/vtkFidesReader.cxx create mode 100644 IO/Fides/vtkFidesReader.h create mode 100644 IO/Geometry/Testing/Cxx/TestGLTFWriter.cxx delete mode 100644 IO/Geometry/Testing/Cxx/TestIncrementalOctreePointLocator.cxx create mode 100644 IO/Geometry/Testing/Cxx/TestOBJWriterMultiTexture.cxx delete mode 100644 IO/Geometry/Testing/Cxx/TestOpenFOAMReader64BitFloats.cxx create mode 100644 IO/Geometry/Testing/Cxx/TestOpenFOAMReaderDimensionedFields.cxx create mode 100644 IO/Geometry/Testing/Cxx/TestOpenFOAMReaderFaceZone.cxx create mode 100644 IO/Geometry/Testing/Cxx/TestOpenFOAMReaderLagrangianSerial.cxx create mode 100644 IO/Geometry/Testing/Cxx/TestOpenFOAMReaderLargePolyhedral.cxx create mode 100644 IO/Geometry/Testing/Cxx/TestOpenFOAMReaderPrecision.cxx create mode 100644 IO/Geometry/Testing/Cxx/TestOpenFOAMReaderValuePointPatch.cxx create mode 100644 IO/Geometry/Testing/Data/Baseline/TestGLTFWriterCityGML.png.sha512 create mode 100644 IO/Geometry/Testing/Data/Baseline/TestGLTFWriterObj.png.sha512 delete mode 100644 IO/Geometry/Testing/Data/Baseline/TestOpenFOAMReader64BitFloats.png.sha512 create mode 100644 IO/Geometry/Testing/Data/Baseline/TestOpenFOAMReaderFaceZone.png.sha512 create mode 100644 IO/Geometry/Testing/Data/Baseline/TestOpenFOAMReaderPrecision.png.sha512 create mode 100644 IO/Geometry/Testing/Data/Baseline/TestOpenFOAMReaderValuePointPatch.png.sha512 delete mode 100644 IO/Geometry/Testing/Data/Baseline/TestXYZMol.png.sha512 delete mode 100644 IO/Geometry/Testing/Data/Baseline/caffeine.png.sha512 delete mode 100644 IO/Geometry/Testing/Data/Baseline/caffeine_notrailingwhitespaces.png.sha512 create mode 100644 IO/Geometry/vtkGLTFWriter.cxx create mode 100644 IO/Geometry/vtkGLTFWriter.h create mode 100644 IO/Geometry/vtkGLTFWriterUtils.cxx create mode 100644 IO/Geometry/vtkGLTFWriterUtils.h delete mode 100644 IO/Geometry/vtkGaussianCubeReader.cxx delete mode 100644 IO/Geometry/vtkGaussianCubeReader.h delete mode 100644 IO/Geometry/vtkMoleculeReaderBase.cxx delete mode 100644 IO/Geometry/vtkMoleculeReaderBase.h delete mode 100644 IO/Geometry/vtkPDBReader.cxx delete mode 100644 IO/Geometry/vtkPDBReader.h delete mode 100644 IO/Geometry/vtkXYZMolReader.cxx delete mode 100644 IO/Geometry/vtkXYZMolReader.h create mode 100644 IO/H5Rage/CMakeLists.txt create mode 100644 IO/H5Rage/H5RageAdaptor.cxx create mode 100644 IO/H5Rage/H5RageAdaptor.h create mode 100644 IO/H5Rage/vtk.module create mode 100644 IO/H5Rage/vtkH5RageReader.cxx create mode 100644 IO/H5Rage/vtkH5RageReader.h create mode 100644 IO/HDF/CMakeLists.txt create mode 100644 IO/HDF/Testing/CMakeLists.txt create mode 100644 IO/HDF/Testing/Cxx/CMakeLists.txt create mode 100644 IO/HDF/Testing/Cxx/TestHDFReader.cxx create mode 100644 IO/HDF/vtk.module create mode 100644 IO/HDF/vtkHDFReader.cxx create mode 100644 IO/HDF/vtkHDFReader.h create mode 100644 IO/HDF/vtkHDFReaderImplementation.cxx create mode 100644 IO/HDF/vtkHDFReaderImplementation.h create mode 100644 IO/HDF/vtkHDFReaderVersion.h create mode 100644 IO/IOSS/CMakeLists.txt create mode 100644 IO/IOSS/Testing/CMakeLists.txt create mode 100644 IO/IOSS/Testing/Cxx/CMakeLists.txt create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSApplyDisplacementsCGNS.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSAssemblies.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSAttributes.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSCGNS.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSExodus.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSExodusParitionedFiles.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSExodusRestarts.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSFilePatternMatching.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSNoElementBlocks.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSSuperelements.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSTri6.cxx create mode 100644 IO/IOSS/Testing/Cxx/TestIOSSUnsupported.cxx create mode 100644 IO/IOSS/Testing/Data/Baseline/TestIOSSApplyDisplacementsCGNS.png.sha512 create mode 100644 IO/IOSS/Testing/Data/Baseline/TestIOSSCGNS.png.sha512 create mode 100644 IO/IOSS/Testing/Data/Baseline/TestIOSSExodusParitionedFiles.png.sha512 create mode 100644 IO/IOSS/Testing/Data/Baseline/TestIOSSTri6.png.sha512 create mode 100644 IO/IOSS/vtk.module create mode 100644 IO/IOSS/vtkIOSSFilesScanner.cxx create mode 100644 IO/IOSS/vtkIOSSFilesScanner.h create mode 100644 IO/IOSS/vtkIOSSReader.cxx create mode 100644 IO/IOSS/vtkIOSSReader.h create mode 100644 IO/IOSS/vtkIOSSUtilities.cxx create mode 100644 IO/IOSS/vtkIOSSUtilities.h rename IO/Image/Testing/Cxx/{TestHDRReader.cpp => TestHDRReader.cxx} (100%) create mode 100644 IO/Image/Testing/Cxx/TestTGAReader.cxx create mode 100644 IO/Image/Testing/Data/Baseline/TestTGAReader.png.sha512 create mode 100644 IO/Image/vtkTGAReader.cxx create mode 100644 IO/Image/vtkTGAReader.h create mode 100644 IO/Import/Testing/Data/Baseline/TestGLTFImporterCamera.png.sha512 create mode 100644 IO/Import/Testing/Data/Baseline/TestGLTFImporterUnlit.png.sha512 create mode 100644 IO/Import/Testing/Data/glTF/Cameras/Cameras.gltf.sha512 create mode 100644 IO/Import/Testing/Data/glTF/UnlitTest/UnlitTest.glb.sha512 create mode 100755 IO/Legacy/Testing/Python/TestVTKLegacy.py create mode 100644 IO/MotionFX/Testing/Cxx/TestMotionFXCFGReaderClover.cxx create mode 100644 IO/MotionFX/Testing/Data/Baseline/TestMotionFXCFGReaderClover.png.sha512 create mode 100644 IO/Movie/Testing/Cxx/TestMP4Writer.cxx create mode 100644 IO/Movie/vtkIOMovieConfigure.h.in create mode 100644 IO/Movie/vtkMP4Writer.cxx create mode 100644 IO/Movie/vtkMP4Writer.h create mode 100644 IO/Movie/vtkTestMicrosoftMediaFoundation.cxx rename {CMake => IO/Movie}/vtkTestvfw32.cxx (100%) create mode 100644 IO/OMF/CMakeLists.txt create mode 100644 IO/OMF/Testing/CMakeLists.txt create mode 100644 IO/OMF/Testing/Cxx/CMakeLists.txt create mode 100644 IO/OMF/Testing/Cxx/TestOMFReader.cxx create mode 100644 IO/OMF/Testing/Data/Baseline/TestOMFReader.png.sha512 create mode 100644 IO/OMF/core/OMFElement.cxx create mode 100644 IO/OMF/core/OMFElement.h create mode 100644 IO/OMF/core/OMFFile.cxx create mode 100644 IO/OMF/core/OMFFile.h create mode 100644 IO/OMF/core/OMFHelpers.cxx create mode 100644 IO/OMF/core/OMFHelpers.h create mode 100644 IO/OMF/core/OMFProject.cxx create mode 100644 IO/OMF/core/OMFProject.h create mode 100644 IO/OMF/vtk.module create mode 100644 IO/OMF/vtkOMFReader.cxx create mode 100644 IO/OMF/vtkOMFReader.h create mode 100644 IO/OggTheora/Testing/CMakeLists.txt create mode 100644 IO/OggTheora/Testing/Cxx/CMakeLists.txt rename IO/{Movie => OggTheora}/Testing/Cxx/TestOggTheoraWriter.cxx (100%) create mode 100644 IO/OpenVDB/CMakeLists.txt create mode 100644 IO/OpenVDB/Testing/CMakeLists.txt create mode 100644 IO/OpenVDB/Testing/Python/CMakeLists.txt create mode 100644 IO/OpenVDB/Testing/Python/SaveOpenVDBFile.py create mode 100644 IO/OpenVDB/vtk.module create mode 100644 IO/OpenVDB/vtkOpenVDBWriter.cxx create mode 100644 IO/OpenVDB/vtkOpenVDBWriter.h create mode 100644 IO/Parallel/Testing/Cxx/TestPOpenFOAMReaderLagrangianSerial.cxx create mode 100644 IO/Parallel/Testing/Cxx/TestPOpenFOAMReaderLagrangianUncollated.cxx create mode 100644 IO/ParallelXML/Testing/Cxx/TestParallelPartitionedDataSetIO.cxx create mode 100644 IO/ParallelXML/Testing/Cxx/TestXMLReaderChangingBlocksOverTime.cxx create mode 100644 IO/ParallelXML/Testing/Python/TestXMLPartitionedDataSet.py create mode 100644 IO/ParallelXML/Testing/Python/TestXMLPartitionedDataSetCollection.py create mode 100644 IO/ParallelXML/vtkXMLCompositeDataSetWriterHelper.cxx create mode 100644 IO/ParallelXML/vtkXMLCompositeDataSetWriterHelper.h create mode 100644 IO/ParallelXML/vtkXMLDataWriterHelper.cxx create mode 100644 IO/ParallelXML/vtkXMLDataWriterHelper.h create mode 100644 IO/ParallelXML/vtkXMLPPartitionedDataSetWriter.cxx create mode 100644 IO/ParallelXML/vtkXMLPPartitionedDataSetWriter.h create mode 100644 IO/ParallelXML/vtkXMLPartitionedDataSetCollectionWriter.cxx create mode 100644 IO/ParallelXML/vtkXMLPartitionedDataSetCollectionWriter.h create mode 100644 IO/ParallelXML/vtkXMLPartitionedDataSetWriter.cxx create mode 100644 IO/ParallelXML/vtkXMLPartitionedDataSetWriter.h create mode 100644 IO/ParallelXML/vtkXMLWriter2.cxx create mode 100644 IO/ParallelXML/vtkXMLWriter2.h create mode 100644 IO/Video/vtkIOVideoConfigure.h.in delete mode 100644 IO/Video/vtkMILVideoSource.cxx delete mode 100644 IO/Video/vtkMILVideoSource.h rename {CMake => IO/Video}/vtkTestvfw32Capture.cxx (100%) create mode 100644 IO/XML/Testing/Cxx/TestSettingTimeArrayInReader.cxx create mode 100644 IO/XML/Testing/Cxx/TestXMLHyperTreeGridIO2.cxx create mode 100644 IO/XML/Testing/Cxx/TestXMLHyperTreeGridIOReduction.cxx create mode 100644 IO/XML/Testing/Cxx/TestXMLLegacyFileReadIdTypeArrays.cxx create mode 100644 IO/XML/Testing/Cxx/TestXMLPieceDistribution.cxx create mode 100644 IO/XML/Testing/Data/Baseline/TestXMLPieceDistribution.png.sha512 create mode 100644 IO/XML/Testing/Python/TestWriteRandomHyperTreeGridAppendBinaryMode1.py create mode 100644 IO/XML/Testing/Python/TestWriteReadRandomHyperTreeGridAppendBinaryMode1.py delete mode 100644 IO/XML/Testing/Python/TestXMLPartitionedDataSet.py delete mode 100644 IO/XML/Testing/Python/TestXMLPartitionedDataSetCollection.py delete mode 100644 IO/XML/vtkXMLPartitionedDataSetCollectionWriter.cxx delete mode 100644 IO/XML/vtkXMLPartitionedDataSetCollectionWriter.h delete mode 100644 IO/XML/vtkXMLPartitionedDataSetWriter.cxx delete mode 100644 IO/XML/vtkXMLPartitionedDataSetWriter.h create mode 100644 IO/XML/vtkXMLWriterBase.cxx create mode 100644 IO/XML/vtkXMLWriterBase.h create mode 100644 Imaging/Core/Testing/Cxx/ImageGenericInterpolateSlidingWindow3D.cxx create mode 100644 Imaging/Core/Testing/Data/Baseline/ImageGenericInterpolateSlidingWindow3D.png.sha512 create mode 100644 Imaging/Core/vtkGenericImageInterpolator.cxx create mode 100644 Imaging/Core/vtkGenericImageInterpolator.h delete mode 100644 Imaging/Fourier/vtkTableFFT.cxx delete mode 100644 Imaging/Fourier/vtkTableFFT.h create mode 100644 Interaction/Widgets/Testing/Cxx/TestButtonWidgetPlacement.cxx create mode 100644 Interaction/Widgets/Testing/Cxx/TestEqualizerContextItem.cxx create mode 100644 Interaction/Widgets/Testing/Cxx/TestTextRepresentationWithBorders.cxx create mode 100644 Interaction/Widgets/Testing/Cxx/TestTextWidgetBackgroundInteractive.cxx create mode 100644 Interaction/Widgets/Testing/Cxx/vtkCameraPathRepresentationTest1.cxx create mode 100644 Interaction/Widgets/Testing/Cxx/vtkResliceCursorRepresentationTest1.cxx create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestButtonWidgetPlacement.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestCameraOrientationWidget.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestEqualizerContextItem.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestImplicitImageRepresentation.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestMagnifierWidget.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestOrientationMarkerWidget_5.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestPointCloudWidget.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestPointCloudWidget2.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestTensorWidget.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestTensorWidget2.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestTextRepresentationWithBorders.png.sha512 create mode 100644 Interaction/Widgets/Testing/Data/Baseline/TestTextWidgetBackgroundInteractive.png.sha512 create mode 100755 Interaction/Widgets/Testing/Python/TestCameraOrientationWidget.py create mode 100755 Interaction/Widgets/Testing/Python/TestImplicitImageRepresentation.py create mode 100755 Interaction/Widgets/Testing/Python/TestMagnifierWidget.py create mode 100755 Interaction/Widgets/Testing/Python/TestPointCloudWidget.py create mode 100755 Interaction/Widgets/Testing/Python/TestPointCloudWidget2.py create mode 100755 Interaction/Widgets/Testing/Python/TestTensorWidget.py create mode 100755 Interaction/Widgets/Testing/Python/TestTensorWidget2.py create mode 100644 Interaction/Widgets/vtkAbstractSplineRepresentation.cxx create mode 100644 Interaction/Widgets/vtkAbstractSplineRepresentation.h create mode 100644 Interaction/Widgets/vtkCameraHandleSource.cxx create mode 100644 Interaction/Widgets/vtkCameraHandleSource.h create mode 100644 Interaction/Widgets/vtkCameraOrientationRepresentation.cxx create mode 100644 Interaction/Widgets/vtkCameraOrientationRepresentation.h create mode 100644 Interaction/Widgets/vtkCameraOrientationWidget.cxx create mode 100644 Interaction/Widgets/vtkCameraOrientationWidget.h create mode 100644 Interaction/Widgets/vtkCameraPathRepresentation.cxx create mode 100644 Interaction/Widgets/vtkCameraPathRepresentation.h create mode 100644 Interaction/Widgets/vtkCameraPathWidget.cxx create mode 100644 Interaction/Widgets/vtkCameraPathWidget.h create mode 100644 Interaction/Widgets/vtkEqualizerContextItem.cxx create mode 100644 Interaction/Widgets/vtkEqualizerContextItem.h create mode 100644 Interaction/Widgets/vtkImplicitImageRepresentation.cxx create mode 100644 Interaction/Widgets/vtkImplicitImageRepresentation.h create mode 100644 Interaction/Widgets/vtkMagnifierRepresentation.cxx create mode 100644 Interaction/Widgets/vtkMagnifierRepresentation.h create mode 100644 Interaction/Widgets/vtkMagnifierWidget.cxx create mode 100644 Interaction/Widgets/vtkMagnifierWidget.h create mode 100644 Interaction/Widgets/vtkPointCloudRepresentation.cxx create mode 100644 Interaction/Widgets/vtkPointCloudRepresentation.h create mode 100644 Interaction/Widgets/vtkPointCloudWidget.cxx create mode 100644 Interaction/Widgets/vtkPointCloudWidget.h create mode 100644 Interaction/Widgets/vtkTensorRepresentation.cxx create mode 100644 Interaction/Widgets/vtkTensorRepresentation.h create mode 100644 Interaction/Widgets/vtkTensorWidget.cxx create mode 100644 Interaction/Widgets/vtkTensorWidget.h create mode 100644 Parallel/Core/vtkMultiProcessStreamSerialization.h create mode 100644 Parallel/DIY/Testing/CMakeLists.txt create mode 100644 Parallel/DIY/Testing/Cxx/CMakeLists.txt create mode 100644 Parallel/DIY/Testing/Cxx/TestDIYDataExchanger.cxx create mode 100644 Parallel/DIY/Testing/Cxx/TestDIYUtilities.cxx create mode 100644 Parallel/DIY/vtkDIYDataExchanger.cxx create mode 100644 Parallel/DIY/vtkDIYDataExchanger.h create mode 100644 Parallel/DIY/vtkDIYGhostUtilities.cxx create mode 100644 Parallel/DIY/vtkDIYGhostUtilities.h create mode 100644 Parallel/DIY/vtkDIYGhostUtilities.txx create mode 100644 Parallel/DIY/vtkDIYUtilities.txx create mode 100644 Remote/RenderingLookingGlass.remote.cmake create mode 100644 Rendering/Context2D/Testing/Cxx/TestBlockItem.cxx create mode 100644 Rendering/Context2D/Testing/Data/Baseline/TestBlockItem.png.sha512 create mode 100644 Rendering/Core/Testing/Cxx/TestBackfaceTexture.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestBlockVisibility.cxx create mode 100644 Rendering/Core/Testing/Cxx/TestCompositeDataDisplayAttributes.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestCompositeDataPointGaussian.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestCompositeDataPointGaussianSelection.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestCompositePolyDataMapper2.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestCompositePolyDataMapper2CellScalars.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestCompositePolyDataMapper2MixedGeometryCellScalars.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestCompositePolyDataMapper2MixedGeometryEdges.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestCompositePolyDataMapper2Picking.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestCompositePolyDataMapper2Scalars.cxx create mode 100644 Rendering/Core/Testing/Cxx/TestResetCameraScreenSpace.cxx create mode 100644 Rendering/Core/Testing/Cxx/TestResizingWindowToImageFilter.cxx create mode 100644 Rendering/Core/Testing/Cxx/TestTextureWrap.cxx delete mode 100644 Rendering/Core/Testing/Cxx/TestValuePassFloatingPoint.cxx create mode 100644 Rendering/Core/Testing/Data/Baseline/TestBackfaceTexture.png.sha512 delete mode 100644 Rendering/Core/Testing/Data/Baseline/TestCompositePolyDataMapper2.png.sha512 delete mode 100644 Rendering/Core/Testing/Data/Baseline/TestCompositePolyDataMapper2CellScalars.png.sha512 delete mode 100644 Rendering/Core/Testing/Data/Baseline/TestCompositePolyDataMapper2MixedGeometryCellScalars.png.sha512 delete mode 100644 Rendering/Core/Testing/Data/Baseline/TestCompositePolyDataMapper2MixedGeometryEdges.png.sha512 delete mode 100644 Rendering/Core/Testing/Data/Baseline/TestCompositePolyDataMapper2Picking.png.sha512 delete mode 100644 Rendering/Core/Testing/Data/Baseline/TestCompositePolyDataMapper2Scalars.png.sha512 create mode 100644 Rendering/Core/Testing/Data/Baseline/TestResetCameraScreenSpace.png.sha512 create mode 100644 Rendering/Core/Testing/Data/Baseline/TestResizingWindowToImageFilter.png.sha512 create mode 100644 Rendering/Core/Testing/Data/Baseline/TestResizingWindowToImageFilter_1.png.sha512 create mode 100644 Rendering/Core/Testing/Data/Baseline/TestResizingWindowToImageFilter_2.png.sha512 create mode 100644 Rendering/Core/Testing/Data/Baseline/TestResizingWindowToImageFilter_3.png.sha512 create mode 100644 Rendering/Core/Testing/Data/Baseline/TestTextureWrap.png.sha512 create mode 100644 Rendering/Core/vtkResizingWindowToImageFilter.cxx create mode 100644 Rendering/Core/vtkResizingWindowToImageFilter.h create mode 100644 Rendering/Core/vtkStateStorage.h create mode 100644 Rendering/FFMPEGOpenGL2/CMakeLists.txt create mode 100644 Rendering/FFMPEGOpenGL2/Testing/CMakeLists.txt create mode 100644 Rendering/FFMPEGOpenGL2/Testing/Cxx/CMakeLists.txt create mode 100644 Rendering/FFMPEGOpenGL2/Testing/Cxx/TestMovieSphere.cxx create mode 100644 Rendering/FFMPEGOpenGL2/vtk.module create mode 100644 Rendering/FFMPEGOpenGL2/vtkOpenGLMovieSphere.cxx create mode 100644 Rendering/FFMPEGOpenGL2/vtkOpenGLMovieSphere.h create mode 100644 Rendering/FreeType/Testing/Cxx/TestFreeTypeTextMapperWithColumns.cxx create mode 100644 Rendering/FreeType/Testing/Cxx/TestMathTextFonts.cxx create mode 100644 Rendering/FreeType/Testing/Data/Baseline/TestFreeTypeTextMapperWithColumns.png.sha512 create mode 100644 Rendering/FreeType/Testing/Data/Baseline/TestMathTextFonts.png.sha512 create mode 100644 Rendering/FreeTypeFontConfig/Testing/Data/Baseline/TestSystemFontRendering_8.png.sha512 rename Rendering/{Core => OpenGL2}/Testing/Cxx/TestBlockOpacity.cxx (100%) create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestBlockVisibility.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCameraShiftScale.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositeDataPointGaussian.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositeDataPointGaussianSelection.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositePolyDataMapper2.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositePolyDataMapper2CameraShiftScale.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositePolyDataMapper2CellScalars.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositePolyDataMapper2MixedGeometryCellScalars.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositePolyDataMapper2MixedGeometryEdges.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositePolyDataMapper2Picking.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCompositePolyDataMapper2Scalars.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestCustomCursorShape.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestDirectSelectionRendering.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestFXAAWithEDLPass.cxx rename Rendering/{Core => OpenGL2}/Testing/Cxx/TestGlyph3DMapperTreeIndexingCompositeGlyphs.cxx (100%) rename Rendering/{Core => OpenGL2}/Testing/Cxx/TestHiddenLineRemovalPass.cxx (100%) rename Rendering/{Core => OpenGL2}/Testing/Cxx/TestMultiBlockPartialArrayFieldData.cxx (100%) rename Rendering/{Core => OpenGL2}/Testing/Cxx/TestMultiBlockPartialArrayPointData.cxx (100%) create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestMultiTexturingInterpolateScalars.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestOutlineGlowPass.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestPBRAnisotropy.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestPBRClearCoat.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestPBREdgeTint.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestPBRHdrEnvironment.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestPBRIrradianceHDR.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestPBRMaterialsCoat.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestSDL2.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestSSAOPassWithRenderer.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestValuePassFloatingPoint.cxx create mode 100644 Rendering/OpenGL2/Testing/Cxx/TestWindowBlits.cxx rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestBlockOpacity.png.sha512 (100%) rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestBlockOpacity_1.png.sha512 (100%) rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestBlockVisibility.png.sha512 (100%) create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCameraShiftScale.png.sha512 rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestCompositeDataPointGaussian.png.sha512 (100%) rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestCompositeDataPointGaussianSelection.png.sha512 (100%) create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCompositePolyDataMapper2.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCompositePolyDataMapper2CameraShiftScale.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCompositePolyDataMapper2CellScalars.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCompositePolyDataMapper2MixedGeometryCellScalars.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCompositePolyDataMapper2MixedGeometryEdges.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCompositePolyDataMapper2Picking.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCompositePolyDataMapper2Scalars.png.sha512 delete mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestCompositePolyDataMapper2Spheres_1.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestDirectSelectionRendering.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestFXAAWithEDLPass.png.sha512 rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestGlyph3DMapperTreeIndexingCompositeGlyphs.png.sha512 (100%) rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestHiddenLineRemovalPass.png.sha512 (100%) rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestMultiBlockPartialArrayFieldData.png.sha512 (100%) rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestMultiBlockPartialArrayPointData.png.sha512 (100%) create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestMultiTexturingInterpolateScalars.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestOutlineGlowPass.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestPBRAnisotropy.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestPBRClearCoat.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestPBREdgeTint.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestPBRHdrEnvironment.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestPBRIrradianceHDR.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestPBRMaterialsCoat.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestSDL2.png.sha512 create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestSSAOPassWithRenderer.png.sha512 rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestValuePassFloatingPoint.png.sha512 (100%) rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestValuePassFloatingPoint_1.png.sha512 (100%) rename Rendering/{Core => OpenGL2}/Testing/Data/Baseline/TestValuePassFloatingPoint_2.png.sha512 (100%) create mode 100644 Rendering/OpenGL2/Testing/Data/Baseline/TestWindowBlits.png.sha512 delete mode 100644 Rendering/OpenGL2/ViewToZbufferConversion.txt create mode 100644 Rendering/OpenGL2/glsl/vtkOutlineGlowBlurPassFS.glsl create mode 100644 Rendering/OpenGL2/glsl/vtkOutlineGlowUpscalePassFS.glsl create mode 100644 Rendering/OpenGL2/glsl/vtkPBRFunctions.glsl create mode 100644 Rendering/OpenGL2/glsl/vtkPolyDataEdgesGS.glsl create mode 100644 Rendering/OpenGL2/vtkCompositeMapperHelper2.h create mode 100644 Rendering/OpenGL2/vtkOutlineGlowPass.cxx create mode 100644 Rendering/OpenGL2/vtkOutlineGlowPass.h create mode 100644 Rendering/OpenGL2/vtkSDL2OpenGLRenderWindow.cxx create mode 100644 Rendering/OpenGL2/vtkSDL2OpenGLRenderWindow.h delete mode 100644 Rendering/OpenGL2/vtkStateStorage.h delete mode 100644 Rendering/OpenVR/vtkOpenGLAvatar.cxx delete mode 100644 Rendering/OpenVR/vtkOpenGLAvatar.h delete mode 100644 Rendering/OpenVR/vtkOpenVRFollower.cxx delete mode 100644 Rendering/OpenVR/vtkOpenVRFollower.h delete mode 100644 Rendering/OpenVR/vtkOpenVRHardwarePicker.cxx delete mode 100644 Rendering/OpenVR/vtkOpenVRHardwarePicker.h delete mode 100644 Rendering/OpenVR/vtkOpenVRMenuRepresentation.cxx delete mode 100644 Rendering/OpenVR/vtkOpenVRMenuRepresentation.h delete mode 100644 Rendering/OpenVR/vtkOpenVRMenuWidget.cxx delete mode 100644 Rendering/OpenVR/vtkOpenVRMenuWidget.h delete mode 100644 Rendering/OpenVR/vtkOpenVRPanelRepresentation.cxx delete mode 100644 Rendering/OpenVR/vtkOpenVRPanelRepresentation.h delete mode 100644 Rendering/OpenVR/vtkOpenVRPanelWidget.cxx delete mode 100644 Rendering/OpenVR/vtkOpenVRPanelWidget.h delete mode 100644 Rendering/OpenVR/vtkOpenVRPropPicker.cxx delete mode 100644 Rendering/OpenVR/vtkOpenVRPropPicker.h delete mode 100644 Rendering/OpenVR/vtkOpenVRRay.cxx delete mode 100644 Rendering/OpenVR/vtkOpenVRRay.h create mode 100644 Rendering/OpenVR/vtk_openvr_actions.json create mode 100644 Rendering/OpenVR/vtk_openvr_binding_hpmotioncontroller.json create mode 100644 Rendering/OpenVR/vtk_openvr_binding_oculus_touch.json create mode 100644 Rendering/OpenVR/vtk_openvr_binding_vive_controller.json create mode 100644 Rendering/RayTracing/RTWrapper/VisRTX/GeometricModel.h create mode 100644 Rendering/RayTracing/RTWrapper/VisRTX/Group.h create mode 100644 Rendering/RayTracing/RTWrapper/VisRTX/Instance.h delete mode 100644 Rendering/RayTracing/RTWrapper/VisRTX/Model.h create mode 100644 Rendering/RayTracing/RTWrapper/VisRTX/World.h delete mode 100644 Rendering/RayTracing/Testing/Cxx/TestOSPRayTetrahedraMapper.cxx delete mode 100644 Rendering/RayTracing/Testing/Cxx/TestOSPRayTetrahedraMapperMixedCells.cxx create mode 100644 Rendering/RayTracing/Testing/Cxx/TestOSPRayUnstructuredVolumeMapper.cxx create mode 100644 Rendering/RayTracing/Testing/Cxx/TestOSPRayUnstructuredVolumeMapperMixedCells.cxx create mode 100644 Rendering/RayTracing/Testing/Cxx/TestPathTracerGLTFImporter.cxx delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestGPURayCastCellData_1.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestGPURayCastVolumeLightKit_1.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestGPURayCastVolumePolyData_1.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestGPURayCastVolumeUpdate_1.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestOSPRayAmbient_1.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestOSPRayAmbient_2.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestOSPRayLights_1.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestOSPRayMultiBlock_1.png.sha512 rename Rendering/RayTracing/Testing/Data/Baseline/{TestOSPRayTetrahedraMapper.png.sha512 => TestOSPRayUnstructuredVolumeMapper.png.sha512} (100%) rename Rendering/RayTracing/Testing/Data/Baseline/{TestOSPRayTetrahedraMapperMixedCells.png.sha512 => TestOSPRayUnstructuredVolumeMapperMixedCells.png.sha512} (100%) create mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestPathTracerGLTFImporter.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestPathTracerLuminous_1.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestPathTracerLuminous_2.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestPathTracerMaterials_1.png.sha512 delete mode 100644 Rendering/RayTracing/Testing/Data/Baseline/TestPathTracerMaterials_2.png.sha512 create mode 100644 Rendering/RayTracing/Testing/Data/WaterBottle.glb.sha512 delete mode 100644 Rendering/RayTracing/vtkOSPRayTetrahedraMapperNode.cxx delete mode 100644 Rendering/RayTracing/vtkOSPRayTetrahedraMapperNode.h create mode 100644 Rendering/RayTracing/vtkOSPRayUnstructuredVolumeMapperNode.cxx create mode 100644 Rendering/RayTracing/vtkOSPRayUnstructuredVolumeMapperNode.h delete mode 100644 Rendering/SceneGraph/vtkViewNodeCollection.cxx delete mode 100644 Rendering/SceneGraph/vtkViewNodeCollection.h create mode 100644 Rendering/UI/vtkSDL2RenderWindowInteractor.cxx create mode 100644 Rendering/UI/vtkSDL2RenderWindowInteractor.h create mode 100644 Rendering/VR/CMakeLists.txt rename Rendering/{OpenVR => VR}/data/vtkAvatarHead.vtp (100%) rename Rendering/{OpenVR => VR}/data/vtkAvatarLeftForeArm.vtp (100%) rename Rendering/{OpenVR => VR}/data/vtkAvatarLeftHand.vtp (100%) rename Rendering/{OpenVR => VR}/data/vtkAvatarLeftUpperArm.vtp (100%) rename Rendering/{OpenVR => VR}/data/vtkAvatarRightForeArm.vtp (100%) rename Rendering/{OpenVR => VR}/data/vtkAvatarRightHand.vtp (100%) rename Rendering/{OpenVR => VR}/data/vtkAvatarRightUpperArm.vtp (100%) rename Rendering/{OpenVR => VR}/data/vtkAvatarTorso.vtp (100%) create mode 100644 Rendering/VR/vtk.module create mode 100644 Rendering/VR/vtkOpenGLAvatar.cxx create mode 100644 Rendering/VR/vtkOpenGLAvatar.h create mode 100644 Rendering/VR/vtkVRCamera.h create mode 100644 Rendering/VR/vtkVRCollaborationClient.cxx create mode 100644 Rendering/VR/vtkVRCollaborationClient.h create mode 100644 Rendering/VR/vtkVRControlsHelper.cxx create mode 100644 Rendering/VR/vtkVRControlsHelper.h create mode 100644 Rendering/VR/vtkVRFollower.cxx create mode 100644 Rendering/VR/vtkVRFollower.h create mode 100644 Rendering/VR/vtkVRHardwarePicker.cxx create mode 100644 Rendering/VR/vtkVRHardwarePicker.h create mode 100644 Rendering/VR/vtkVRMenuRepresentation.cxx create mode 100644 Rendering/VR/vtkVRMenuRepresentation.h create mode 100644 Rendering/VR/vtkVRMenuWidget.cxx create mode 100644 Rendering/VR/vtkVRMenuWidget.h create mode 100644 Rendering/VR/vtkVRModel.cxx create mode 100644 Rendering/VR/vtkVRModel.h create mode 100644 Rendering/VR/vtkVRPanelRepresentation.cxx create mode 100644 Rendering/VR/vtkVRPanelRepresentation.h create mode 100644 Rendering/VR/vtkVRPanelWidget.cxx create mode 100644 Rendering/VR/vtkVRPanelWidget.h create mode 100644 Rendering/VR/vtkVRRay.cxx create mode 100644 Rendering/VR/vtkVRRay.h create mode 100644 Rendering/VR/vtkVRRenderWindow.cxx create mode 100644 Rendering/VR/vtkVRRenderWindow.h create mode 100644 Rendering/VR/vtkVRRenderer.cxx create mode 100644 Rendering/VR/vtkVRRenderer.h create mode 100644 Rendering/Volume/Testing/Cxx/TestGPURayCastMapperRectilinearGrid.cxx create mode 100644 Rendering/Volume/Testing/Cxx/TestGPURayCastTransfer2DYScalars.cxx create mode 100644 Rendering/Volume/Testing/Cxx/TestGPURayCastVolumeGhostArrays.cxx create mode 100644 Rendering/Volume/Testing/Cxx/TestGPURayCastVolumeGhostArraysCellData.cxx create mode 100644 Rendering/Volume/Testing/Cxx/TestGPURayCastVolumeUniformGridBlanking.cxx create mode 100644 Rendering/Volume/Testing/Cxx/TestMultiBlockMapperRectilinearGrid.cxx create mode 100644 Rendering/Volume/Testing/Cxx/TestMultiBlockUnstructuredGridVolumeMapper.cxx create mode 100644 Rendering/Volume/Testing/Cxx/TestProjectedTetrahedraVectorComponent.cxx create mode 100644 Rendering/Volume/Testing/Cxx/TestSmartVolumeMapperVolumeUpdate.cxx create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestGPURayCastMapperRectilinearGrid.png.sha512 create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestGPURayCastTransfer2DYScalars.png.sha512 create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestGPURayCastVolumeGhostArrays.png.sha512 create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestGPURayCastVolumeGhostArraysCellData.png.sha512 create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestGPURayCastVolumeUniformGridBlanking.png.sha512 create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestMultiBlockMapperRectilinearGrid.png.sha512 create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestMultiBlockUnstructuredGridVolumeMapper.png.sha512 create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestProjectedTetrahedraVectorComponent.png.sha512 create mode 100644 Rendering/Volume/Testing/Data/Baseline/TestSmartVolumeMapperVolumeUpdate.png.sha512 create mode 100644 Rendering/VolumeOpenGL2/Testing/Cxx/TestGPURayCastMultiVolumeClipping.cxx create mode 100644 Rendering/VolumeOpenGL2/Testing/Data/Baseline/TestGPURayCastMultiVolumeClipping.png.sha512 create mode 100644 Rendering/VolumeOpenGL2/vtkMultiBlockUnstructuredGridVolumeMapper.cxx create mode 100644 Rendering/VolumeOpenGL2/vtkMultiBlockUnstructuredGridVolumeMapper.h create mode 100644 Testing/Core/Testing/CMakeLists.txt create mode 100644 Testing/Core/Testing/Cxx/CMakeLists.txt create mode 100644 Testing/Core/Testing/Cxx/TestErrorObserver.cxx create mode 100644 Testing/Data/6VWW.pdb.sha512 create mode 100644 Testing/Data/AMR/Velodyne/TestAMR.xamr.sha512 create mode 100644 Testing/Data/AMReX/NonZeroOrigin/plt00000/.Header.swp.sha512 create mode 100644 Testing/Data/AMReX/NonZeroOrigin/plt00000/Header.sha512 create mode 100644 Testing/Data/AMReX/NonZeroOrigin/plt00000/Level_0/Cell_D_00000.sha512 create mode 100644 Testing/Data/AMReX/NonZeroOrigin/plt00000/Level_0/Cell_H.sha512 create mode 100644 Testing/Data/AMReX/NonZeroOrigin/plt00000/job_info.sha512 create mode 100644 Testing/Data/AMReX/NonZeroOrigin/plt00000/particles/Header.sha512 create mode 100644 Testing/Data/AMReX/NonZeroOrigin/plt00000/particles/Level_0/DATA_00000.sha512 create mode 100644 Testing/Data/AMReX/NonZeroOrigin/plt00000/particles/Level_0/Particle_H.sha512 create mode 100644 Testing/Data/CGNS/fluid.cgns.4.0.sha512 create mode 100644 Testing/Data/CGNS/fluid.cgns.4.1.sha512 create mode 100644 Testing/Data/CGNS/fluid.cgns.4.2.sha512 create mode 100644 Testing/Data/CGNS/fluid.cgns.4.3.sha512 create mode 100644 Testing/Data/CGNS/r24_node_tailor_test_output/sparc-volume.cgns.36.00.sha512 create mode 100644 Testing/Data/ChangingBlocksOverTime/wavelet_0.vtm.sha512 create mode 100644 Testing/Data/ChangingBlocksOverTime/wavelet_0.vtu.sha512 create mode 100644 Testing/Data/ChangingBlocksOverTime/wavelet_1.vtm.sha512 create mode 100644 Testing/Data/ChangingBlocksOverTime/wavelet_1.vtu.sha512 create mode 100644 Testing/Data/EnSight/RESULT_FLUID_DOMAIN.case.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartial/.readme.txt.un~.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartial/grid_bin.case.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartial/grid_bin.density.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartial/grid_bin.geo.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartial/grid_bin.mass.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartial/grid_bin.pres.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartial/grid_bin.temp.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartial/readme.txt.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartialAscii/grid.case.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartialAscii/grid.density.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartialAscii/grid.geo.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartialAscii/grid.mass.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartialAscii/grid.pres.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartialAscii/grid.temp.sha512 create mode 100644 Testing/Data/EnSight/UndefAndPartialAscii/readme.txt.sha512 create mode 100644 Testing/Data/EnSight/pitzDaily.0000.U.sha512 create mode 100644 Testing/Data/EnSight/pitzDaily.0000.UGrad.sha512 create mode 100644 Testing/Data/EnSight/pitzDaily.0000.epsilon.sha512 create mode 100644 Testing/Data/EnSight/pitzDaily.0000.k.sha512 create mode 100644 Testing/Data/EnSight/pitzDaily.0000.mesh.sha512 create mode 100644 Testing/Data/EnSight/pitzDaily.0000.nut.sha512 create mode 100644 Testing/Data/EnSight/pitzDaily.0000.p.sha512 create mode 100644 Testing/Data/EnSight/pitzDaily.case.sha512 create mode 100644 Testing/Data/EnSight/result_fluid_domain.geo.sha512 create mode 100644 Testing/Data/EnSight/result_fluid_domain.pressure.00001.sha512 create mode 100644 Testing/Data/EnSight/result_fluid_domain.r_ns.00001.sha512 create mode 100644 Testing/Data/EnSight/result_fluid_domain.rij.00001.sha512 create mode 100644 Testing/Data/EnSight/viga.case.sha512 create mode 100644 Testing/Data/EnSight/viga.geo000.sha512 create mode 100644 Testing/Data/EnSight/vigaDisplacements.res000.sha512 create mode 100644 Testing/Data/Example_fields.cgns.sha512 create mode 100644 Testing/Data/Example_grids.cgns.sha512 create mode 100644 Testing/Data/Example_mixed.cgns.sha512 create mode 100644 Testing/Data/Example_nface_n.cgns.sha512 create mode 100644 Testing/Data/Exodus/Assembly-Example.g.sha512 create mode 100644 Testing/Data/Exodus/ExRestarts/blow.e-s.001.sha512 create mode 100644 Testing/Data/Exodus/ExRestarts/blow.e.sha512 create mode 100644 Testing/Data/Exodus/ExRestarts/blow.ex-timeseries.sha512 create mode 100644 Testing/Data/Exodus/RubiksCubeWithRotations_gold.g.sha512 create mode 100644 Testing/Data/Exodus/SAND2017-5827O-FSM_Residual-bad-eigen.e.sha512 create mode 100644 Testing/Data/Exodus/SAND2017-5827O-FSM_Residual_good-eigen.e.sha512 create mode 100644 Testing/Data/Exodus/SAND2020-4077_O-tri6sWFace2.exo.sha512 create mode 100644 Testing/Data/Exodus/block_with_attributes.g.sha512 create mode 100644 Testing/Data/Exodus/can.e.4/can.e.4.0.sha512 create mode 100644 Testing/Data/Exodus/can.e.4/can.e.4.1.sha512 create mode 100644 Testing/Data/Exodus/can.e.4/can.e.4.2.sha512 create mode 100644 Testing/Data/Exodus/can.e.4/can.e.4.3.sha512 create mode 100644 Testing/Data/Exodus/hello_world_fix-d_frf.frq.sha512 create mode 100644 Testing/Data/Exodus/test-nfaced.exo.sha512 create mode 100644 Testing/Data/MotionFX/clover/clover_utm.cfg.sha512 create mode 100644 Testing/Data/MotionFX/clover/clover_utm.stl.sha512 create mode 100644 Testing/Data/MotionFX/clover/clover_utm.utm.sha512 delete mode 100644 Testing/Data/OpenFOAM/64BitFloats/0/U.sha512 delete mode 100644 Testing/Data/OpenFOAM/64BitFloats/0/p.sha512 delete mode 100644 Testing/Data/OpenFOAM/64BitFloats/constant/polyMesh/boundary.sha512 delete mode 100644 Testing/Data/OpenFOAM/64BitFloats/constant/polyMesh/faces.sha512 delete mode 100644 Testing/Data/OpenFOAM/64BitFloats/constant/polyMesh/neighbour.sha512 delete mode 100644 Testing/Data/OpenFOAM/64BitFloats/constant/polyMesh/owner.sha512 delete mode 100644 Testing/Data/OpenFOAM/64BitFloats/constant/polyMesh/points.sha512 delete mode 100644 Testing/Data/OpenFOAM/64BitFloats/system/controlDict.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/0/U.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/0/cellDist.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/0/p.sha512 rename Testing/Data/OpenFOAM/{64BitFloats/test.foam.sha512 => DimFields/cavity/cavity.foam.sha512} (100%) create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/constant/transportProperties.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/system/blockMeshDict.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/system/controlDict.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/system/decomposeParDict.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/system/fvSchemes.sha512 create mode 100644 Testing/Data/OpenFOAM/DimFields/cavity/system/fvSolution.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/2002/pointLocations.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/2002/uniform/time.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/largePolyhedral.foam.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/system/controlDict.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/system/fvSchemes.sha512 create mode 100644 Testing/Data/OpenFOAM/largePolyhedral/system/fvSolution.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/0/U.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/0/p.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/case01.foam.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/precision/case01/system/controlDict.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/Cp.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/UCorrect.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/UTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/Ygas.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/Yliquid.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/Ysolid.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/active.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/age.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/coordinates.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/d.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/dTarget.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/mass0.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/nParticle.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/origId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/origProcId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/positions.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/tTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/coalCloud1/typeId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/Cp.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/UCorrect.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/UTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/active.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/age.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/coordinates.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/d.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/dTarget.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/nParticle.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/origId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/origProcId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/positions.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/tTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/lagrangian/limestoneCloud1/typeId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/qr.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.005/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/Cp.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/UCorrect.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/UTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/Ygas.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/Yliquid.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/Ysolid.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/active.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/age.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/coordinates.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/d.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/dTarget.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/mass0.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/nParticle.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/origId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/origProcId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/positions.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/tTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/coalCloud1/typeId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/Cp.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/UCorrect.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/UTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/active.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/age.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/coordinates.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/d.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/dTarget.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/nParticle.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/origId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/origProcId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/positions.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/tTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/lagrangian/limestoneCloud1/typeId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0.01/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/CO.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/G.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/alphat.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/epsilon.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/k.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/nut.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/0/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/simplifiedSiwek-serial.foam.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-serial/system/controlDict.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/constant/README.txt.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/Cp.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/UCorrect.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/UTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/Ygas.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/Yliquid.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/Ysolid.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/active.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/age.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/coordinates.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/d.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/dTarget.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/mass0.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/nParticle.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/origId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/origProcId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/positions.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/tTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/coalCloud1/typeId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/Cp.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/UCorrect.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/UTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/active.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/age.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/coordinates.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/d.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/dTarget.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/nParticle.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/origId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/origProcId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/positions.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/tTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/lagrangian/limestoneCloud1/typeId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.005/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/Cp.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/UCorrect.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/UTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/Ygas.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/Yliquid.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/Ysolid.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/active.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/age.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/coordinates.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/d.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/dTarget.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/mass0.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/nParticle.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/origId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/origProcId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/positions.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/tTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/coalCloud1/typeId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/Cp.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/UCorrect.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/UTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/active.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/age.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/coordinates.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/d.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/dTarget.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/nParticle.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/origId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/origProcId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/positions.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/tTurb.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/lagrangian/limestoneCloud1/typeId.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0.01/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/CO.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/0/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor0/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.005/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0.01/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/CO.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/0/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor1/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.005/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0.01/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/CO.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/0/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor2/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.005/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0.01/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/CH4.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/CO.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/CO2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/H2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/H2O.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/N2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/O2.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/T.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/U.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/0/p.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/processor3/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/simplifiedSiwek-uncollated.foam.sha512 create mode 100644 Testing/Data/OpenFOAM/simplifiedSiwek-uncollated/system/controlDict.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/100/T.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/100/U.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/100/p.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/100/phi.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/100/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/50/T.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/50/U.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/50/p.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/50/phi.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/50/rho.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/constant/polyMesh/cellZones.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/constant/polyMesh/faceZones.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/squareBend.foam.sha512 create mode 100644 Testing/Data/OpenFOAM/squareBend/system/controlDict.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/2002/pointLocations.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/2002/uniform/time.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/constant/polyMesh/boundary.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/constant/polyMesh/faces.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/constant/polyMesh/neighbour.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/constant/polyMesh/owner.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/constant/polyMesh/points.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/system/controlDict.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/system/fvSchemes.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/system/fvSolution.sha512 create mode 100644 Testing/Data/OpenFOAM/valuePointPatch/valuePointPatch.foam.sha512 create mode 100644 Testing/Data/TestGPURayCastTransfer2DYScalarsTransferFunction.vti.sha512 create mode 100644 Testing/Data/anisotropyTex.png.sha512 create mode 100644 Testing/Data/bc_struct.cgns.sha512 create mode 100644 Testing/Data/beach_gzip.nrrd.sha512 create mode 100644 Testing/Data/can-pvtu.hdf.sha512 create mode 100644 Testing/Data/can-vtu.hdf.sha512 create mode 100644 Testing/Data/can.pvtu.sha512 create mode 100644 Testing/Data/can.vtu.sha512 create mode 100644 Testing/Data/can/can_0.vtu.sha512 create mode 100644 Testing/Data/can/can_1.vtu.sha512 create mode 100644 Testing/Data/can/can_2.vtu.sha512 create mode 100644 Testing/Data/cartesian-attr.bp.dir/cartesian-attr.bp.0.sha512 create mode 100644 Testing/Data/cartesian-attr.bp.dir/profiling.json.sha512 create mode 100644 Testing/Data/cartesian-attr.bp.sha512 create mode 100644 Testing/Data/channelBump_solution.cgns.sha512 create mode 100644 Testing/Data/converge3.1-format.h5.sha512 create mode 100644 Testing/Data/explicitStructuredGridEmpty.vtu.sha512 create mode 100644 Testing/Data/jacksonville_15.mtl.sha512 create mode 100644 Testing/Data/jacksonville_15.obj.sha512 create mode 100644 Testing/Data/jacksonville_15.png.sha512 create mode 100644 Testing/Data/linhex.vtu.sha512 create mode 100644 Testing/Data/mandelbrot-vti.hdf.sha512 create mode 100644 Testing/Data/mandelbrot.vti.sha512 create mode 100644 Testing/Data/mb-of-mps.vtm.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_0_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_10_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_11_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_12_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_13_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_14_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_1_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_2_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_3_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_4_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_5_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_6_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_7_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_8_0.vtp.sha512 create mode 100644 Testing/Data/mb-of-mps/mb-of-mps_9_0.vtp.sha512 create mode 100644 Testing/Data/mb_with_pieces.vtm.sha512 create mode 100644 Testing/Data/mb_with_pieces/pvi_Material_Remap2_0005_0_0.vtu.sha512 create mode 100644 Testing/Data/mb_with_pieces/pvi_Material_Remap2_0005_0_1.vtu.sha512 create mode 100644 Testing/Data/mb_with_pieces/pvi_Material_Remap2_0005_1_0.vtu.sha512 create mode 100644 Testing/Data/mb_with_pieces/pvi_Material_Remap2_0005_1_1.vtu.sha512 create mode 100644 Testing/Data/mb_with_pieces/pvi_Material_Remap2_0005_2_0.vtu.sha512 create mode 100644 Testing/Data/mb_with_pieces/pvi_Material_Remap2_0005_2_1.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000.vtm.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_0.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_1.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_10.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_11.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_12.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_13.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_14.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_15.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_2.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_3.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_4.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_5.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_6.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_7.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_8.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0000/mg_diff_0000_0_9.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062.vtm.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_0.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_1.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_10.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_11.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_12.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_13.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_14.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_15.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_2.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_3.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_4.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_5.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_6.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_7.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_8.vtu.sha512 create mode 100644 Testing/Data/mg_diff/mg_diff_0062/mg_diff_0062_0_9.vtu.sha512 create mode 100644 Testing/Data/mixed-mb.vtm.sha512 create mode 100644 Testing/Data/multiblock_overlapping_tetras.vtm.sha512 create mode 100644 Testing/Data/multiblock_overlapping_tetras/multiblock_overlapping_tetras_0_0.vtu.sha512 create mode 100644 Testing/Data/multiblock_overlapping_tetras/multiblock_overlapping_tetras_1_0.vtu.sha512 create mode 100644 Testing/Data/obj_multitexture_notexture.obj.sha512 create mode 100644 Testing/Data/omf-test-file.omf.sha512 create mode 100644 Testing/Data/pen_1.cur.sha512 create mode 100644 Testing/Data/pen_1.xcursor.sha512 create mode 100644 Testing/Data/post_5016_spray.h5.sha512 create mode 100644 Testing/Data/sliding_multi_block_end.vtm.sha512 create mode 100644 Testing/Data/sliding_multi_block_end/sliding_multi_block_end_0_0.vtu.sha512 create mode 100644 Testing/Data/sliding_multi_block_end/sliding_multi_block_end_1_0.vtu.sha512 create mode 100644 Testing/Data/sliding_multi_block_end/sliding_multi_block_end_2_0.vtu.sha512 create mode 100644 Testing/Data/sliding_multi_block_end/sliding_multi_block_end_3_0.vtu.sha512 create mode 100644 Testing/Data/sliding_multi_block_start.vtm.sha512 create mode 100644 Testing/Data/sliding_multi_block_start/sliding_multi_block_start_0_0.vtu.sha512 create mode 100644 Testing/Data/sliding_multi_block_start/sliding_multi_block_start_1_0.vtu.sha512 create mode 100644 Testing/Data/sliding_multi_block_start/sliding_multi_block_start_2_0.vtu.sha512 create mode 100644 Testing/Data/sliding_multi_block_start/sliding_multi_block_start_3_0.vtu.sha512 create mode 100644 Testing/Data/slightlyRotated.vtu.sha512 create mode 100644 Testing/Data/test_cylinder.cgns.sha512 create mode 100644 Testing/Data/test_node_and_cell.cgns.sha512 create mode 100644 Testing/Data/tet_hex.vtu.sha512 create mode 100644 Testing/Data/tris-blocks-time.bp.dir/profiling.json.sha512 create mode 100644 Testing/Data/tris-blocks-time.bp.dir/tris-blocks-time.bp.0.sha512 create mode 100644 Testing/Data/tris-blocks-time.bp.dir/tris-blocks-time.bp.1.sha512 create mode 100644 Testing/Data/tris-blocks-time.bp.dir/tris-blocks-time.bp.2.sha512 create mode 100644 Testing/Data/tris-blocks-time.bp.dir/tris-blocks-time.bp.3.sha512 create mode 100644 Testing/Data/tris-blocks-time.bp.sha512 create mode 100644 Testing/Data/vtk-uns-grid-2.json.sha512 create mode 100644 Testing/Data/vtk.tga.sha512 create mode 100644 Testing/Data/vtk_Anisotropy.png.sha512 create mode 100644 Testing/Data/wedge18.e.sha512 create mode 100644 Testing/Data/xml-without-idtype-tag.vtu.sha512 create mode 100644 ThirdParty/.clang-tidy create mode 100644 ThirdParty/cgns/CMakeLists.txt create mode 100755 ThirdParty/cgns/update.sh create mode 100644 ThirdParty/cgns/vtk.module create mode 100644 ThirdParty/cgns/vtk_cgns.h.in create mode 100644 ThirdParty/cgns/vtkcgns/CMakeLists.txt create mode 100644 ThirdParty/cgns/vtkcgns/README.kitware.md create mode 100644 ThirdParty/cgns/vtkcgns/README.md create mode 100644 ThirdParty/cgns/vtkcgns/license.txt create mode 100644 ThirdParty/cgns/vtkcgns/src/CMakeLists.txt create mode 100644 ThirdParty/cgns/vtkcgns/src/adf/ADF.h create mode 100644 ThirdParty/cgns/vtkcgns/src/adf/ADF_interface.c create mode 100644 ThirdParty/cgns/vtkcgns/src/adf/ADF_internals.c create mode 100644 ThirdParty/cgns/vtkcgns/src/adf/ADF_internals.h create mode 100644 ThirdParty/cgns/vtkcgns/src/adfh/ADF.h create mode 100644 ThirdParty/cgns/vtkcgns/src/adfh/ADFH.c create mode 100644 ThirdParty/cgns/vtkcgns/src/adfh/ADFH.h create mode 100644 ThirdParty/cgns/vtkcgns/src/cg_hash_types.h.in create mode 100644 ThirdParty/cgns/vtkcgns/src/cg_hashmap.c create mode 100644 ThirdParty/cgns/vtkcgns/src/cg_hashmap.h create mode 100644 ThirdParty/cgns/vtkcgns/src/cgns_error.c create mode 100644 ThirdParty/cgns/vtkcgns/src/cgns_header.h create mode 100644 ThirdParty/cgns/vtkcgns/src/cgns_internals.c create mode 100644 ThirdParty/cgns/vtkcgns/src/cgns_io.c create mode 100644 ThirdParty/cgns/vtkcgns/src/cgns_io.h create mode 100644 ThirdParty/cgns/vtkcgns/src/cgnsconfig.h.in create mode 100644 ThirdParty/cgns/vtkcgns/src/cgnslib.c create mode 100644 ThirdParty/cgns/vtkcgns/src/cgnslib.h create mode 100644 ThirdParty/cgns/vtkcgns/src/cgnstypes.h.in create mode 100644 ThirdParty/cgns/vtkcgns/src/pcgnslib.c create mode 100644 ThirdParty/cgns/vtkcgns/src/pcgnslib.h create mode 100644 ThirdParty/cgns/vtkcgns/src/vtk_cgns_mangle.h create mode 100644 ThirdParty/cli11/CMakeLists.txt create mode 100755 ThirdParty/cli11/update.sh create mode 100644 ThirdParty/cli11/vtk.module create mode 100644 ThirdParty/cli11/vtk_cli11.h create mode 100644 ThirdParty/cli11/vtk_cli11_external.h.in create mode 100644 ThirdParty/cli11/vtk_cli11_forward.h create mode 100644 ThirdParty/cli11/vtkcli11/CLI/App.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/CLI.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Config.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/ConfigFwd.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Error.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Formatter.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/FormatterFwd.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Macros.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Option.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Split.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/StringTools.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Timer.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/TypeTools.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Validators.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CLI/Version.hpp create mode 100644 ThirdParty/cli11/vtkcli11/CMakeLists.txt create mode 100644 ThirdParty/cli11/vtkcli11/LICENSE create mode 100644 ThirdParty/cli11/vtkcli11/README.kitware.md create mode 100644 ThirdParty/cli11/vtkcli11/README.md create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex__put_homogenous_block_params.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_assemblies.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_assembly.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_attribute.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_blob.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_blobs.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_name.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_names.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_param.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_vars.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_assemblies.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_assembly.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_attribute.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_blob.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_blobs.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_node_cmap.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_name.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_names.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_param.c create mode 100644 ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_vars.c create mode 100644 ThirdParty/exprtk/CMakeLists.txt create mode 100755 ThirdParty/exprtk/update.sh create mode 100644 ThirdParty/exprtk/vtk.module create mode 100644 ThirdParty/exprtk/vtk_exprtk.h.in create mode 100644 ThirdParty/exprtk/vtkexprtk/CMakeLists.txt create mode 100644 ThirdParty/exprtk/vtkexprtk/License.txt create mode 100644 ThirdParty/exprtk/vtkexprtk/README.kitware.md create mode 100644 ThirdParty/exprtk/vtkexprtk/exprtk.hpp create mode 100644 ThirdParty/exprtk/vtkexprtk/readme.txt create mode 100644 ThirdParty/fides/CMakeLists.txt create mode 100755 ThirdParty/fides/update.sh create mode 100644 ThirdParty/fides/vtk.module create mode 100644 ThirdParty/fides/vtkfides/CMakeLists.txt create mode 100644 ThirdParty/fides/vtkfides/LICENSE.txt create mode 100644 ThirdParty/fides/vtkfides/README.kitware.md create mode 100644 ThirdParty/fides/vtkfides/README.md create mode 100644 ThirdParty/fides/vtkfides/cmake/FidesExportHeaderTemplate.h.in create mode 100644 ThirdParty/fides/vtkfides/cmake/FidesModule.cmake create mode 100644 ThirdParty/fides/vtkfides/cmake/fides_generate_export_header.cmake create mode 100644 ThirdParty/fides/vtkfides/fides/Array.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/Array.h create mode 100644 ThirdParty/fides/vtkfides/fides/CMakeLists.txt create mode 100644 ThirdParty/fides/vtkfides/fides/CellSet.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/CellSet.h create mode 100644 ThirdParty/fides/vtkfides/fides/Configure.h create mode 100644 ThirdParty/fides/vtkfides/fides/CoordinateSystem.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/CoordinateSystem.h create mode 100644 ThirdParty/fides/vtkfides/fides/DataModel.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/DataModel.h create mode 100644 ThirdParty/fides/vtkfides/fides/DataSetReader.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/DataSetReader.h create mode 100644 ThirdParty/fides/vtkfides/fides/DataSetWriter.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/DataSetWriter.h create mode 100644 ThirdParty/fides/vtkfides/fides/DataSource.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/DataSource.h create mode 100644 ThirdParty/fides/vtkfides/fides/Deprecated.h create mode 100644 ThirdParty/fides/vtkfides/fides/FidesTypes.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/FidesTypes.h create mode 100644 ThirdParty/fides/vtkfides/fides/Field.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/Field.h create mode 100644 ThirdParty/fides/vtkfides/fides/FieldData.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/FieldData.h create mode 100644 ThirdParty/fides/vtkfides/fides/FieldDataManager.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/FieldDataManager.h create mode 100644 ThirdParty/fides/vtkfides/fides/Keys.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/Keys.h create mode 100644 ThirdParty/fides/vtkfides/fides/MetaData.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/MetaData.h create mode 100644 ThirdParty/fides/vtkfides/fides/Value.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/Value.h create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/CMakeLists.txt create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/DataModelFactory.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/DataModelFactory.h create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/DataModelHelperFunctions.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/DataModelHelperFunctions.h create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/InternalMetadataSource.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/InternalMetadataSource.h create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/PredefinedDataModel.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/PredefinedDataModel.h create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/SupportedDataModels.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/predefined/SupportedDataModels.h create mode 100644 ThirdParty/fides/vtkfides/fides/xgc/CMakeLists.txt create mode 100644 ThirdParty/fides/vtkfides/fides/xgc/XGCCommon.cxx create mode 100644 ThirdParty/fides/vtkfides/fides/xgc/XGCCommon.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/UPDATING.md create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/CMakeLists.txt create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fides_rapidjson.h.in create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/allocators.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/cursorstreamwrapper.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/document.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/encodedstream.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/encodings.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/error/en.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/error/error.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/filereadstream.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/filewritestream.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/fwd.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/biginteger.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/clzll.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/diyfp.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/dtoa.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/ieee754.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/itoa.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/meta.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/pow10.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/regex.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/stack.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/strfunc.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/strtod.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/internal/swap.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/istreamwrapper.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/memorybuffer.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/memorystream.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/msinttypes/inttypes.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/msinttypes/stdint.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/ostreamwrapper.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/pointer.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/prettywriter.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/rapidjson.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/reader.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/schema.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/stream.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/stringbuffer.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/include/fidesrapidjson/writer.h create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/license.txt create mode 100644 ThirdParty/fides/vtkfides/thirdparty/rapidjson/fidesrapidjson/readme.md create mode 100755 ThirdParty/fides/vtkfides/thirdparty/rapidjson/update.sh create mode 100644 ThirdParty/fides/vtkfides/thirdparty/update-common.sh create mode 100644 ThirdParty/fmt/CMakeLists.txt create mode 100755 ThirdParty/fmt/update.sh create mode 100644 ThirdParty/fmt/vtk.module create mode 100644 ThirdParty/fmt/vtk_fmt.h.in create mode 100644 ThirdParty/fmt/vtkfmt/CMakeLists.txt create mode 100644 ThirdParty/fmt/vtkfmt/LICENSE.rst create mode 100644 ThirdParty/fmt/vtkfmt/README.kitware.md create mode 100644 ThirdParty/fmt/vtkfmt/README.rst create mode 100644 ThirdParty/fmt/vtkfmt/src/format.cc create mode 100644 ThirdParty/fmt/vtkfmt/src/os.cc create mode 100644 ThirdParty/fmt/vtkfmt/support/cmake/cxx14.cmake create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/args.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/chrono.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/color.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/compile.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/core.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/format-inl.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/format.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/locale.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/os.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/ostream.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/printf.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/ranges.h create mode 100644 ThirdParty/fmt/vtkfmt/vtkfmt/xchar.h create mode 100644 ThirdParty/ioss/CMakeLists.txt create mode 100755 ThirdParty/ioss/update.sh create mode 100644 ThirdParty/ioss/vtk.module create mode 100644 ThirdParty/ioss/vtk_ioss.h.in create mode 100644 ThirdParty/ioss/vtkioss/CMakeLists.txt create mode 100644 ThirdParty/ioss/vtkioss/COPYRIGHT create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Assembly.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Assembly.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Beam2.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Beam2.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Beam3.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Beam3.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Beam4.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Beam4.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Blob.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Blob.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_BoundingBox.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CodeTypes.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CommSet.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CommSet.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Compare.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Compare.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CompositeVariableType.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CompositeVariableType.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ConcreteVariableType.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ConcreteVariableType.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ConstructedVariableType.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ConstructedVariableType.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CoordinateFrame.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CoordinateFrame.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CopyDatabase.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_CopyDatabase.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_DBUsage.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_DataPool.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_DataSize.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_DatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_DatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Decomposition.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Decomposition.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Doxygen.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge2.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge2.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge2D2.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge2D2.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge2D3.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge2D3.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge3.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge3.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge4.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Edge4.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EdgeBlock.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EdgeBlock.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EdgeSet.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EdgeSet.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ElementBlock.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ElementBlock.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ElementSet.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ElementSet.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ElementTopology.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ElementTopology.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ElementVariableType.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EntityBlock.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EntityBlock.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EntitySet.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EntitySet.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_EntityType.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FaceBlock.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FaceBlock.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FaceGenerator.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FaceGenerator.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FaceSet.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FaceSet.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Field.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Field.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FieldManager.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FieldManager.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FileInfo.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_FileInfo.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_GetLongOpt.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_GetLongOpt.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Getline.c create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Getline.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Glob.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_GroupingEntity.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_GroupingEntity.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex16.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex16.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex20.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex20.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex27.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex27.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex32.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex32.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex64.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex64.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex8.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Hex8.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_IOFactory.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_IOFactory.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Initializer.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Initializer.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Map.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Map.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_MeshCopyOptions.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_MeshType.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_NamedSuffixVariableType.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Node.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Node.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_NodeBlock.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_NodeBlock.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_NodeSet.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_NodeSet.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_NullEntity.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ParallelUtils.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ParallelUtils.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Property.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Property.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_PropertyManager.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_PropertyManager.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid13.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid13.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid14.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid14.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid18.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid18.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid19.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid19.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid5.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Pyramid5.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad12.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad12.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad16.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad16.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad4.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad4.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad6.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad6.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad8.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad8.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad9.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Quad9.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Region.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Region.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ScopeGuard.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SerializeIO.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SerializeIO.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Shell4.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Shell4.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Shell8.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Shell8.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Shell9.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Shell9.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ShellLine2D2.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ShellLine2D2.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ShellLine2D3.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ShellLine2D3.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SideBlock.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SideBlock.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SideSet.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SideSet.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SmartAssert.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SmartAssert.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Sort.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Sphere.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Sphere.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Spring2.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Spring2.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Spring3.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Spring3.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_StandardElementTypes.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_State.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_StructuredBlock.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_StructuredBlock.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SubSystem.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Super.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Super.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_SurfaceSplit.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet10.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet10.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet11.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet11.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet14.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet14.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet15.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet15.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet16.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet16.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet4.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet4.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet40.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet40.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet7.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet7.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet8.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tet8.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tracer.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tracer.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Transform.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Transform.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri13.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri13.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri3.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri3.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri4.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri4.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri4a.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri4a.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri6.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri6.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri7.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri7.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri9.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Tri9.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_TriShell3.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_TriShell3.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_TriShell4.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_TriShell4.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_TriShell6.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_TriShell6.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_TriShell7.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_TriShell7.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Unknown.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Unknown.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Utils.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Utils.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_VariableType.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_VariableType.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Version.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge12.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge12.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge15.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge15.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge16.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge16.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge18.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge18.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge20.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge20.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge21.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge21.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge24.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge24.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge52.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge52.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge6.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_Wedge6.h create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ZoneConnectivity.C create mode 100644 ThirdParty/ioss/vtkioss/Ioss_ZoneConnectivity.h create mode 100644 ThirdParty/ioss/vtkioss/README.kitware.md create mode 100644 ThirdParty/ioss/vtkioss/bhopscotch_map.h create mode 100644 ThirdParty/ioss/vtkioss/bhopscotch_set.h create mode 100644 ThirdParty/ioss/vtkioss/catch.hpp create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_DatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_DatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_DecompositionData.C create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_DecompositionData.h create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_Defines.h create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_IOFactory.C create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_IOFactory.h create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_Initializer.C create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_Initializer.h create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_ParallelDatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_ParallelDatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_StructuredZoneData.C create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_StructuredZoneData.h create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.C create mode 100644 ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.h create mode 100644 ThirdParty/ioss/vtkioss/cmake/SEACASIoss_config.h.in create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_BaseDatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_BaseDatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_DatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_DatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_DecompositionData.C create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_DecompositionData.h create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_IOFactory.C create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_IOFactory.h create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_Internals.C create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_Internals.h create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_ParallelDatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_ParallelDatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_SuperElement.C create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_SuperElement.h create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_Utils.C create mode 100644 ThirdParty/ioss/vtkioss/exodus/Ioex_Utils.h create mode 100644 ThirdParty/ioss/vtkioss/gen_struc/Iogs_DatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/gen_struc/Iogs_DatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/gen_struc/Iogs_GeneratedMesh.C create mode 100644 ThirdParty/ioss/vtkioss/gen_struc/Iogs_GeneratedMesh.h create mode 100644 ThirdParty/ioss/vtkioss/generated/Iogn_DashSurfaceMesh.C create mode 100644 ThirdParty/ioss/vtkioss/generated/Iogn_DashSurfaceMesh.h create mode 100644 ThirdParty/ioss/vtkioss/generated/Iogn_DatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/generated/Iogn_DatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/generated/Iogn_GeneratedMesh.C create mode 100644 ThirdParty/ioss/vtkioss/generated/Iogn_GeneratedMesh.h create mode 100644 ThirdParty/ioss/vtkioss/heartbeat/Iohb_DatabaseIO.C create mode 100644 ThirdParty/ioss/vtkioss/heartbeat/Iohb_DatabaseIO.h create mode 100644 ThirdParty/ioss/vtkioss/heartbeat/Iohb_Layout.C create mode 100644 ThirdParty/ioss/vtkioss/heartbeat/Iohb_Layout.h create mode 100644 ThirdParty/ioss/vtkioss/hopscotch_growth_policy.h create mode 100644 ThirdParty/ioss/vtkioss/hopscotch_hash.h create mode 100644 ThirdParty/ioss/vtkioss/hopscotch_map.h create mode 100644 ThirdParty/ioss/vtkioss/hopscotch_set.h create mode 100644 ThirdParty/ioss/vtkioss/init/Ionit_Initializer.C create mode 100644 ThirdParty/ioss/vtkioss/init/Ionit_Initializer.h create mode 100644 ThirdParty/ioss/vtkioss/pdqsort.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/chrono.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/color.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/compile.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/core.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/format-inl.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/format.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/locale.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/os.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/ostream.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/posix.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/printf.h create mode 100644 ThirdParty/ioss/vtkioss/private_copy_fmt/fmt/ranges.h create mode 100644 ThirdParty/ioss/vtkioss/robin_growth_policy.h create mode 100644 ThirdParty/ioss/vtkioss/robin_hash.h create mode 100644 ThirdParty/ioss/vtkioss/robin_map.h create mode 100644 ThirdParty/ioss/vtkioss/robin_set.h create mode 100644 ThirdParty/ioss/vtkioss/tokenize.C create mode 100644 ThirdParty/ioss/vtkioss/tokenize.h create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Factory.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Initializer.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Initializer.h create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_MinMax.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_MinMax.h create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Offset.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Offset.h create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Offset3D.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Offset3D.h create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Scale.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Scale.h create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Scale3D.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Scale3D.h create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Tensor.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_Tensor.h create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_VectorMagnitude.C create mode 100644 ThirdParty/ioss/vtkioss/transform/Iotr_VectorMagnitude.h create mode 100644 ThirdParty/ioss/vtkioss/vtk_ioss_mangle.h delete mode 100644 ThirdParty/pegtl/vtkpegtl/include/tao/pegtl/analysis/insert_rules.hpp create mode 100644 ThirdParty/pegtl/vtkpegtl/include/tao/pegtl/contrib/remove_last_states.hpp create mode 100644 ThirdParty/pegtl/vtkpegtl/include/tao/pegtl/contrib/shuffle_states.hpp delete mode 100644 ThirdParty/pegtl/vtkpegtl/include/tao/pegtl/internal/rule_conjunction.hpp delete mode 100644 ThirdParty/pugixml/vtkpugixml/LICENSE create mode 100644 ThirdParty/pugixml/vtkpugixml/LICENSE.md delete mode 100644 ThirdParty/xdmf2/vtkxdmf2/libsrc/CheckCXXSourceRuns.cmake create mode 100755 Utilities/Doxygen/doc_class2onlineexamples.py create mode 100644 Utilities/Doxygen/doc_extra_stylesheet.css rename Utilities/DynamicAnalysis/{sanitizer_blacklist.txt.in => sanitizer_ignore.txt.in} (100%) create mode 100644 Utilities/KWSys/vtksys/Status.cxx create mode 100644 Utilities/KWSys/vtksys/Status.hxx.in create mode 100644 Utilities/KWSys/vtksys/testStatus.cxx delete mode 100755 Utilities/Maintenance/release/backport-commits-for-milestone.py delete mode 100644 Utilities/Maintenance/release/gitlabapi.py delete mode 100755 Utilities/Maintenance/release/make-changelog.sh delete mode 100755 Utilities/Maintenance/release/prep-emails.py delete mode 100755 Utilities/Maintenance/release/send-emails.sh create mode 100755 Utilities/Maintenance/vtk_generate_pyi.py create mode 100644 Utilities/MetaIO/.clang-tidy delete mode 100644 Utilities/MetaIO/vtkmetaio/metaITKUtils.h delete mode 100644 Utilities/MetaIO/vtkmetaio/metaOutput.cxx delete mode 100644 Utilities/MetaIO/vtkmetaio/metaOutput.h delete mode 100755 Utilities/Scripts/git-gerrit-push delete mode 100644 Wrapping/Java/JavaInstall.cmake.in create mode 100644 Wrapping/Python/Testing/CMakeLists.txt create mode 100644 Wrapping/Python/Testing/Python/CMakeLists.txt create mode 100755 Wrapping/Python/Testing/Python/TestErrorObserver.py delete mode 100644 Wrapping/Python/vtkmodules/__init__.py create mode 100644 Wrapping/Python/vtkmodules/__init__.py.in create mode 100644 Wrapping/Python/vtkmodules/test/ErrorObserver.py create mode 100644 Wrapping/PythonCore/README.md create mode 100644 Wrapping/Tools/README.md delete mode 100644 Wrapping/Tools/README.txt create mode 100644 Wrapping/Tools/vtkParseAttributes.h create mode 100644 Wrapping/Tools/vtkParseSystem.c create mode 100644 Wrapping/Tools/vtkParseSystem.h diff --git a/.clang-format b/.clang-format index c9c2c4936..dd7e30b82 100644 --- a/.clang-format +++ b/.clang-format @@ -1,5 +1,9 @@ +# Note: if you change any of the settings here, please reformat the entire +# codebase as part of the same commit, that will prevent subsequent commits +# from being flagged as being improperly formatted. + --- -# This configuration requires clang-format 4.0 or higher. +# This configuration requires clang-format 8.0 or higher. BasedOnStyle: Mozilla AlignAfterOpenBracket: DontAlign AlignOperands: false @@ -10,5 +14,13 @@ BinPackArguments: true BinPackParameters: true ColumnLimit: 100 SpaceAfterTemplateKeyword: true -Standard: Cpp03 +Standard: Cpp11 +StatementMacros: +- PyObject_HEAD +- PyObject_VAR_HEAD +- vtkAbstractTypeMacro +- vtkTypeMacro +- vtkBaseTypeMacro +- vtkAbstractTemplateTypeMacro +- vtkAbstractTypeMacroWithNewInstanceType ... diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 000000000..70caa8e2d --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,93 @@ +--- +Checks: "-*,\ +boost-*,\ +bugprone-*,\ +-bugprone-argument-comment,\ +-bugprone-branch-clone,\ +-bugprone-fold-init-type,\ +-bugprone-incorrect-roundings,\ +-bugprone-infinite-loop,\ +-bugprone-integer-division,\ +-bugprone-macro-parentheses,\ +-bugprone-misplaced-widening-cast,\ +-bugprone-narrowing-conversions,\ +-bugprone-not-null-terminated-result,\ +-bugprone-reserved-identifier,\ +-bugprone-signed-char-misuse,\ +-bugprone-unhandled-self-assignment,\ +clang-analyzer-*,\ +-clang-analyzer-core.CallAndMessage,\ +-clang-analyzer-core.DivideZero,\ +-clang-analyzer-core.NonNullParamChecker,\ +-clang-analyzer-core.NullDereference,\ +-clang-analyzer-core.UndefinedBinaryOperatorResult,\ +-clang-analyzer-core.VLASize,\ +-clang-analyzer-core.uninitialized.ArraySubscript,\ +-clang-analyzer-core.uninitialized.Assign,\ +-clang-analyzer-core.uninitialized.Branch,\ +-clang-analyzer-cplusplus.Move,\ +-clang-analyzer-cplusplus.NewDelete,\ +-clang-analyzer-cplusplus.NewDeleteLeaks,\ +-clang-analyzer-cplusplus.PlacementNew,\ +-clang-analyzer-deadcode.DeadStores,\ +-clang-analyzer-optin.cplusplus.UninitializedObject,\ +-clang-analyzer-optin.cplusplus.VirtualCall,\ +-clang-analyzer-optin.mpi.MPI-Checker,\ +-clang-analyzer-optin.portability.UnixAPI,\ +-clang-analyzer-security.FloatLoopCounter,\ +-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,\ +-clang-analyzer-security.insecureAPI.strcpy,\ +-clang-analyzer-unix.Malloc,\ +-clang-analyzer-unix.MallocSizeof,\ +-clang-analyzer-unix.MismatchedDeallocator,\ +-clang-analyzer-valist.Unterminated,\ +misc-*,\ +-misc-no-recursion,\ +-misc-non-private-member-variables-in-classes,\ +-misc-redundant-expression,\ +-misc-throw-by-value-catch-by-reference,\ +-misc-unconventional-assign-operator,\ +-misc-unused-parameters,\ +-misc-unused-using-decls,\ +modernize-*,\ +-modernize-avoid-c-arrays,\ +-modernize-deprecated-headers,\ +-modernize-loop-convert,\ +-modernize-make-unique,\ +-modernize-pass-by-value,\ +-modernize-raw-string-literal,\ +-modernize-replace-random-shuffle,\ +-modernize-return-braced-init-list,\ +-modernize-use-auto,\ +-modernize-use-default-member-init,\ +-modernize-use-equals-delete,\ +-modernize-use-trailing-return-type,\ +-modernize-use-using,\ +mpi-*,\ +openmp-*,\ +performance-*,\ +-performance-inefficient-string-concatenation,\ +-performance-type-promotion-in-math-fn,\ +-performance-unnecessary-value-param,\ +portability-*,\ +readability-*,\ +-readability-braces-around-statements,\ +-readability-convert-member-functions-to-static,\ +-readability-else-after-return,\ +-readability-function-size,\ +-readability-implicit-bool-conversion,\ +-readability-inconsistent-declaration-parameter-name,\ +-readability-isolate-declaration,\ +-readability-magic-numbers,\ +-readability-make-member-function-const,\ +-readability-named-parameter,\ +-readability-non-const-parameter,\ +-readability-qualified-auto,\ +-readability-redundant-declaration,\ +-readability-redundant-preprocessor,\ +-readability-simplify-boolean-expr,\ +-readability-uppercase-literal-suffix,\ +-readability-use-anyofallof,\ +" +#WarningsAsErrors: "*" +... diff --git a/.kitware-release-paraview.json b/.kitware-release-paraview.json new file mode 100644 index 000000000..57c540d82 --- /dev/null +++ b/.kitware-release-paraview.json @@ -0,0 +1,11 @@ +{ + "release_user": "kwrobot.release.paraview", + "project": "vtk/vtk", + "target_branch": "paraview/release", + "maintainers": [ + "ben.boeckel", + "cory.quammen", + "utkarsh.ayachit", + "vbolea" + ] +} diff --git a/Accelerators/Vtkm/CMakeLists.txt b/Accelerators/Vtkm/CMakeLists.txt deleted file mode 100644 index b8d9b03fb..000000000 --- a/Accelerators/Vtkm/CMakeLists.txt +++ /dev/null @@ -1,178 +0,0 @@ -##============================================================================= -## -## Copyright (c) Kitware, Inc. -## All rights reserved. -## See LICENSE.txt for details. -## -## This software is distributed WITHOUT ANY WARRANTY; without even -## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -## PURPOSE. See the above copyright notice for more information. -## -## Copyright 2012 Sandia Corporation. -## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -## the U.S. Government retains certain rights in this software. -## -##============================================================================= - -list(INSERT 0 CMAKE_MODULE_PATH - "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") - -set(sources - vtkmlib/ArrayConvertersReal.cxx - vtkmlib/ArrayConvertersSigned.cxx - vtkmlib/ArrayConvertersUnsigned.cxx) - -set(headers - vtkmFilterPolicy.h) - -set(private_headers - vtkmlib/ArrayConverters.hxx - vtkmlib/Portals.hxx - vtkmlib/PortalTraits.h - vtkmDataArray.hxx) - -set(impl_classes - vtkmAverageToCells - vtkmAverageToPoints - vtkmCleanGrid - vtkmClip - vtkmContour - vtkmCoordinateSystemTransform - vtkmDataArray - vtkmDataSet - vtkmExternalFaces - vtkmExtractVOI - vtkmGradient - vtkmHistogram - vtkmImageConnectivity - vtkmLevelOfDetail - vtkmNDHistogram - vtkmPointElevation - vtkmPointTransform - vtkmPolyDataNormals - vtkmProbe - vtkmThreshold - vtkmTriangleMeshPointNormals - vtkmWarpScalar - vtkmWarpVector - ) - -set(private_impl_classes - vtkmlib/ArrayConverters - vtkmlib/CellSetConverters - vtkmlib/DataSetConverters - vtkmlib/ImageDataConverter - vtkmlib/ImplicitFunctionConverter - vtkmlib/PolyDataConverter - vtkmlib/Portals - vtkmlib/UnstructuredGridConverter) - -foreach (class IN LISTS impl_classes) - list(APPEND sources "${class}.cxx") - list(APPEND headers "${class}.h") -endforeach () - -foreach (class IN LISTS private_impl_classes) - list(APPEND sources "${class}.cxx") - list(APPEND private_headers "${class}.h") -endforeach () - - -set(VTKM_FILTER_INCLUDE_AOS ${VTK_DISPATCH_AOS_ARRAYS}) -set(VTKM_FILTER_INCLUDE_SOA ${VTK_DISPATCH_SOA_ARRAYS}) -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/vtkmConfig.h.in" - "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfig.h" - @ONLY) - -list(APPEND headers - "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfig.h") - -if (TARGET vtkm::cuda) - enable_language(CUDA) - - # XXX(cmake#7519): Workaround for CMake which causes the c++11 flag set for - # VTK-m using target_compile_features to not work. - if (CMAKE_VERSION VERSION_LESS 3.11) - set(CMAKE_CUDA_STANDARD 11) - set(CMAKE_CUDA_STANDARD_REQUIRED True) - endif() - - # Temporarily suppress "has address taken but no possible call to it" warnings, - # until we figure out its implications. - # We are disabling all warnings as nvlink has no known way to suppress - # individual warning types. - string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w") -endif () - -if(TARGET vtkm::cuda AND BUILD_SHARED_LIBS) - message("Cuda is enabled. Module VTK::AcceleratorsVTKm will be forced to build as static.") - vtk_module_add_module(VTK::AcceleratorsVTKm - FORCE_STATIC - SOURCES ${sources} - HEADERS ${headers} - PRIVATE_HEADERS ${private_headers}) -else() - vtk_module_add_module(VTK::AcceleratorsVTKm - SOURCES ${sources} - HEADERS ${headers} - PRIVATE_HEADERS ${private_headers}) -endif() -_vtk_module_real_target(vtkm_accel_target VTK::AcceleratorsVTKm) -vtkm_add_target_information(${vtkm_accel_target} - EXTENDS_VTKM - MODIFY_CUDA_FLAGS - DEVICE_SOURCES ${sources}) - -vtk_module_set_property(VTK::AcceleratorsVTKm - PROPERTY JOB_POOL_COMPILE - VALUE vtkm_pool) -vtk_module_link(VTK::AcceleratorsVTKm - PRIVATE - vtkm_worklet - vtkm_filter) - -if (TARGET vtkm::cuda) - vtk_module_set_property(VTK::AcceleratorsVTKm - PROPERTY CUDA_SEPARABLE_COMPILATION - VALUE ON) - vtk_module_compile_options(VTK::AcceleratorsVTKm - PUBLIC $<$:-Xcudafe --diag_suppress=extra_semicolon>) -endif () - -# We need to install the private headers so that consumers of VTK can write -# new VTK-m filters and do data conversions correctly. -vtk_module_install_headers( - FILES ${private_headers} - SUBDIR "vtkmlib") - -if (MSVC) - set(msvc_warning_flags - # Generates numerous false positives with template code about unreachable - # code - /wd4702 - # Generates numerous warning that implicit assignment operators can't be - # constructed. This is understood and we don't care. - /wd4512 - # Generates numerous warning that implicit constructors can't be - # constructed. This is understood and we don't care. - /wd4510 - # Generates warnings when decorated names are over 4096 characters - # This compiler warning is deprecated and no longer occurs with VS2017+. - # So we suppress for VS2015 - /wd4503 - ) - set(vtkm_msvc_flags) - foreach (msvc_warning_flag IN LISTS msvc_warning_flags) - if (TARGET vtkm::cuda) - list(APPEND vtkm_msvc_flags - $<$:-Xcompiler=${msvc_warning_flag},${msvc_warning_flag}>) - else () - list(APPEND vtkm_msvc_flags - ${msvc_warning_flag}) - endif () - endforeach () - vtk_module_compile_options(VTK::AcceleratorsVTKm - PRIVATE - ${msvc_warning_flags}) -endif () diff --git a/Accelerators/Vtkm/Core/CMakeLists.txt b/Accelerators/Vtkm/Core/CMakeLists.txt new file mode 100644 index 000000000..c02980a82 --- /dev/null +++ b/Accelerators/Vtkm/Core/CMakeLists.txt @@ -0,0 +1,115 @@ +##============================================================================= +## +## Copyright (c) Kitware, Inc. +## All rights reserved. +## See LICENSE.txt for details. +## +## This software is distributed WITHOUT ANY WARRANTY; without even +## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +## PURPOSE. See the above copyright notice for more information. +## +## Copyright 2012 Sandia Corporation. +## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +## the U.S. Government retains certain rights in this software. +## +##============================================================================= + +list(INSERT CMAKE_MODULE_PATH 0 + "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") + +set(private_headers + vtkmlib/DataArrayConverters.hxx + vtkmlib/Portals.hxx + vtkmlib/PortalTraits.h) + +set(impl_classes + vtkmDataArray + ) + +set(nowrap_classes + vtkmlib/DataArrayConverters + vtkmlib/Portals) + +set(nowrap_headers + vtkmlib/vtkmDataArray.hxx) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/vtkmConfigCore.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfigCore.h" + @ONLY) + +list(APPEND headers + "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfigCore.h") + +if (TARGET vtkm::cuda) + enable_language(CUDA) + + # Temporarily suppress "has address taken but no possible call to it" warnings, + # until we figure out its implications. + # We are disabling all warnings as nvlink has no known way to suppress + # individual warning types. + string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w") +endif () + +set(force_static) +if (TARGET vtkm::cuda AND BUILD_SHARED_LIBS) + set(force_static FORCE_STATIC) +endif () + +vtk_module_add_module(VTK::AcceleratorsVTKmCore + ${force_static} + HEADER_DIRECTORIES + SOURCES ${sources} + HEADERS ${headers} + CLASSES ${impl_classes} + NOWRAP_HEADERS ${nowrap_headers} + NOWRAP_CLASSES ${nowrap_classes} + PRIVATE_HEADERS ${private_headers}) +_vtk_module_real_target(vtkm_accel_target VTK::AcceleratorsVTKmCore) +vtkm_add_target_information(${vtkm_accel_target} + EXTENDS_VTKM + MODIFY_CUDA_FLAGS + DEVICE_SOURCES ${sources}) + +vtk_module_set_property(VTK::AcceleratorsVTKmCore + PROPERTY JOB_POOL_COMPILE + VALUE vtkm_pool) + +if (TARGET vtkm::cuda) + vtk_module_set_property(VTK::AcceleratorsVTKmCore + PROPERTY CUDA_SEPARABLE_COMPILATION + VALUE ON) + vtk_module_compile_options(VTK::AcceleratorsVTKmCore + PUBLIC $<$:-Xcudafe --diag_suppress=extra_semicolon>) +endif () + +if (MSVC) + set(msvc_warning_flags + # Generates numerous false positives with template code about unreachable + # code + /wd4702 + # Generates numerous warning that implicit assignment operators can't be + # constructed. This is understood and we don't care. + /wd4512 + # Generates numerous warning that implicit constructors can't be + # constructed. This is understood and we don't care. + /wd4510 + # Generates warnings when decorated names are over 4096 characters + # This compiler warning is deprecated and no longer occurs with VS2017+. + # So we suppress for VS2015 + /wd4503 + ) + set(vtkm_msvc_flags) + foreach (msvc_warning_flag IN LISTS msvc_warning_flags) + if (TARGET vtkm::cuda) + list(APPEND vtkm_msvc_flags + $<$:-Xcompiler=${msvc_warning_flag},${msvc_warning_flag}>) + else () + list(APPEND vtkm_msvc_flags + ${msvc_warning_flag}) + endif () + endforeach () + vtk_module_compile_options(VTK::AcceleratorsVTKmCore + PRIVATE + ${vtkm_msvc_flags}) +endif () diff --git a/Accelerators/Vtkm/Core/Testing/CMakeLists.txt b/Accelerators/Vtkm/Core/Testing/CMakeLists.txt new file mode 100644 index 000000000..35f9732a9 --- /dev/null +++ b/Accelerators/Vtkm/Core/Testing/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(Cxx) diff --git a/Accelerators/Vtkm/Core/Testing/Cxx/CMakeLists.txt b/Accelerators/Vtkm/Core/Testing/Cxx/CMakeLists.txt new file mode 100644 index 000000000..f300e06d3 --- /dev/null +++ b/Accelerators/Vtkm/Core/Testing/Cxx/CMakeLists.txt @@ -0,0 +1,36 @@ +# We are splitting the tests into two executables to workaround an issue in +# cuda. With all the tests in the same executable several tests are failing +# in cuda. We have not identified the root cause of the problem yet. +vtk_add_test_cxx(vtkAcceleratorsVTKmCoreCxxTests tests + TestVTKMDataArray.cxx,NO_VALID + TestVTKMImplicitDataArray.cxx,VALID + ) + +if (TARGET vtkm::cuda) + #the enable_language call is scoped! so we have to re-enable + #cuda in the test directory + enable_language(CUDA) + foreach(src IN LISTS tests) + set_source_files_properties(${src}.cxx PROPERTIES LANGUAGE "CUDA") + endforeach() + + #the tests aren't scoped as a child directory of vtkAcceleratorsVTKmCore + #so we need to redo this logic + vtkm_get_cuda_flags(CMAKE_CUDA_FLAGS) + + # Temporarily suppress "has address taken but no possible call to it" warnings, + # until we figure out its implications. + # We are disabling all warnings as nvlink has no known way to suppress + # individual warning types. + string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w") +endif() + +vtk_test_cxx_executable(vtkAcceleratorsVTKmCoreCxxTests tests + RENDERING_FACTORY + ) + +if (TARGET vtkm::cuda) + # When cuda is enabled VTK::AcceleratorsVTKmCore is built statically but with fpic + # enabled so the tests are also built with fpic enabled + set_target_properties(vtkAcceleratorsVTKmCoreCxxTests PROPERTIES POSITION_INDEPENDENT_CODE ON) +endif() diff --git a/Accelerators/Vtkm/Core/Testing/Cxx/TestVTKMDataArray.cxx b/Accelerators/Vtkm/Core/Testing/Cxx/TestVTKMDataArray.cxx new file mode 100644 index 000000000..ebff69843 --- /dev/null +++ b/Accelerators/Vtkm/Core/Testing/Cxx/TestVTKMDataArray.cxx @@ -0,0 +1,106 @@ +#include "vtkSmartPointer.h" +#include "vtkmDataArray.h" + +#include +#include +#include + +#include + +namespace +{ + +//------------------------------------------------------------------------------ +class TestError +{ +public: + TestError(const std::string& message, int line) + : Message(message) + , Line(line) + { + } + + void PrintMessage(std::ostream& out) const + { + out << "Error at line " << this->Line << ": " << this->Message << "\n"; + } + +private: + std::string Message; + int Line; +}; + +#define RAISE_TEST_ERROR(msg) throw TestError((msg), __LINE__) + +#define TEST_VERIFY(cond, msg) \ + if (!(cond)) \ + RAISE_TEST_ERROR((msg)) + +inline bool IsEqualFloat(double a, double b, double e = 1e-6f) +{ + return (std::abs(a - b) <= e); +} + +//------------------------------------------------------------------------------ +template +void TestWithArrayHandle(const ArrayHandleType& vtkmArray) +{ + vtkSmartPointer vtkArray; + vtkArray.TakeReference(make_vtkmDataArray(vtkmArray)); + + auto vtkmPortal = vtkmArray.ReadPortal(); + + vtkIdType length = vtkArray->GetNumberOfTuples(); + std::cout << "Length: " << length << "\n"; + TEST_VERIFY(length == vtkmArray.GetNumberOfValues(), "Array lengths don't match"); + + int numberOfComponents = vtkArray->GetNumberOfComponents(); + std::cout << "Number of components: " << numberOfComponents << "\n"; + TEST_VERIFY(numberOfComponents == + internal::FlattenVec::GetNumberOfComponents( + vtkmPortal.Get(0)), + "Number of components don't match"); + + for (vtkIdType i = 0; i < length; ++i) + { + double tuple[9]; + vtkArray->GetTuple(i, tuple); + auto val = vtkmPortal.Get(i); + for (int j = 0; j < numberOfComponents; ++j) + { + auto comp = internal::FlattenVec::GetComponent(val, j); + TEST_VERIFY(IsEqualFloat(tuple[j], static_cast(comp)), "values don't match"); + TEST_VERIFY(IsEqualFloat(vtkArray->GetComponent(i, j), static_cast(comp)), + "values don't match"); + } + } +} + +} // anonymous namespace + +//------------------------------------------------------------------------------ +int TestVTKMDataArray(int, char*[]) +try +{ + static const std::vector testData = { 3.0, 6.0, 2.0, 5.0, 1.0, 0.0, 4.0 }; + + std::cout << "Testing with Basic ArrayHandle\n"; + TestWithArrayHandle(vtkm::cont::make_ArrayHandle(testData, vtkm::CopyFlag::Off)); + std::cout << "Passed\n"; + + std::cout << "Testing with ArrayHandleConstant\n"; + TestWithArrayHandle(vtkm::cont::make_ArrayHandleConstant( + vtkm::Vec, 3>{ { 1.0f, 2.0f, 3.0f } }, 10)); + std::cout << "Passed\n"; + + std::cout << "Testing with ArrayHandleUniformPointCoordinates\n"; + TestWithArrayHandle(vtkm::cont::ArrayHandleUniformPointCoordinates(vtkm::Id3{ 3 })); + std::cout << "Passed\n"; + + return EXIT_SUCCESS; +} +catch (const TestError& e) +{ + e.PrintMessage(std::cout); + return 1; +} diff --git a/Accelerators/Vtkm/Core/Testing/Cxx/TestVTKMImplicitDataArray.cxx b/Accelerators/Vtkm/Core/Testing/Cxx/TestVTKMImplicitDataArray.cxx new file mode 100644 index 000000000..2e87ef567 --- /dev/null +++ b/Accelerators/Vtkm/Core/Testing/Cxx/TestVTKMImplicitDataArray.cxx @@ -0,0 +1,99 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +//------------------------------------------------------------------------------ +int TestVTKMImplicitDataArray(int, char*[]) +{ + // typedef std::function&)> ScalarFunction; + using ScalarFunction = double(const std::array&); + + ScalarFunction* function = [](const std::array& p) { + return sqrt(p[0] * p[0] + p[1] * p[1] + p[2] * p[2]); + }; + + std::size_t dimension = 10; + + vtkNew imageData; + { + std::array boundingBox = { 0, 3, 0, 3, 0, 2 }; + imageData->SetDimensions( + static_cast(dimension), static_cast(dimension), static_cast(dimension)); + imageData->SetSpacing((boundingBox[1] - boundingBox[0]) / dimension, + (boundingBox[3] - boundingBox[2]) / dimension, (boundingBox[5] - boundingBox[4]) / dimension); + imageData->SetOrigin(boundingBox[0], boundingBox[2], boundingBox[4]); + } + + vtkImageData* imageDataPtr = imageData.Get(); + + struct Shim + { + Shim() = default; + Shim(ScalarFunction* f, vtkImageData* i) + : function(f) + , imageDataPtr(i) + { + } + + ScalarFunction* function = nullptr; + vtkImageData* imageDataPtr = nullptr; + + double operator()(vtkm::Id i) const + { + std::array p; + imageDataPtr->GetPoint(i, p.data()); + return function(p); + } + }; + + vtkNew> array; + array->SetVtkmArrayHandle( + vtkm::cont::make_ArrayHandleImplicit(Shim(function, imageDataPtr), std::pow(dimension, 3))); + + imageData->GetPointData()->SetScalars(array); + + vtkNew renderWindow; + vtkNew renderer; + renderWindow->AddRenderer(renderer); + renderer->ResetCamera(); + + vtkNew renderWindowInteractor; + renderWindowInteractor->SetRenderWindow(renderWindow); + + vtkNew planeWidgetZ; + + planeWidgetZ->GetReslice()->SetInterpolator(vtkNew()); + vtkGenericImageInterpolator::SafeDownCast(planeWidgetZ->GetReslice()->GetInterpolator()) + ->SetInterpolationModeToLinear(); + planeWidgetZ->GetReslice()->GetInterpolator()->Update(); + planeWidgetZ->SetInteractor(renderWindowInteractor); + planeWidgetZ->SetKeyPressActivationValue('x'); + planeWidgetZ->SetUseContinuousCursor(true); + planeWidgetZ->GetPlaneProperty()->SetColor(1, 0, 0); + planeWidgetZ->SetInputData(imageData); + planeWidgetZ->SetPlaneOrientationToZAxes(); + planeWidgetZ->SetSliceIndex(1); + planeWidgetZ->DisplayTextOn(); + planeWidgetZ->On(); + planeWidgetZ->InteractionOff(); + planeWidgetZ->InteractionOn(); + + renderWindow->Render(); + renderWindowInteractor->Start(); + + return EXIT_SUCCESS; +} diff --git a/Accelerators/Vtkm/Core/Testing/Data/Baseline/TestVTKMImplicitDataArray.png.sha512 b/Accelerators/Vtkm/Core/Testing/Data/Baseline/TestVTKMImplicitDataArray.png.sha512 new file mode 100644 index 000000000..3a807f09d --- /dev/null +++ b/Accelerators/Vtkm/Core/Testing/Data/Baseline/TestVTKMImplicitDataArray.png.sha512 @@ -0,0 +1 @@ +680044a43b74ca48453cb1ed2067e568e7e235b8a1597dda42c31cba06fff023ae0a1b214ceff18b67828c7f66c1fca2b273c143e69dc0b70284b506fdef72ba diff --git a/Accelerators/Vtkm/Core/vtk.module b/Accelerators/Vtkm/Core/vtk.module new file mode 100644 index 000000000..d92e36179 --- /dev/null +++ b/Accelerators/Vtkm/Core/vtk.module @@ -0,0 +1,25 @@ +NAME + VTK::AcceleratorsVTKmCore +LIBRARY_NAME + vtkAcceleratorsVTKmCore +DESCRIPTION + VTKm data structures +DEPENDS + VTK::CommonCore + VTK::vtkm +TEST_DEPENDS + VTK::CommonSystem + VTK::FiltersSources + VTK::IOImage + VTK::IOLegacy + VTK::IOPLY + VTK::IOXML + VTK::ImagingHybrid + VTK::ImagingSources + VTK::InteractionStyle + VTK::InteractionWidgets + VTK::RenderingFreeType + VTK::RenderingOpenGL2 + VTK::RenderingVolumeOpenGL2 + VTK::TestingCore + VTK::TestingRendering diff --git a/Accelerators/Vtkm/Core/vtkmConfigCore.h.in b/Accelerators/Vtkm/Core/vtkmConfigCore.h.in new file mode 100644 index 000000000..e5af3e33b --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmConfigCore.h.in @@ -0,0 +1,55 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: ObjectFactory.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#ifndef vtkConfigCore_h +#define vtkConfigCore_h + +/*--------------------------------------------------------------------------*/ +/* Other Configuration Options */ + +#include +#include "vtkAcceleratorsVTKmCoreModule.h" //required for correct implementation + + +/*--------------------------------------------------------------------------*/ +/* Make sure we use the same id's in VTK and VTK-m */ +#include "vtkType.h" +#ifdef VTK_USE_64BIT_IDS +# ifndef VTKM_USE_64BIT_IDS +# error VTK was defined with 64-bit ids but VTK-m with 32-bit ids. +# endif +#else // !VTK_USE_64BIT_IDS +# ifdef VTKM_USE_64BIT_IDS +# error VTK was defined with 32-bit ids but VTK-m with 64-bit ids. +# endif +#endif + + +#ifndef VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT +# if !defined(VTKACCELERATORSVTKMCORE_STATIC_DEFINE) && defined(_MSC_VER) + /* Warning C4910 on windows state that extern explicit template can't be + labeled with __declspec(dllexport). So that is why we use a new custom + define. But when other modules ( e.g. rendering ) include this header + we need them to see that the extern template is actually being imported. + */ + /* We are building this library with MSVC */ +# define VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT +# else + /* Defer to the config module */ +# define VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT VTKACCELERATORSVTKMCORE_EXPORT +# endif +#endif + + +#endif // vtkConfigCore_h diff --git a/Accelerators/Vtkm/Core/vtkmDataArray.cxx b/Accelerators/Vtkm/Core/vtkmDataArray.cxx new file mode 100644 index 000000000..6e2aa0600 --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmDataArray.cxx @@ -0,0 +1,36 @@ +//============================================================================ +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2019 Sandia Corporation. +// Copyright 2019 UT-Battelle, LLC. +// Copyright 2019 Los Alamos National Security. +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National +// Laboratory (LANL), the U.S. Government retains certain rights in +// this software. +//============================================================================ +#define vtkmDataArray_cxx + +#include "vtkmDataArray.h" + +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArray; diff --git a/Accelerators/Vtkm/Core/vtkmDataArray.h b/Accelerators/Vtkm/Core/vtkmDataArray.h new file mode 100644 index 000000000..d85af65ea --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmDataArray.h @@ -0,0 +1,128 @@ +//============================================================================ +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2019 Sandia Corporation. +// Copyright 2019 UT-Battelle, LLC. +// Copyright 2019 Los Alamos National Security. +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National +// Laboratory (LANL), the U.S. Government retains certain rights in +// this software. +//============================================================================ +#ifndef __VTK_WRAP__ +#ifndef VTK_WRAPPING_CXX + +#ifndef vtkmDataArray_h +#define vtkmDataArray_h + +#include "vtkAcceleratorsVTKmCoreModule.h" // For export macro +#include "vtkGenericDataArray.h" +#include "vtkmConfigCore.h" // For template export + +#include // For vtkm::List +#include // For vtkm::VecFromPortal +#include // For vtkm::VecTraits +#include // For vtkm::cont::ArrayHandle +#include // For vtkm::cont::UnknownArrayHandle + +#include // For unique_ptr + +namespace internal +{ + +template +class ArrayHandleWrapperBase; + +} // internal + +template +class vtkmDataArray : public vtkGenericDataArray, T> +{ + static_assert(std::is_arithmetic::value, "T must be an integral or floating-point type"); + + using GenericDataArrayType = vtkGenericDataArray, T>; + +public: + using SelfType = vtkmDataArray; + vtkTemplateTypeMacro(SelfType, GenericDataArrayType); + + using typename Superclass::ValueType; + + using VtkmTypesList = vtkm::List, vtkm::Vec, vtkm::Vec, + vtkm::VecFromPortal::WritePortalType>>; + + static vtkmDataArray* New(); + + template + void SetVtkmArrayHandle(const vtkm::cont::ArrayHandle& ah); + + vtkm::cont::UnknownArrayHandle GetVtkmUnknownArrayHandle() const; + + /// concept methods for \c vtkGenericDataArray + ValueType GetValue(vtkIdType valueIdx) const; + void SetValue(vtkIdType valueIdx, ValueType value); + void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const; + void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple); + ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const; + void SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value); + +protected: + vtkmDataArray(); + ~vtkmDataArray() override; + + /// concept methods for \c vtkGenericDataArray + bool AllocateTuples(vtkIdType numTuples); + bool ReallocateTuples(vtkIdType numTuples); + +private: + vtkmDataArray(const vtkmDataArray&) = delete; + void operator=(const vtkmDataArray&) = delete; + + // To access AllocateTuples and ReallocateTuples + friend Superclass; + + std::unique_ptr> VtkmArray; +}; + +//============================================================================= +template +inline vtkmDataArray::BaseComponentType>* make_vtkmDataArray( + const vtkm::cont::ArrayHandle& ah) +{ + auto ret = vtkmDataArray::BaseComponentType>::New(); + ret->SetVtkmArrayHandle(ah); + return ret; +} + +//============================================================================= +#ifndef vtkmDataArray_cxx +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT vtkmDataArray; +#endif // vtkmDataArray_cxx + +#endif // vtkmDataArray_h + +#include "vtkmlib/vtkmDataArray.hxx" + +#endif +#endif +// VTK-HeaderTest-Exclude: vtkmDataArray.h diff --git a/Accelerators/Vtkm/Core/vtkmFilterPolicy.h b/Accelerators/Vtkm/Core/vtkmFilterPolicy.h new file mode 100644 index 000000000..91d91c337 --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmFilterPolicy.h @@ -0,0 +1,48 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmFilterPolicy_h +#define vtkmFilterPolicy_h +#ifndef __VTK_WRAP__ +#ifndef VTK_WRAPPING_CXX + +#include "vtkmConfigCore.h" //required for general vtkm setup + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//------------------------------------------------------------------------------ +class vtkmOutputFilterPolicy : public vtkm::filter::PolicyBase +{ +public: + using FieldTypeList = tovtkm::FieldTypeOutVTK; + + using StructuredCellSetList = tovtkm::CellListStructuredOutVTK; + using UnstructuredCellSetList = tovtkm::CellListUnstructuredOutVTK; + using AllCellSetList = tovtkm::CellListAllOutVTK; +}; + +#endif +#endif +#endif +// VTK-HeaderTest-Exclude: vtkmFilterPolicy.h diff --git a/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.cxx b/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.cxx new file mode 100644 index 000000000..a72f65198 --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.cxx @@ -0,0 +1,215 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "DataArrayConverters.hxx" + +#include "vtkmDataArray.h" +#include "vtkmFilterPolicy.h" + +#include "vtkmlib/PortalTraits.h" + +#include +#include + +#include "vtkDataArray.h" +#include "vtkPoints.h" + +namespace fromvtkm +{ + +namespace +{ + +struct ArrayConverter +{ +public: + mutable vtkDataArray* Data; + + ArrayConverter() + : Data(nullptr) + { + } + + // CastAndCall always passes a const array handle. Just shallow copy to a + // local array handle by taking by value. + + template + void operator()(vtkm::cont::ArrayHandle handle) const + { + this->Data = make_vtkmDataArray(handle); + } + + template + void operator()(vtkm::cont::ArrayHandle handle) const + { + // we can steal this array! + using Traits = tovtkm::vtkPortalTraits; // Handles Vec properly + using ValueType = typename Traits::ComponentType; + using VTKArrayType = vtkAOSDataArrayTemplate; + + if (handle.GetNumberOfBuffers() == 0) + { + return; + } + + VTKArrayType* array = VTKArrayType::New(); + array->SetNumberOfComponents(Traits::NUM_COMPONENTS); + + handle.SyncControlArray(); + const vtkm::Id size = handle.GetNumberOfValues() * Traits::NUM_COMPONENTS; + auto bufferInfo = handle.GetBuffers()[0].GetHostBufferInfo(); + + vtkm::cont::internal::TransferredBuffer transfer = bufferInfo.TransferOwnership(); + auto srcMemory = reinterpret_cast(transfer.Memory); + if (transfer.Memory == transfer.Container) + { // transfer the memory ownership over to VTK instead of copy + array->SetVoidArray(srcMemory, size, 0, vtkAbstractArray::VTK_DATA_ARRAY_USER_DEFINED); + array->SetArrayFreeFunction(transfer.Delete); + } + else + { + // deep copy the memory to VTK as the memory coming from + // a source that VTK can't represent + ValueType* dataBuffer = new ValueType[size]; + std::copy(srcMemory, srcMemory + size, dataBuffer); + + array->SetVoidArray(dataBuffer, size, 0, vtkAbstractArray::VTK_DATA_ARRAY_DELETE); + transfer.Delete(transfer.Container); + } + + this->Data = array; + } + + template + void operator()(vtkm::cont::ArrayHandle handle) const + { + // we can steal this array! + using Traits = tovtkm::vtkPortalTraits; // Handles Vec properly + using ValueType = typename Traits::ComponentType; + using VTKArrayType = vtkSOADataArrayTemplate; + + if (handle.GetNumberOfBuffers() != Traits::NUM_COMPONENTS) + { + return; + } + + VTKArrayType* array = VTKArrayType::New(); + array->SetNumberOfComponents(Traits::NUM_COMPONENTS); + + handle.SyncControlArray(); + auto buffers = handle.GetBuffers(); + const vtkm::Id size = handle.GetNumberOfValues(); + + for (vtkm::IdComponent i = 0; i < Traits::NUM_COMPONENTS; ++i) + { + auto bufferInfo = buffers[i].GetHostBufferInfo(); + + vtkm::cont::internal::TransferredBuffer transfer = bufferInfo.TransferOwnership(); + auto srcMemory = reinterpret_cast(transfer.Memory); + if (transfer.Memory == transfer.Container) + { // transfer the memory ownership over to VTK instead of copy + array->SetArray(i, srcMemory, size, true, 0, vtkAbstractArray::VTK_DATA_ARRAY_USER_DEFINED); + array->SetArrayFreeFunction(i, transfer.Delete); + } + else + { + // deep copy the memory to VTK as the memory coming from + // a source that VTK can't represent + ValueType* dataBuffer = new ValueType[size]; + std::copy(srcMemory, srcMemory + size, dataBuffer); + + array->SetArray(i, dataBuffer, size, true, 0, vtkAbstractArray::VTK_DATA_ARRAY_DELETE); + transfer.Delete(transfer.Container); + } + } + + this->Data = array; + } +}; +} // anonymous namespace + +// Though the following conversion routines take const-ref parameters as input, +// the underlying storage will be stolen, whenever possible, instead of +// performing a full copy. +// Therefore, these routines should be treated as "moves" and the state of the +// input is undeterminisitic. + +vtkDataArray* Convert(const vtkm::cont::Field& input) +{ + // We need to do the conversion from Field to a known vtkm::cont::ArrayHandle + // after that we need to fill the vtkDataArray + vtkmOutputFilterPolicy policy; + vtkDataArray* data = nullptr; + ArrayConverter aConverter; + + try + { + vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicyFieldNotActive(input, policy), aConverter); + data = aConverter.Data; + if (data) + { + data->SetName(input.GetName().c_str()); + } + } + catch (vtkm::cont::Error&) + { + } + return data; +} + +vtkDataArray* Convert(const vtkm::cont::UnknownArrayHandle& input, const char* name) +{ + // We need to do the conversion from UnknownArrayHandle to a known vtkm::cont::ArrayHandle + // after that we need to fill the vtkDataArray + vtkDataArray* data = nullptr; + ArrayConverter aConverter; + + try + { + vtkm::cont::CastAndCall(input, aConverter); + data = aConverter.Data; + if (data && name) + { + data->SetName(name); + } + } + catch (vtkm::cont::Error&) + { + } + return data; +} + +vtkPoints* Convert(const vtkm::cont::CoordinateSystem& input) +{ + ArrayConverter aConverter; + vtkPoints* points = nullptr; + try + { + vtkm::cont::CastAndCall(input, aConverter); + vtkDataArray* pdata = aConverter.Data; + points = vtkPoints::New(); + points->SetData(pdata); + pdata->FastDelete(); + } + catch (vtkm::cont::Error& e) + { + vtkGenericWarningMacro("Converting vtkm::cont::CoordinateSystem to " + "vtkPoints failed: " + << e.what()); + } + return points; +} + +} diff --git a/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.h b/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.h new file mode 100644 index 000000000..5dc2a403b --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.h @@ -0,0 +1,136 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_DataArrayConverters_h +#define vtkmlib_DataArrayConverters_h + +#include "vtkAcceleratorsVTKmCoreModule.h" //required for correct implementation +#include "vtkmConfigCore.h" //required for general vtkm setup + +#include "vtkAOSDataArrayTemplate.h" +#include "vtkSOADataArrayTemplate.h" + +#include +#include +#include + +#include // for std::underlying_type + +class vtkDataArray; +class vtkPoints; + +namespace vtkm +{ +namespace cont +{ +class CoordinateSystem; +} +} + +namespace tovtkm +{ + +template +struct DataArrayToArrayHandle; + +template +struct DataArrayToArrayHandle, NumComponents> +{ + using ValueType = + typename std::conditional>::type; + using StorageType = vtkm::cont::internal::Storage; + using ArrayHandleType = vtkm::cont::ArrayHandle; + + static ArrayHandleType Wrap(vtkAOSDataArrayTemplate* input) + { + return vtkm::cont::make_ArrayHandle(reinterpret_cast(input->GetPointer(0)), + input->GetNumberOfTuples(), vtkm::CopyFlag::Off); + } +}; + +template +struct DataArrayToArrayHandle, NumComponents> +{ + using ValueType = vtkm::Vec; + using StorageType = vtkm::cont::internal::Storage; + using ArrayHandleType = vtkm::cont::ArrayHandle; + + static ArrayHandleType Wrap(vtkSOADataArrayTemplate* input) + { + vtkm::Id numValues = input->GetNumberOfTuples(); + vtkm::cont::ArrayHandleSOA handle; + for (vtkm::IdComponent i = 0; i < NumComponents; ++i) + { + handle.SetArray(i, + vtkm::cont::make_ArrayHandle(reinterpret_cast(input->GetComponentArrayPointer(i)), + numValues, vtkm::CopyFlag::Off)); + } + + return handle; + } +}; + +template +struct DataArrayToArrayHandle, 1> +{ + using StorageType = vtkm::cont::internal::Storage; + using ArrayHandleType = vtkm::cont::ArrayHandle; + + static ArrayHandleType Wrap(vtkSOADataArrayTemplate* input) + { + return vtkm::cont::make_ArrayHandle( + input->GetComponentArrayPointer(0), input->GetNumberOfTuples(), vtkm::CopyFlag::Off); + } +}; + +enum class FieldsFlag +{ + None = 0x0, + Points = 0x1, + Cells = 0x2, + + PointsAndCells = Points | Cells +}; + +} + +namespace fromvtkm +{ + +VTKACCELERATORSVTKMCORE_EXPORT +vtkDataArray* Convert(const vtkm::cont::Field& input); + +VTKACCELERATORSVTKMCORE_EXPORT +vtkDataArray* Convert(const vtkm::cont::UnknownArrayHandle& input, const char* name); + +VTKACCELERATORSVTKMCORE_EXPORT +vtkPoints* Convert(const vtkm::cont::CoordinateSystem& input); + +} + +inline tovtkm::FieldsFlag operator&(const tovtkm::FieldsFlag& a, const tovtkm::FieldsFlag& b) +{ + using T = std::underlying_type::type; + return static_cast(static_cast(a) & static_cast(b)); +} + +inline tovtkm::FieldsFlag operator|(const tovtkm::FieldsFlag& a, const tovtkm::FieldsFlag& b) +{ + using T = std::underlying_type::type; + return static_cast(static_cast(a) | static_cast(b)); +} + +#endif // vtkmlib_ArrayConverters_h diff --git a/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.hxx b/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.hxx new file mode 100644 index 000000000..5042087ea --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmlib/DataArrayConverters.hxx @@ -0,0 +1,74 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_DataArrayConverters_hxx +#define vtkmlib_DataArrayConverters_hxx + +#include "DataArrayConverters.h" + +#include + +#include "vtkDataArray.h" + +namespace tovtkm +{ + +template +vtkm::cont::UnknownArrayHandle vtkDataArrayToUnknownArrayHandle(DataArrayType* input) +{ + int numComps = input->GetNumberOfComponents(); + switch (numComps) + { + case 1: + return vtkm::cont::UnknownArrayHandle(DataArrayToArrayHandle::Wrap(input)); + case 2: + return vtkm::cont::UnknownArrayHandle(DataArrayToArrayHandle::Wrap(input)); + case 3: + return vtkm::cont::UnknownArrayHandle(DataArrayToArrayHandle::Wrap(input)); + case 4: + return vtkm::cont::UnknownArrayHandle(DataArrayToArrayHandle::Wrap(input)); + case 6: + return vtkm::cont::UnknownArrayHandle(DataArrayToArrayHandle::Wrap(input)); + case 9: + return vtkm::cont::UnknownArrayHandle(DataArrayToArrayHandle::Wrap(input)); + default: + { + vtkm::Id numTuples = input->GetNumberOfTuples(); + auto subHandle = DataArrayToArrayHandle::Wrap(input); + auto offsets = + vtkm::cont::ArrayHandleCounting(vtkm::Id(0), vtkm::Id(numComps), numTuples); + auto handle = vtkm::cont::make_ArrayHandleGroupVecVariable(subHandle, offsets); + return vtkm::cont::UnknownArrayHandle(handle); + } + } +} + +template +vtkm::cont::Field ConvertPointField(DataArrayType* input) +{ + auto vhandle = vtkDataArrayToUnknownArrayHandle(input); + return vtkm::cont::make_FieldPoint(input->GetName(), vhandle); +} + +template +vtkm::cont::Field ConvertCellField(DataArrayType* input) +{ + auto vhandle = vtkDataArrayToUnknownArrayHandle(input); + return vtkm::cont::make_FieldCell(input->GetName(), vhandle); +} + +} // tovtkm +#endif diff --git a/Accelerators/Vtkm/Core/vtkmlib/PortalTraits.h b/Accelerators/Vtkm/Core/vtkmlib/PortalTraits.h new file mode 100644 index 000000000..e536cf4bc --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmlib/PortalTraits.h @@ -0,0 +1,147 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_PortalTraits_h +#define vtkmlib_PortalTraits_h + +#include "vtkmConfigCore.h" //required for general vtkm setup + +#include +#include + +#include + +namespace tovtkm +{ + +struct vtkPortalOfVecOfVecValues; +struct vtkPortalOfVecOfValues; +struct vtkPortalOfScalarValues; + +template +struct vtkPortalTraits +{ + using TagType = vtkPortalOfScalarValues; + using ComponentType = typename std::remove_const::type; + using Type = ComponentType; + static constexpr vtkm::IdComponent NUM_COMPONENTS = 1; + + static inline void SetComponent(Type& t, vtkm::IdComponent, const ComponentType& v) { t = v; } + + static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent) { return t; } +}; + +template +struct vtkPortalTraits> +{ + using TagType = vtkPortalOfVecOfValues; + using ComponentType = typename std::remove_const::type; + using Type = vtkm::Vec; + static constexpr vtkm::IdComponent NUM_COMPONENTS = N; + + static inline void SetComponent(Type& t, vtkm::IdComponent i, const ComponentType& v) + { + VTKM_ASSUME((i >= 0 && i < N)); + t[i] = v; + } + + static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent i) + { + VTKM_ASSUME((i >= 0 && i < N)); + return t[i]; + } +}; + +template +struct vtkPortalTraits> +{ + using TagType = vtkPortalOfVecOfValues; + using ComponentType = typename std::remove_const::type; + using Type = vtkm::Vec; + static constexpr vtkm::IdComponent NUM_COMPONENTS = N; + + static inline void SetComponent(Type& t, vtkm::IdComponent i, const ComponentType& v) + { + VTKM_ASSUME((i >= 0 && i < N)); + t[i] = v; + } + + static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent i) + { + VTKM_ASSUME((i >= 0 && i < N)); + return t[i]; + } +}; + +template +struct vtkPortalTraits, M>> +{ + using TagType = vtkPortalOfVecOfVecValues; + using ComponentType = typename std::remove_const::type; + using Type = vtkm::Vec, M>; + static constexpr vtkm::IdComponent NUM_COMPONENTS = N * M; + + static constexpr vtkm::IdComponent NUM_COMPONENTS_OUTER = M; + static constexpr vtkm::IdComponent NUM_COMPONENTS_INNER = N; + + static inline void SetComponent(Type& t, vtkm::IdComponent i, const ComponentType& v) + { + VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS)); + // We need to convert i back to a 2d index + const vtkm::IdComponent j = i % N; + t[i / N][j] = v; + } + + static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent i) + { + VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS)); + // We need to convert i back to a 2d index + const vtkm::IdComponent j = i % N; + return t[i / N][j]; + } +}; + +template +struct vtkPortalTraits, M>> +{ + using TagType = vtkPortalOfVecOfVecValues; + using ComponentType = typename std::remove_const::type; + using Type = vtkm::Vec, M>; + static constexpr vtkm::IdComponent NUM_COMPONENTS = N * M; + + static constexpr vtkm::IdComponent NUM_COMPONENTS_OUTER = M; + static constexpr vtkm::IdComponent NUM_COMPONENTS_INNER = N; + + static inline void SetComponent(Type& t, vtkm::IdComponent i, const ComponentType& v) + { + VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS)); + // We need to convert i back to a 2d index + const vtkm::IdComponent j = i % N; + t[i / N][j] = v; + } + + static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent i) + { + VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS)); + // We need to convert i back to a 2d index + const vtkm::IdComponent j = i % N; + return t[i / N][j]; + } +}; + +} // namespace vtkmlib + +#endif // vtkmlib_PortalsTraits_h diff --git a/Accelerators/Vtkm/Core/vtkmlib/Portals.cxx b/Accelerators/Vtkm/Core/vtkmlib/Portals.cxx new file mode 100644 index 000000000..4a65a3b61 --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmlib/Portals.cxx @@ -0,0 +1,29 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#define vtkmlib_Portals_cxx +#include "Portals.h" + +#include + +namespace tovtkm +{ +// T extern template instantiations +template class VTKACCELERATORSVTKMCORE_EXPORT vtkPointsPortal const>; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkPointsPortal const>; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkPointsPortal>; +template class VTKACCELERATORSVTKMCORE_EXPORT vtkPointsPortal>; +} diff --git a/Accelerators/Vtkm/Core/vtkmlib/Portals.h b/Accelerators/Vtkm/Core/vtkmlib/Portals.h new file mode 100644 index 000000000..42f4de92e --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmlib/Portals.h @@ -0,0 +1,139 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_Portals_h +#define vtkmlib_Portals_h + +#include "PortalTraits.h" +#include "vtkAcceleratorsVTKmCoreModule.h" +#include "vtkmConfigCore.h" //required for general vtkm setup + +class vtkDataArray; +class vtkPoints; + +#include + +namespace tovtkm +{ + +template +class VTKM_ALWAYS_EXPORT vtkArrayPortal +{ + static const int NUM_COMPONENTS = vtkm::VecTraits::NUM_COMPONENTS; + +public: + typedef VTKDataArrayType_ VTKDataArrayType; + using ValueType = typename vtkPortalTraits::Type; + using ComponentType = typename vtkPortalTraits::ComponentType; + + VTKM_EXEC_CONT + vtkArrayPortal(); + + VTKM_CONT + vtkArrayPortal(VTKDataArrayType* array, vtkm::Id size); + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + vtkm::Id GetNumberOfValues() const { return this->Size; } + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + inline ValueType Get(vtkm::Id index) const; + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + inline void Set(vtkm::Id index, const ValueType& value) const; + + typedef vtkm::cont::internal::IteratorFromArrayPortal IteratorType; + + VTKM_CONT + IteratorType GetIteratorBegin() const { return IteratorType(*this, 0); } + + VTKM_CONT + IteratorType GetIteratorEnd() const { return IteratorType(*this, this->Size); } + + VTKM_CONT + VTKDataArrayType* GetVtkData() const { return this->VTKData; } + +private: + VTKDataArrayType* VTKData; + vtkm::Id Size; +}; + +template +class VTKM_ALWAYS_EXPORT vtkPointsPortal +{ + static const int NUM_COMPONENTS = vtkm::VecTraits::NUM_COMPONENTS; + +public: + using ValueType = typename vtkPortalTraits::Type; + using ComponentType = typename vtkPortalTraits::ComponentType; + + VTKM_EXEC_CONT + vtkPointsPortal(); + + VTKM_CONT + vtkPointsPortal(vtkPoints* points, vtkm::Id size); + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + vtkm::Id GetNumberOfValues() const { return this->Size; } + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + inline ValueType Get(vtkm::Id index) const; + + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + inline void Set(vtkm::Id index, const ValueType& value) const; + + typedef vtkm::cont::internal::IteratorFromArrayPortal IteratorType; + + VTKM_CONT + IteratorType GetIteratorBegin() const { return IteratorType(*this, 0); } + + VTKM_CONT + IteratorType GetIteratorEnd() const { return IteratorType(*this, this->Size); } + + VTKM_CONT + vtkPoints* GetVtkData() const { return Points; } + +private: + vtkPoints* Points; + ComponentType* Array; + vtkm::Id Size; +}; +} + +#ifndef vtkmlib_Portals_cxx +#include +namespace tovtkm +{ +// T extern template instantiations +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT + vtkPointsPortal const>; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT + vtkPointsPortal const>; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT + vtkPointsPortal>; +extern template class VTKACCELERATORSVTKMCORE_TEMPLATE_EXPORT + vtkPointsPortal>; +} + +#endif // defined vtkmlib_Portals_cxx + +#include "Portals.hxx" +#endif // vtkmlib_Portals_h diff --git a/Accelerators/Vtkm/vtkmlib/Portals.hxx b/Accelerators/Vtkm/Core/vtkmlib/Portals.hxx similarity index 100% rename from Accelerators/Vtkm/vtkmlib/Portals.hxx rename to Accelerators/Vtkm/Core/vtkmlib/Portals.hxx diff --git a/Accelerators/Vtkm/Core/vtkmlib/vtkmDataArray.hxx b/Accelerators/Vtkm/Core/vtkmlib/vtkmDataArray.hxx new file mode 100644 index 000000000..a1688b08e --- /dev/null +++ b/Accelerators/Vtkm/Core/vtkmlib/vtkmDataArray.hxx @@ -0,0 +1,506 @@ +//============================================================================ +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2019 Sandia Corporation. +// Copyright 2019 UT-Battelle, LLC. +// Copyright 2019 Los Alamos National Security. +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National +// Laboratory (LANL), the U.S. Government retains certain rights in +// this software. +//============================================================================ +#ifndef vtkmDataArray_hxx +#define vtkmDataArray_hxx + +#include "vtkObjectFactory.h" +#include "vtkSmartPointer.h" + +#include +#include +#include +#include + +namespace internal +{ +//============================================================================= +template +class ArrayHandleWrapperBase +{ +public: + virtual ~ArrayHandleWrapperBase() = default; + + virtual vtkIdType GetNumberOfTuples() const = 0; + virtual int GetNumberOfComponents() const = 0; + + virtual void SetTuple(vtkIdType idx, const T* value) = 0; + virtual void GetTuple(vtkIdType idx, T* value) const = 0; + + virtual void SetComponent(vtkIdType tuple, int comp, const T& value) = 0; + virtual T GetComponent(vtkIdType tuple, int comp) const = 0; + + virtual void Allocate(vtkIdType numTuples) = 0; + virtual void Reallocate(vtkIdType numTuples) = 0; + + virtual vtkm::cont::UnknownArrayHandle GetVtkmUnknownArrayHandle() const = 0; +}; + +//----------------------------------------------------------------------------- +template ::HasMultipleComponents> +struct FlattenVec; + +template +struct FlattenVec +{ + using SubVec = FlattenVec::ComponentType>; + using ComponentType = typename SubVec::ComponentType; + + static VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents(const T& vec) + { + return vtkm::VecTraits::GetNumberOfComponents(vec) * + SubVec::GetNumberOfComponents(vtkm::VecTraits::GetComponent(vec, 0)); + } + + static VTKM_EXEC_CONT const ComponentType& GetComponent(const T& vec, vtkm::IdComponent comp) + { + auto ncomps = SubVec::GetNumberOfComponents(vtkm::VecTraits::GetComponent(vec, 0)); + return SubVec::GetComponent( + vtkm::VecTraits::GetComponent(vec, comp / ncomps), comp % ncomps); + } + + static VTKM_EXEC_CONT ComponentType& GetComponent(T& vec, vtkm::IdComponent comp) + { + auto ncomps = SubVec::GetNumberOfComponents(vtkm::VecTraits::GetComponent(vec, 0)); + return SubVec::GetComponent( + vtkm::VecTraits::GetComponent(vec, comp / ncomps), comp % ncomps); + } +}; + +template +struct FlattenVec +{ + using ComponentType = typename vtkm::VecTraits::ComponentType; + + static constexpr VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents(const T&) { return 1; } + + static VTKM_EXEC_CONT const ComponentType& GetComponent(const T& vec, vtkm::IdComponent) + { + return vtkm::VecTraits::GetComponent(vec, 0); + } + + static VTKM_EXEC_CONT ComponentType& GetComponent(T& vec, vtkm::IdComponent) + { + return vtkm::VecTraits::GetComponent(vec, 0); + } +}; + +//----------------------------------------------------------------------------- +template +class ArrayHandleWrapper + : public ArrayHandleWrapperBase::ComponentType> +{ +private: + using ArrayHandleType = vtkm::cont::ArrayHandle; + using ComponentType = typename FlattenVec::ComponentType; + using PortalType = typename ArrayHandleType::WritePortalType; + +public: + explicit ArrayHandleWrapper(const ArrayHandleType& handle) + : Handle(handle) + { + this->Portal = this->Handle.WritePortal(); + this->NumberOfComponents = (this->Portal.GetNumberOfValues() == 0) + ? 1 + : FlattenVec::GetNumberOfComponents(this->Portal.Get(0)); + } + + vtkIdType GetNumberOfTuples() const override { return this->Portal.GetNumberOfValues(); } + + int GetNumberOfComponents() const override { return this->NumberOfComponents; } + + void SetTuple(vtkIdType idx, const ComponentType* value) override + { + // some vector types are not default constructible... + auto v = this->Portal.Get(idx); + for (vtkm::IdComponent i = 0; i < this->NumberOfComponents; ++i) + { + FlattenVec::GetComponent(v, i) = value[i]; + } + this->Portal.Set(idx, v); + } + + void GetTuple(vtkIdType idx, ComponentType* value) const override + { + auto v = this->Portal.Get(idx); + for (vtkm::IdComponent i = 0; i < this->NumberOfComponents; ++i) + { + value[i] = FlattenVec::GetComponent(v, i); + } + } + + void SetComponent(vtkIdType tuple, int comp, const ComponentType& value) override + { + auto v = this->Portal.Get(tuple); + FlattenVec::GetComponent(v, comp) = value; + this->Portal.Set(tuple, v); + } + + ComponentType GetComponent(vtkIdType tuple, int comp) const override + { + return FlattenVec::GetComponent(this->Portal.Get(tuple), comp); + } + + void Allocate(vtkIdType numTuples) override + { + this->Handle.Allocate(numTuples); + this->Portal = this->Handle.WritePortal(); + } + + void Reallocate(vtkIdType numTuples) override + { + ArrayHandleType newHandle; + newHandle.Allocate(numTuples); + vtkm::cont::Algorithm::CopySubRange(this->Handle, 0, + std::min(this->Handle.GetNumberOfValues(), newHandle.GetNumberOfValues()), newHandle, 0); + this->Handle = std::move(newHandle); + this->Portal = this->Handle.WritePortal(); + } + + vtkm::cont::UnknownArrayHandle GetVtkmUnknownArrayHandle() const override + { + return vtkm::cont::UnknownArrayHandle{ this->Handle }; + } + +private: + ArrayHandleType Handle; + PortalType Portal; + vtkm::IdComponent NumberOfComponents; +}; + +//----------------------------------------------------------------------------- +template +class ArrayHandleWrapperReadOnly + : public ArrayHandleWrapperBase::ComponentType> +{ +private: + using ArrayHandleType = vtkm::cont::ArrayHandle; + using ComponentType = typename FlattenVec::ComponentType; + using PortalType = typename ArrayHandleType::ReadPortalType; + +public: + explicit ArrayHandleWrapperReadOnly(const ArrayHandleType& handle) + : Handle(handle) + { + this->Portal = this->Handle.ReadPortal(); + this->NumberOfComponents = (this->Portal.GetNumberOfValues() == 0) + ? 1 + : FlattenVec::GetNumberOfComponents(this->Portal.Get(0)); + } + + vtkIdType GetNumberOfTuples() const override { return this->Portal.GetNumberOfValues(); } + + int GetNumberOfComponents() const override { return this->NumberOfComponents; } + + void SetTuple(vtkIdType, const ComponentType*) override + { + vtkGenericWarningMacro(<< "SetTuple called on read-only vtkmDataArray"); + } + + void GetTuple(vtkIdType idx, ComponentType* value) const override + { + auto v = this->Portal.Get(idx); + for (vtkm::IdComponent i = 0; i < this->NumberOfComponents; ++i) + { + value[i] = FlattenVec::GetComponent(v, i); + } + } + + void SetComponent(vtkIdType, int, const ComponentType&) override + { + vtkGenericWarningMacro(<< "SetComponent called on read-only vtkmDataArray"); + } + + ComponentType GetComponent(vtkIdType tuple, int comp) const override + { + return FlattenVec::GetComponent(this->Portal.Get(tuple), comp); + } + + void Allocate(vtkIdType) override + { + vtkGenericWarningMacro(<< "Allocate called on read-only vtkmDataArray"); + } + + void Reallocate(vtkIdType) override + { + vtkGenericWarningMacro(<< "Reallocate called on read-only vtkmDataArray"); + } + + vtkm::cont::UnknownArrayHandle GetVtkmUnknownArrayHandle() const override + { + return vtkm::cont::UnknownArrayHandle{ this->Handle }; + } + +private: + ArrayHandleType Handle; + PortalType Portal; + vtkm::IdComponent NumberOfComponents; +}; + +//----------------------------------------------------------------------------- +template +class ArrayHandleWrapperFlatSOA : public ArrayHandleWrapperBase +{ +private: + using ArrayHandleType = vtkm::cont::ArrayHandle; + using PortalType = typename ArrayHandleType::WritePortalType; + using VtkmArrayType = vtkm::cont::ArrayHandleGroupVecVariable>; + +public: + explicit ArrayHandleWrapperFlatSOA(const ArrayHandleType& handle, int numberOfComponents) + : Handle(handle) + , NumberOfComponents(numberOfComponents) + { + this->Portal = this->Handle.WritePortal(); + } + + vtkIdType GetNumberOfTuples() const override + { + return this->Portal.GetNumberOfValues() / this->NumberOfComponents; + } + + int GetNumberOfComponents() const override { return this->NumberOfComponents; } + + void SetTuple(vtkIdType idx, const T* value) override + { + vtkm::Id start = idx * this->NumberOfComponents; + vtkm::Id end = start + this->NumberOfComponents; + for (auto i = start; i < end; ++i) + { + this->Portal.Set(i, *value++); + } + } + + void GetTuple(vtkIdType idx, T* value) const override + { + vtkm::Id start = idx * this->NumberOfComponents; + vtkm::Id end = start + this->NumberOfComponents; + for (auto i = start; i < end; ++i) + { + *value++ = this->Portal.Get(i); + } + } + + void SetComponent(vtkIdType tuple, int comp, const T& value) override + { + this->Portal.Set((tuple * this->NumberOfComponents) + comp, value); + } + + T GetComponent(vtkIdType tuple, int comp) const override + { + return this->Portal.Get((tuple * this->NumberOfComponents) + comp); + } + + void Allocate(vtkIdType numTuples) override + { + this->Handle.Allocate(numTuples * this->NumberOfComponents); + this->Portal = this->Handle.WritePortal(); + } + + void Reallocate(vtkIdType numTuples) override + { + ArrayHandleType newHandle; + newHandle.Allocate(numTuples * this->NumberOfComponents); + vtkm::cont::Algorithm::CopySubRange(this->Handle, 0, + std::min(this->Handle.GetNumberOfValues(), newHandle.GetNumberOfValues()), newHandle, 0); + this->Handle = std::move(newHandle); + this->Portal = this->Handle.WritePortal(); + } + + vtkm::cont::UnknownArrayHandle GetVtkmUnknownArrayHandle() const override + { + return vtkm::cont::UnknownArrayHandle{ this->GetVtkmArray() }; + } + +private: + VtkmArrayType GetVtkmArray() const + { + auto length = this->Handle.GetNumberOfValues() / this->NumberOfComponents; + auto offsets = vtkm::cont::ArrayHandleCounting(0, this->NumberOfComponents, length); + return VtkmArrayType{ this->Handle, offsets }; + } + + ArrayHandleType Handle; + PortalType Portal; + vtkm::IdComponent NumberOfComponents; +}; + +//----------------------------------------------------------------------------- +template +using IsReadOnly = std::integral_constant::value>; + +template +ArrayHandleWrapperBase::ComponentType>* WrapArrayHandle( + const vtkm::cont::ArrayHandle& ah, std::false_type) +{ + return new ArrayHandleWrapper{ ah }; +} + +template +ArrayHandleWrapperBase::ComponentType>* WrapArrayHandle( + const vtkm::cont::ArrayHandle& ah, std::true_type) +{ + return new ArrayHandleWrapperReadOnly{ ah }; +} + +template +ArrayHandleWrapperBase::ComponentType>* MakeArrayHandleWrapper( + const vtkm::cont::ArrayHandle& ah) +{ + return WrapArrayHandle(ah, typename IsReadOnly>::type{}); +} + +template +ArrayHandleWrapperBase* MakeArrayHandleWrapper(vtkIdType numberOfTuples, int numberOfComponents) +{ + switch (numberOfComponents) + { + case 1: + { + vtkm::cont::ArrayHandle ah; + ah.Allocate(numberOfTuples); + return MakeArrayHandleWrapper(ah); + } + case 2: + { + vtkm::cont::ArrayHandle> ah; + ah.Allocate(numberOfTuples); + return MakeArrayHandleWrapper(ah); + } + case 3: + { + vtkm::cont::ArrayHandle> ah; + ah.Allocate(numberOfTuples); + return MakeArrayHandleWrapper(ah); + } + case 4: + { + vtkm::cont::ArrayHandle> ah; + ah.Allocate(numberOfTuples); + return MakeArrayHandleWrapper(ah); + } + default: + { + vtkm::cont::ArrayHandle ah; + ah.Allocate(numberOfTuples * numberOfComponents); + return new ArrayHandleWrapperFlatSOA{ ah, numberOfComponents }; + } + } +} + +} // internal + +//============================================================================= +template +vtkmDataArray::vtkmDataArray() = default; + +template +vtkmDataArray::~vtkmDataArray() = default; + +template +vtkmDataArray* vtkmDataArray::New() +{ + VTK_STANDARD_NEW_BODY(vtkmDataArray); +} + +template +template +void vtkmDataArray::SetVtkmArrayHandle(const vtkm::cont::ArrayHandle& ah) +{ + static_assert(std::is_same::ComponentType>::value, + "Component type of the arrays don't match"); + + this->VtkmArray.reset(internal::MakeArrayHandleWrapper(ah)); + + this->Size = this->VtkmArray->GetNumberOfTuples() * this->VtkmArray->GetNumberOfComponents(); + this->MaxId = this->Size - 1; + this->SetNumberOfComponents(this->VtkmArray->GetNumberOfComponents()); +} + +template +vtkm::cont::UnknownArrayHandle vtkmDataArray::GetVtkmUnknownArrayHandle() const +{ + return this->VtkmArray->GetVtkmUnknownArrayHandle(); +} + +template +auto vtkmDataArray::GetValue(vtkIdType valueIdx) const -> ValueType +{ + auto idx = valueIdx / this->NumberOfComponents; + auto comp = valueIdx % this->NumberOfComponents; + return this->VtkmArray->GetComponent(idx, comp); +} + +template +void vtkmDataArray::SetValue(vtkIdType valueIdx, ValueType value) +{ + auto idx = valueIdx / this->NumberOfComponents; + auto comp = valueIdx % this->NumberOfComponents; + this->VtkmArray->SetComponent(idx, comp, value); +} + +template +void vtkmDataArray::GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const +{ + this->VtkmArray->GetTuple(tupleIdx, tuple); +} + +template +void vtkmDataArray::SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple) +{ + this->VtkmArray->SetTuple(tupleIdx, tuple); +} + +template +auto vtkmDataArray::GetTypedComponent(vtkIdType tupleIdx, int compIdx) const -> ValueType +{ + return this->VtkmArray->GetComponent(tupleIdx, compIdx); +} + +template +void vtkmDataArray::SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value) +{ + this->VtkmArray->SetComponent(tupleIdx, compIdx, value); +} + +template +bool vtkmDataArray::AllocateTuples(vtkIdType numTuples) +{ + if (this->VtkmArray && this->VtkmArray->GetNumberOfComponents() == this->NumberOfComponents) + { + this->VtkmArray->Allocate(numTuples); + } + else + { + this->VtkmArray.reset(internal::MakeArrayHandleWrapper(numTuples, this->NumberOfComponents)); + } + return true; +} + +template +bool vtkmDataArray::ReallocateTuples(vtkIdType numTuples) +{ + this->VtkmArray->Reallocate(numTuples); + return true; +} + +#endif // vtkmDataArray_hxx diff --git a/Accelerators/Vtkm/DataModel/CMakeLists.txt b/Accelerators/Vtkm/DataModel/CMakeLists.txt new file mode 100644 index 000000000..f4fdfda47 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/CMakeLists.txt @@ -0,0 +1,119 @@ +##============================================================================= +## +## Copyright (c) Kitware, Inc. +## All rights reserved. +## See LICENSE.txt for details. +## +## This software is distributed WITHOUT ANY WARRANTY; without even +## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +## PURPOSE. See the above copyright notice for more information. +## +## Copyright 2012 Sandia Corporation. +## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +## the U.S. Government retains certain rights in this software. +## +##============================================================================= + +list(INSERT CMAKE_MODULE_PATH 0 + "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") + +set(sources + vtkmlib/ArrayConvertersReal.cxx + vtkmlib/ArrayConvertersSigned.cxx + vtkmlib/ArrayConvertersUnsigned.cxx) + +set(private_headers + vtkmlib/ArrayConverters.hxx) + +set(impl_classes + vtkmDataSet + ) + +set(nowrap_classes + vtkmlib/ArrayConverters + vtkmlib/CellSetConverters + vtkmlib/DataSetConverters + vtkmlib/ImageDataConverter + vtkmlib/ImplicitFunctionConverter + vtkmlib/PolyDataConverter + vtkmlib/UnstructuredGridConverter) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/vtkmConfigDataModel.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfigDataModel.h" + @ONLY) + +list(APPEND headers + "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfigDataModel.h") + +if (TARGET vtkm::cuda) + enable_language(CUDA) + + # Temporarily suppress "has address taken but no possible call to it" warnings, + # until we figure out its implications. + # We are disabling all warnings as nvlink has no known way to suppress + # individual warning types. + string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w") +endif () + +set(force_static) +if (TARGET vtkm::cuda AND BUILD_SHARED_LIBS) + set(force_static FORCE_STATIC) +endif () + +vtk_module_add_module(VTK::AcceleratorsVTKmDataModel + ${force_static} + HEADER_DIRECTORIES + SOURCES ${sources} + HEADERS ${headers} + CLASSES ${impl_classes} + NOWRAP_CLASSES ${nowrap_classes} + PRIVATE_HEADERS ${private_headers}) +_vtk_module_real_target(vtkm_accel_target VTK::AcceleratorsVTKmDataModel) +vtkm_add_target_information(${vtkm_accel_target} + EXTENDS_VTKM + MODIFY_CUDA_FLAGS + DEVICE_SOURCES ${sources}) + +vtk_module_set_property(VTK::AcceleratorsVTKmDataModel + PROPERTY JOB_POOL_COMPILE + VALUE vtkm_pool) + +if (TARGET vtkm::cuda) + vtk_module_set_property(VTK::AcceleratorsVTKmDataModel + PROPERTY CUDA_SEPARABLE_COMPILATION + VALUE ON) + vtk_module_compile_options(VTK::AcceleratorsVTKmDataModel + PUBLIC $<$:-Xcudafe --diag_suppress=extra_semicolon>) +endif () + +if (MSVC) + set(msvc_warning_flags + # Generates numerous false positives with template code about unreachable + # code + /wd4702 + # Generates numerous warning that implicit assignment operators can't be + # constructed. This is understood and we don't care. + /wd4512 + # Generates numerous warning that implicit constructors can't be + # constructed. This is understood and we don't care. + /wd4510 + # Generates warnings when decorated names are over 4096 characters + # This compiler warning is deprecated and no longer occurs with VS2017+. + # So we suppress for VS2015 + /wd4503 + ) + set(vtkm_msvc_flags) + foreach (msvc_warning_flag IN LISTS msvc_warning_flags) + if (TARGET vtkm::cuda) + list(APPEND vtkm_msvc_flags + $<$:-Xcompiler=${msvc_warning_flag},${msvc_warning_flag}>) + else () + list(APPEND vtkm_msvc_flags + ${msvc_warning_flag}) + endif () + endforeach () + vtk_module_compile_options(VTK::AcceleratorsVTKmDataModel + PRIVATE + ${vtkm_msvc_flags}) +endif () diff --git a/Accelerators/Vtkm/DataModel/Testing/CMakeLists.txt b/Accelerators/Vtkm/DataModel/Testing/CMakeLists.txt new file mode 100644 index 000000000..35f9732a9 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/Testing/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(Cxx) diff --git a/Accelerators/Vtkm/DataModel/Testing/Cxx/CMakeLists.txt b/Accelerators/Vtkm/DataModel/Testing/Cxx/CMakeLists.txt new file mode 100644 index 000000000..7d6f8f94a --- /dev/null +++ b/Accelerators/Vtkm/DataModel/Testing/Cxx/CMakeLists.txt @@ -0,0 +1,35 @@ +# We are splitting the tests into two executables to workaround an issue in +# cuda. With all the tests in the same executable several tests are failing +# in cuda. We have not identified the root cause of the problem yet. +vtk_add_test_cxx(vtkAcceleratorsVTKmDataModelCxxTests tests + TestVTKMDataSet.cxx,NO_VALID + ) + +if (TARGET vtkm::cuda) + #the enable_language call is scoped! so we have to re-enable + #cuda in the test directory + enable_language(CUDA) + foreach(src IN LISTS tests) + set_source_files_properties(${src}.cxx PROPERTIES LANGUAGE "CUDA") + endforeach() + + #the tests aren't scoped as a child directory of vtkAcceleratorsVTKmDataModel + #so we need to redo this logic + vtkm_get_cuda_flags(CMAKE_CUDA_FLAGS) + + # Temporarily suppress "has address taken but no possible call to it" warnings, + # until we figure out its implications. + # We are disabling all warnings as nvlink has no known way to suppress + # individual warning types. + string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w") +endif() + +vtk_test_cxx_executable(vtkAcceleratorsVTKmDataModelCxxTests tests + RENDERING_FACTORY + ) + +if (TARGET vtkm::cuda) + # When cuda is enabled VTK::AcceleratorsVTKmDataModel is built statically but with fpic + # enabled so the tests are also built with fpic enabled + set_target_properties(vtkAcceleratorsVTKmDataModelCxxTests PROPERTIES POSITION_INDEPENDENT_CODE ON) +endif() diff --git a/Accelerators/Vtkm/DataModel/Testing/Cxx/TestVTKMDataSet.cxx b/Accelerators/Vtkm/DataModel/Testing/Cxx/TestVTKMDataSet.cxx new file mode 100644 index 000000000..2493ae5b0 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/Testing/Cxx/TestVTKMDataSet.cxx @@ -0,0 +1,402 @@ +#include "vtkmDataSet.h" + +#include "vtkCell.h" +#include "vtkCellArray.h" +#include "vtkCellData.h" +#include "vtkFloatArray.h" +#include "vtkGenericCell.h" +#include "vtkIdList.h" +#include "vtkIdTypeArray.h" +#include "vtkImageData.h" +#include "vtkImageDataToPointSet.h" +#include "vtkMath.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPoints.h" +#include "vtkStructuredGrid.h" +#include "vtkUnsignedCharArray.h" +#include "vtkUnstructuredGrid.h" +#include "vtkmDataArray.h" + +#include +#include + +#include +#include + +namespace +{ + +//------------------------------------------------------------------------------ +class TestError +{ +public: + TestError(const std::string& message, int line) + : Message(message) + , Line(line) + { + } + + void PrintMessage(std::ostream& out) const + { + out << "Error at line " << this->Line << ": " << this->Message << "\n"; + } + +private: + std::string Message; + int Line; +}; + +#define RAISE_TEST_ERROR(msg) throw TestError((msg), __LINE__) + +#define TEST_VERIFY(cond, msg) \ + if (!(cond)) \ + RAISE_TEST_ERROR((msg)) + +inline bool IsEqualFloat(double a, double b, double e = 1e-6f) +{ + return (std::abs(a - b) <= e); +} + +//------------------------------------------------------------------------------ +inline void TestEqualCells(vtkCell* c1, vtkCell* c2) +{ + TEST_VERIFY(c1->GetCellType() == c2->GetCellType(), "Cell types don't match"); + TEST_VERIFY(c1->GetNumberOfPoints() == c2->GetNumberOfPoints(), "Cell sizes don't match"); + for (vtkIdType i = 0; i < c1->GetNumberOfPoints(); ++i) + { + TEST_VERIFY(c1->GetPointId(i) == c2->GetPointId(i), "Cell point-ids don't match"); + } +} + +inline void TestEqualVtkArrays(vtkAbstractArray* a1, vtkAbstractArray* a2) +{ + TEST_VERIFY(std::string(a1->GetName()) == std::string(a2->GetName()), "Array names don't match"); + TEST_VERIFY(a1->GetDataType() == a2->GetDataType(), "Array data-types don't match"); + TEST_VERIFY( + a1->GetNumberOfTuples() == a2->GetNumberOfTuples(), "Array number of tuples don't match"); + TEST_VERIFY(a1->GetNumberOfComponents() == a2->GetNumberOfComponents(), + "Array number of components don't match"); + + auto da1 = vtkDataArray::SafeDownCast(a1); + auto da2 = vtkDataArray::SafeDownCast(a2); + double range1[2], range2[2]; + int numComps = da1->GetNumberOfComponents(); + for (int i = 0; i < numComps; ++i) + { + da1->GetRange(range1, i); + da2->GetRange(range2, i); + TEST_VERIFY(IsEqualFloat(range1[0], range2[0]) && IsEqualFloat(range1[1], range2[1]), + "Array ranges don't match"); + } +} + +void TestDataSets(vtkDataSet* dsVtk, vtkDataSet* dsVtkm) +{ + TEST_VERIFY( + dsVtk->GetNumberOfPoints() == dsVtkm->GetNumberOfPoints(), "Number of points don't match"); + TEST_VERIFY( + dsVtk->GetNumberOfCells() == dsVtkm->GetNumberOfCells(), "Number of cells don't match"); + double bounds1[6], bounds2[6]; + dsVtk->GetBounds(bounds1); + dsVtkm->GetBounds(bounds2); + TEST_VERIFY(IsEqualFloat(bounds1[0], bounds2[0]) && IsEqualFloat(bounds1[1], bounds2[1]) && + IsEqualFloat(bounds1[2], bounds2[2]) && IsEqualFloat(bounds1[3], bounds2[3]) && + IsEqualFloat(bounds1[4], bounds2[4]) && IsEqualFloat(bounds1[5], bounds2[5]), + "Bounds don't match"); + + vtkIdType numPoints = dsVtk->GetNumberOfPoints(); + for (vtkIdType i = 0; i < numPoints; ++i) + { + double x1[3], x2[3]; + dsVtk->GetPoint(i, x1); + dsVtkm->GetPoint(i, x2); + TEST_VERIFY( + IsEqualFloat(x1[0], x2[0]) && IsEqualFloat(x1[1], x2[1]) && IsEqualFloat(x1[2], x2[2]), + "'GetPoint` results don't match"); + + vtkNew cellIds1, cellIds2; + dsVtk->GetPointCells(i, cellIds1); + dsVtkm->GetPointCells(i, cellIds2); + cellIds1->Sort(); + cellIds2->Sort(); + TEST_VERIFY(cellIds1->GetNumberOfIds() == cellIds2->GetNumberOfIds(), + "`GetPointCells` results don't match"); + for (vtkIdType j = 0; j < cellIds1->GetNumberOfIds(); ++j) + { + TEST_VERIFY(cellIds1->GetId(j) == cellIds2->GetId(j), "`GetPointCells` results don't match"); + } + } + + vtkIdType numCells = dsVtk->GetNumberOfCells(); + for (vtkIdType i = 0; i < numCells; ++i) + { + TestEqualCells(dsVtk->GetCell(i), dsVtkm->GetCell(i)); + + vtkNew gc1, gc2; + dsVtk->GetCell(i, gc1); + dsVtkm->GetCell(i, gc2); + TestEqualCells(gc1, gc2); + + double bds1[6], bds2[6]; + dsVtk->GetCellBounds(i, bds1); + dsVtkm->GetCellBounds(i, bds2); + TEST_VERIFY(IsEqualFloat(bds1[0], bds2[0]) && IsEqualFloat(bds1[1], bds2[1]) && + IsEqualFloat(bds1[2], bds2[2]) && IsEqualFloat(bds1[3], bds2[3]) && + IsEqualFloat(bds1[4], bds2[4]) && IsEqualFloat(bds1[5], bds2[5]), + "Cell bounds don't match"); + + TEST_VERIFY(dsVtk->GetCellType(i) == dsVtkm->GetCellType(i), "Cell types don't match"); + + vtkNew ptIds1, ptIds2; + dsVtk->GetCellPoints(i, ptIds1); + dsVtkm->GetCellPoints(i, ptIds2); + for (vtkIdType j = 0; j < ptIds1->GetNumberOfIds(); ++j) + { + TEST_VERIFY(ptIds1->GetId(j) == ptIds2->GetId(j), "`GetCellPoints` results don't match"); + } + } + + std::default_random_engine engine; + std::uniform_real_distribution d1(bounds1[0], bounds1[1]), d2(bounds1[2], bounds1[3]), + d3(bounds1[4], bounds1[5]); + static constexpr int numSamples = 100; + for (int i = 0; i < numSamples; ++i) + { + double x[3] = { d1(engine), d2(engine), d3(engine) }; + + auto pid1 = dsVtk->FindPoint(x); + auto pid2 = dsVtkm->FindPoint(x); + if (pid1 != pid2) + { + TEST_VERIFY(pid1 != -1 && pid2 != -1, "`FindPoint` results don't match"); + double x1[3], x2[3]; + dsVtk->GetPoint(pid1, x1); + dsVtkm->GetPoint(pid1, x2); + TEST_VERIFY(IsEqualFloat( + vtkMath::Distance2BetweenPoints(x, x1), vtkMath::Distance2BetweenPoints(x, x2)), + "`FindPoint` results don't match"); + } + + int subId = 0; + double pcoords1[3], pcoords2[3]; + double weights1[8], weights2[8]; + auto cid1 = dsVtk->FindCell(x, nullptr, -1, 1e-6, subId, pcoords1, weights1); + auto cid2 = dsVtkm->FindCell(x, nullptr, -1, 1e-6, subId, pcoords2, weights2); + + // vtkDataSet and vtkmDataSet may find different cells if the point is too close to + // the boundary of those cells + if (cid1 != cid2) + { + if (cid2 >= 0) + { + // check if the point is inside or close to the vtkmDataSet found cell + vtkCell* cell = dsVtk->GetCell(cid2); + double dist2 = 0, pcoords[3], weights[8]; + if (cell->EvaluatePosition(x, nullptr, subId, pcoords, dist2, weights) == 0) // outside? + { + TEST_VERIFY(IsEqualFloat(cell->GetParametricDistance(pcoords), 0.0, 1e-3), + "`FindCell` incorrect result by vtkmDataSet"); + } + } + } + else if (cid1 == -1) + { + continue; + } + else + { + TEST_VERIFY(IsEqualFloat(pcoords1[0], pcoords2[0]) && + IsEqualFloat(pcoords1[1], pcoords2[1]) && IsEqualFloat(pcoords1[2], pcoords2[2]), + "`FindCell` pcoords don't match"); + int count = dsVtk->GetCell(cid1)->GetNumberOfPoints(); + for (int j = 0; j < count; ++j) + { + TEST_VERIFY(IsEqualFloat(weights1[j], weights2[j]), "`FindCell` weights don't match"); + } + } + } + + // test fields + int numPointFields = dsVtk->GetPointData()->GetNumberOfArrays(); + TEST_VERIFY(numPointFields == dsVtkm->GetPointData()->GetNumberOfArrays(), + "Number of point-fields don't match"); + for (int i = 0; i < numPointFields; ++i) + { + TestEqualVtkArrays(dsVtk->GetPointData()->GetArray(i), dsVtkm->GetPointData()->GetArray(i)); + } + + int numCellFields = dsVtk->GetCellData()->GetNumberOfArrays(); + TEST_VERIFY(numCellFields == dsVtkm->GetCellData()->GetNumberOfArrays(), + "Number of cell-fields don't match"); + for (int i = 0; i < numCellFields; ++i) + { + TestEqualVtkArrays(dsVtk->GetCellData()->GetArray(i), dsVtkm->GetCellData()->GetArray(i)); + } +} + +//------------------------------------------------------------------------------ +inline void CoordsCopy(const vtkm::cont::CoordinateSystem& coords, vtkPoints* points) +{ + auto pointArray = coords.GetDataAsMultiplexer(); + auto ptsPortal = pointArray.ReadPortal(); + auto numPoints = coords.GetNumberOfPoints(); + + points->SetDataTypeToFloat(); + points->SetNumberOfPoints(numPoints); + auto ptsArray = vtkFloatArray::SafeDownCast(points->GetData()); + for (vtkIdType i = 0; i < numPoints; ++i) + { + auto pt = ptsPortal.Get(i); + float tuple[3] = { pt[0], pt[1], pt[2] }; + ptsArray->SetTypedTuple(i, tuple); + } +} + +inline void FieldCopy( + const vtkm::cont::ArrayHandle& src, const char* name, vtkFloatArray* dst) +{ + auto portal = src.ReadPortal(); + vtkm::Id length = portal.GetNumberOfValues(); + + dst->SetName(name); + dst->SetNumberOfComponents(1); + dst->SetNumberOfTuples(length); + for (vtkm::Id i = 0; i < length; ++i) + { + dst->SetValue(i, portal.Get(i)); + } +} + +//------------------------------------------------------------------------------ +vtkm::cont::testing::MakeTestDataSet Maker; + +void TestUniformDataSet() +{ + auto dataset = Maker.Make3DUniformDataSet0(); + auto coords = dataset.GetCoordinateSystem() + .GetData() + .AsArrayHandle(); + auto portal = coords.ReadPortal(); + auto dims = portal.GetDimensions(); + auto origin = portal.GetOrigin(); + auto spacing = portal.GetSpacing(); + + vtkNew pointField, cellField; + FieldCopy(dataset.GetField("pointvar").GetData().AsArrayHandle>(), + "pointvar", pointField); + FieldCopy(dataset.GetField("cellvar").GetData().AsArrayHandle>(), + "cellvar", cellField); + + vtkNew imageData; + imageData->SetDimensions(dims[0], dims[1], dims[2]); + imageData->SetOrigin(origin[0], origin[1], origin[2]); + imageData->SetSpacing(spacing[0], spacing[1], spacing[2]); + imageData->GetPointData()->AddArray(pointField); + imageData->GetCellData()->AddArray(cellField); + + vtkNew voxToHex; + voxToHex->SetInputData(imageData); + voxToHex->Update(); + + auto dsVtk = voxToHex->GetOutput(); + + vtkNew dsVtkm; + dsVtkm->SetVtkmDataSet(dataset); + + TestDataSets(dsVtk, dsVtkm); +} + +void TestCurvilinearDataSet() +{ + auto dataset = Maker.Make3DRegularDataSet0(); + auto dims = dataset.GetCellSet().Cast>().GetPointDimensions(); + + vtkNew points; + CoordsCopy(dataset.GetCoordinateSystem(), points); + + vtkNew pointField, cellField; + FieldCopy(dataset.GetField("pointvar").GetData().AsArrayHandle>(), + "pointvar", pointField); + FieldCopy(dataset.GetField("cellvar").GetData().AsArrayHandle>(), + "cellvar", cellField); + + vtkNew dsVtk; + dsVtk->SetDimensions(dims[0], dims[1], dims[2]); + dsVtk->SetPoints(points); + dsVtk->GetPointData()->AddArray(pointField); + dsVtk->GetCellData()->AddArray(cellField); + + vtkNew dsVtkm; + dsVtkm->SetVtkmDataSet(dataset); + + TestDataSets(dsVtk, dsVtkm); +} + +void TestExplicitDataSet() +{ + auto dataset = Maker.Make3DExplicitDataSetZoo(); + + vtkNew points; + CoordsCopy(dataset.GetCoordinateSystem(), points); + + auto& cellset = *dataset.GetCellSet().GetCellSetBase(); + vtkm::Id numCells = cellset.GetNumberOfCells(); + + vtkNew shapes; + vtkNew connectivity; + shapes->SetNumberOfComponents(1); + shapes->SetNumberOfTuples(numCells); + for (vtkm::Id i = 0; i < numCells; ++i) + { + shapes->SetValue(i, cellset.GetCellShape(i)); + + vtkIdType ptIds[8]; + int count = cellset.GetNumberOfPointsInCell(i); + cellset.GetCellPointIds(i, ptIds); + connectivity->InsertNextCell(count, ptIds); + } + + vtkNew pointField, cellField; + FieldCopy(dataset.GetField("pointvar").GetData().AsArrayHandle>(), + "pointvar", pointField); + FieldCopy(dataset.GetField("cellvar").GetData().AsArrayHandle>(), + "cellvar", cellField); + + vtkNew dsVtk; + dsVtk->SetPoints(points); + dsVtk->SetCells(shapes, connectivity); + dsVtk->GetPointData()->AddArray(pointField); + dsVtk->GetCellData()->AddArray(cellField); + + vtkNew dsVtkm; + dsVtkm->SetVtkmDataSet(dataset); + + TestDataSets(dsVtk, dsVtkm); +} + +} // anonymous namespace + +//------------------------------------------------------------------------------ +int TestVTKMDataSet(int, char*[]) +try +{ + std::cout << "Testing Uniform DataSet\n"; + TestUniformDataSet(); + std::cout << "Passed\n"; + + std::cout << "Testing Curvilinear DataSet\n"; + TestCurvilinearDataSet(); + std::cout << "Passed\n"; + + std::cout << "Testing Explicit DataSet\n"; + TestExplicitDataSet(); + std::cout << "Passed\n"; + + return EXIT_SUCCESS; +} +catch (const TestError& e) +{ + e.PrintMessage(std::cout); + return 1; +} diff --git a/Accelerators/Vtkm/DataModel/vtk.module b/Accelerators/Vtkm/DataModel/vtk.module new file mode 100644 index 000000000..e7ab9d485 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtk.module @@ -0,0 +1,15 @@ +NAME + VTK::AcceleratorsVTKmDataModel +LIBRARY_NAME + vtkAcceleratorsVTKmDataModel +DESCRIPTION + VTKm data structures +DEPENDS + VTK::AcceleratorsVTKmCore + VTK::CommonCore + VTK::CommonDataModel + VTK::vtkm +TEST_DEPENDS + VTK::FiltersGeneral + VTK::TestingCore + VTK::TestingRendering diff --git a/Accelerators/Vtkm/DataModel/vtkmConfigDataModel.h.in b/Accelerators/Vtkm/DataModel/vtkmConfigDataModel.h.in new file mode 100644 index 000000000..ad440eb8e --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmConfigDataModel.h.in @@ -0,0 +1,55 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: ObjectFactory.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#ifndef vtkConfigDataModel_h +#define vtkConfigDataModel_h + +/*--------------------------------------------------------------------------*/ +/* Other Configuration Options */ + +#include +#include "vtkAcceleratorsVTKmDataModelModule.h" //required for correct implementation + + +/*--------------------------------------------------------------------------*/ +/* Make sure we use the same id's in VTK and VTK-m */ +#include "vtkType.h" +#ifdef VTK_USE_64BIT_IDS +# ifndef VTKM_USE_64BIT_IDS +# error VTK was defined with 64-bit ids but VTK-m with 32-bit ids. +# endif +#else // !VTK_USE_64BIT_IDS +# ifdef VTKM_USE_64BIT_IDS +# error VTK was defined with 32-bit ids but VTK-m with 64-bit ids. +# endif +#endif + + +#ifndef VTKACCELERATORSVTKMDATAMODEL_TEMPLATE_EXPORT +# if !defined(VTKACCELERATORSVTKMDATAMODEL_STATIC_DEFINE) && defined(_MSC_VER) + /* Warning C4910 on windows state that extern explicit template can't be + labeled with __declspec(dllexport). So that is why we use a new custom + define. But when other modules ( e.g. rendering ) include this header + we need them to see that the extern template is actually being imported. + */ + /* We are building this library with MSVC */ +# define VTKACCELERATORSVTKMDATAMODEL_TEMPLATE_EXPORT +# else + /* Defer to the config module */ +# define VTKACCELERATORSVTKMDATAMODEL_TEMPLATE_EXPORT VTKACCELERATORSVTKMDATAMODEL_EXPORT +# endif +#endif + + +#endif // vtkConfigDataModel_h diff --git a/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx b/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx new file mode 100644 index 000000000..f1ef72ffa --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmDataSet.cxx @@ -0,0 +1,439 @@ +//============================================================================ +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2015 Sandia Corporation. +// Copyright 2015 UT-Battelle, LLC. +// Copyright 2015 Los Alamos National Security. +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National +// Laboratory (LANL), the U.S. Government retains certain rights in +// this software. +//============================================================================ +#include "vtkmDataSet.h" + +#include "vtkmDataArray.h" +#include "vtkmFilterPolicy.h" +#include "vtkmlib/ArrayConverters.h" + +#include "vtkCell.h" +#include "vtkDataSet.h" +#include "vtkDoubleArray.h" +#include "vtkGenericCell.h" +#include "vtkIdList.h" +#include "vtkNew.h" +#include "vtkPoints.h" + +#include +#include +#include +#include +#include +#include + +#include + +namespace +{ + +using SupportedCellSets = vtkmOutputFilterPolicy::AllCellSetList; + +template +struct VtkmLocator +{ + std::mutex lock; + std::unique_ptr control; + vtkMTimeType buildTime = 0; +}; + +} // anonymous + +struct vtkmDataSet::DataMembers +{ + vtkm::cont::DynamicCellSet CellSet; + vtkm::cont::CoordinateSystem Coordinates; + vtkNew Cell; + + VtkmLocator PointLocator; + VtkmLocator CellLocator; +}; + +//------------------------------------------------------------------------------ +vtkmDataSet::vtkmDataSet() + : Internals(new DataMembers) +{ +} + +vtkmDataSet::~vtkmDataSet() = default; + +vtkStandardNewMacro(vtkmDataSet); + +void vtkmDataSet::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); + + this->Internals->CellSet.PrintSummary(os); + this->Internals->Coordinates.PrintSummary(os); +} + +//------------------------------------------------------------------------------ +void vtkmDataSet::SetVtkmDataSet(const vtkm::cont::DataSet& ds) +{ + this->Internals->CellSet = ds.GetCellSet(); + this->Internals->Coordinates = ds.GetCoordinateSystem(); + fromvtkm::ConvertArrays(ds, this); +} + +vtkm::cont::DataSet vtkmDataSet::GetVtkmDataSet() const +{ + vtkm::cont::DataSet ds; + ds.SetCellSet(this->Internals->CellSet); + ds.AddCoordinateSystem(this->Internals->Coordinates); + tovtkm::ProcessFields(const_cast(this), ds, tovtkm::FieldsFlag::PointsAndCells); + + return ds; +} + +//------------------------------------------------------------------------------ +void vtkmDataSet::CopyStructure(vtkDataSet* ds) +{ + auto vtkmds = vtkmDataSet::SafeDownCast(ds); + if (vtkmds) + { + this->Initialize(); + this->Internals->CellSet = vtkmds->Internals->CellSet; + this->Internals->Coordinates = vtkmds->Internals->Coordinates; + } +} + +vtkIdType vtkmDataSet::GetNumberOfPoints() +{ + return this->Internals->Coordinates.GetNumberOfPoints(); +} + +vtkIdType vtkmDataSet::GetNumberOfCells() +{ + auto* csBase = this->Internals->CellSet.GetCellSetBase(); + return csBase ? csBase->GetNumberOfCells() : 0; +} + +double* vtkmDataSet::GetPoint(vtkIdType ptId) +{ + static double point[3]; + this->GetPoint(ptId, point); + return point; +} + +void vtkmDataSet::GetPoint(vtkIdType id, double x[3]) +{ + auto pointArray = this->Internals->Coordinates.GetDataAsMultiplexer(); + auto portal = pointArray.ReadPortal(); + auto value = portal.Get(id); + x[0] = value[0]; + x[1] = value[1]; + x[2] = value[2]; +} + +vtkCell* vtkmDataSet::GetCell(vtkIdType cellId) +{ + this->GetCell(cellId, this->Internals->Cell); + return this->Internals->Cell->GetRepresentativeCell(); +} + +void vtkmDataSet::GetCell(vtkIdType cellId, vtkGenericCell* cell) +{ + cell->SetCellType(this->GetCellType(cellId)); + + auto* pointIds = cell->GetPointIds(); + this->GetCellPoints(cellId, pointIds); + + auto numPoints = pointIds->GetNumberOfIds(); + cell->GetPoints()->SetNumberOfPoints(numPoints); + for (vtkIdType i = 0; i < numPoints; ++i) + { + double x[3]; + this->GetPoint(pointIds->GetId(i), x); + cell->GetPoints()->SetPoint(i, x); + } +} + +void vtkmDataSet::GetCellBounds(vtkIdType cellId, double bounds[6]) +{ + if (this->Internals->Coordinates.GetData() + .IsType() && + this->Internals->CellSet.IsType>()) + { + auto portal = this->Internals->Coordinates.GetData() + .AsArrayHandle() + .ReadPortal(); + + vtkm::internal::ConnectivityStructuredInternals<3> helper; + helper.SetPointDimensions(portal.GetDimensions()); + auto id3 = helper.FlatToLogicalCellIndex(cellId); + auto min = portal.Get(id3); + auto max = min + portal.GetSpacing(); + for (int i = 0; i < 3; ++i) + { + bounds[2 * i] = min[i]; + bounds[2 * i + 1] = max[i]; + } + } + else + { + Superclass::GetCellBounds(cellId, bounds); + } +} + +int vtkmDataSet::GetCellType(vtkIdType cellId) +{ + auto* csBase = this->Internals->CellSet.GetCellSetBase(); + if (csBase) + { + return csBase->GetCellShape(cellId); + } + return VTK_EMPTY_CELL; +} + +void vtkmDataSet::GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) +{ + auto* csBase = this->Internals->CellSet.GetCellSetBase(); + if (csBase) + { + vtkm::Id numPoints = csBase->GetNumberOfPointsInCell(cellId); + ptIds->SetNumberOfIds(numPoints); + csBase->GetCellPointIds(cellId, ptIds->GetPointer(0)); + } +} + +namespace +{ + +struct WorkletGetPointCells : vtkm::worklet::WorkletVisitPointsWithCells +{ + using ControlSignature = void(CellSetIn); + using ExecutionSignature = void(CellCount, CellIndices, Device); + using ScatterType = vtkm::worklet::ScatterPermutation<>; + + explicit WorkletGetPointCells(vtkIdList* output) + : Output(output) + { + } + + template + VTKM_EXEC void operator()(vtkm::Id, IndicesVecType, vtkm::cont::DeviceAdapterTagCuda) const + { + } + + VTKM_SUPPRESS_EXEC_WARNINGS + template + VTKM_EXEC void operator()(vtkm::Id count, IndicesVecType idxs, Device) const + { + this->Output->SetNumberOfIds(count); + for (vtkm::Id i = 0; i < count; ++i) + { + this->Output->SetId(i, idxs[i]); + } + } + + vtkIdList* Output; +}; + +} // anonymous namespace + +void vtkmDataSet::GetPointCells(vtkIdType ptId, vtkIdList* cellIds) +{ + auto scatter = + WorkletGetPointCells::ScatterType(vtkm::cont::make_ArrayHandle(&ptId, 1, vtkm::CopyFlag::Off)); + vtkm::cont::Invoker invoke(vtkm::cont::DeviceAdapterTagSerial{}); + invoke(WorkletGetPointCells{ cellIds }, scatter, + this->Internals->CellSet.ResetCellSetList(SupportedCellSets{})); +} + +vtkIdType vtkmDataSet::FindPoint(double x[3]) +{ + auto& locator = this->Internals->PointLocator; + // critical section + { + std::lock_guard lock(locator.lock); + if (locator.buildTime < this->GetMTime()) + { + locator.control.reset(new vtkm::cont::PointLocatorSparseGrid); + locator.control->SetCoordinates(this->Internals->Coordinates); + locator.control->Update(); + locator.buildTime = this->GetMTime(); + } + } + vtkm::cont::Token token; + auto execLocator = + locator.control->PrepareForExecution(vtkm::cont::DeviceAdapterTagSerial{}, token); + + vtkm::Vec point(x[0], x[1], x[2]); + vtkm::Id pointId = -1; + vtkm::FloatDefault d2 = 0; + // exec object created for the Serial device can be called directly + execLocator.FindNearestNeighbor(point, pointId, d2); + return pointId; +} + +// non thread-safe version +vtkIdType vtkmDataSet::FindCell( + double x[3], vtkCell*, vtkIdType, double, int& subId, double pcoords[3], double* weights) +{ + // just call the thread-safe version + return this->FindCell(x, nullptr, nullptr, -1, 0.0, subId, pcoords, weights); +} + +// thread-safe version +vtkIdType vtkmDataSet::FindCell(double x[3], vtkCell*, vtkGenericCell*, vtkIdType, double, + int& subId, double pcoords[3], double* weights) +{ + auto& locator = this->Internals->CellLocator; + // critical section + { + std::lock_guard lock(locator.lock); + if (locator.buildTime < this->GetMTime()) + { + locator.control.reset(new vtkm::cont::CellLocatorGeneral); + locator.control->SetCellSet(this->Internals->CellSet); + locator.control->SetCoordinates(this->Internals->Coordinates); + locator.control->Update(); + locator.buildTime = this->GetMTime(); + } + } + vtkm::cont::Token token; + auto execLocator = + locator.control->PrepareForExecution(vtkm::cont::DeviceAdapterTagSerial{}, token); + + vtkm::Vec point(x[0], x[1], x[2]); + vtkm::Vec pc; + vtkm::Id cellId = -1; + // exec object created for the Serial device can be called directly + execLocator.FindCell(point, cellId, pc); + + if (cellId >= 0) + { + double closestPoint[3], dist2; + vtkNew vtkcell; + this->GetCell(cellId, vtkcell); + vtkcell->EvaluatePosition(x, closestPoint, subId, pcoords, dist2, weights); + } + + return cellId; +} + +void vtkmDataSet::Squeeze() +{ + Superclass::Squeeze(); + + this->Internals->PointLocator.control.reset(nullptr); + this->Internals->PointLocator.buildTime = 0; + this->Internals->CellLocator.control.reset(nullptr); + this->Internals->CellLocator.buildTime = 0; +} + +void vtkmDataSet::ComputeBounds() +{ + if (this->GetMTime() > this->ComputeTime) + { + vtkm::Bounds bounds = this->Internals->Coordinates.GetBounds(); + this->Bounds[0] = bounds.X.Min; + this->Bounds[1] = bounds.X.Max; + this->Bounds[2] = bounds.Y.Min; + this->Bounds[3] = bounds.Y.Max; + this->Bounds[4] = bounds.Z.Min; + this->Bounds[5] = bounds.Z.Max; + this->ComputeTime.Modified(); + } +} + +void vtkmDataSet::Initialize() +{ + Superclass::Initialize(); + this->Internals = std::make_shared(); +} + +namespace +{ + +struct MaxCellSize +{ + template + void operator()( + const vtkm::cont::CellSetStructured& cellset, vtkm::IdComponent& result) const + { + result = cellset.GetNumberOfPointsInCell(0); + } + + template + void operator()(const vtkm::cont::CellSetSingleType& cellset, vtkm::IdComponent& result) const + { + result = cellset.GetNumberOfPointsInCell(0); + } + + template + void operator()( + const vtkm::cont::CellSetExplicit& cellset, vtkm::IdComponent& result) const + { + auto counts = + cellset.GetNumIndicesArray(vtkm::TopologyElementTagCell{}, vtkm::TopologyElementTagPoint{}); + result = vtkm::cont::Algorithm::Reduce(counts, vtkm::IdComponent{ 0 }, vtkm::Maximum{}); + } + + template + void operator()(const CellSetType& cellset, vtkm::IdComponent& result) const + { + result = -1; + vtkm::Id numberOfCells = cellset.GetNumberOfCells(); + for (vtkm::Id i = 0; i < numberOfCells; ++i) + { + result = std::max(result, cellset.GetNumberOfPointsInCell(i)); + } + } +}; +} // anonymous namespace + +int vtkmDataSet::GetMaxCellSize() +{ + vtkm::IdComponent result = 0; + vtkm::cont::CastAndCall( + this->Internals->CellSet.ResetCellSetList(SupportedCellSets{}), MaxCellSize{}, result); + return result; +} + +unsigned long vtkmDataSet::GetActualMemorySize() +{ + return this->Superclass::GetActualMemorySize(); +} + +void vtkmDataSet::ShallowCopy(vtkDataObject* src) +{ + auto obj = vtkmDataSet::SafeDownCast(src); + if (obj) + { + Superclass::ShallowCopy(obj); + this->Internals = obj->Internals; + } +} + +void vtkmDataSet::DeepCopy(vtkDataObject* src) +{ + auto other = vtkmDataSet::SafeDownCast(src); + if (other) + { + auto* csBase = other->Internals->CellSet.GetCellSetBase(); + if (csBase) + { + this->Initialize(); + + this->Internals->CellSet = other->Internals->CellSet.NewInstance(); + this->Internals->CellSet.GetCellSetBase()->DeepCopy(csBase); + } + } +} diff --git a/Accelerators/Vtkm/DataModel/vtkmDataSet.h b/Accelerators/Vtkm/DataModel/vtkmDataSet.h new file mode 100644 index 000000000..51393e455 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmDataSet.h @@ -0,0 +1,195 @@ +//============================================================================ +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2015 Sandia Corporation. +// Copyright 2015 UT-Battelle, LLC. +// Copyright 2015 Los Alamos National Security. +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National +// Laboratory (LANL), the U.S. Government retains certain rights in +// this software. +//============================================================================ +#ifndef vtkmDataSet_h +#define vtkmDataSet_h + +#include "vtkAcceleratorsVTKmDataModelModule.h" // For export macro +#include "vtkDataSet.h" + +#include // for std::shared_ptr + +namespace vtkm +{ +namespace cont +{ + +class DataSet; + +} +} // vtkm::cont + +class vtkPoints; +class vtkCell; +class vtkGenericCell; + +class VTKACCELERATORSVTKMDATAMODEL_EXPORT vtkmDataSet : public vtkDataSet +{ +public: + vtkTypeMacro(vtkmDataSet, vtkDataSet); + void PrintSelf(ostream& os, vtkIndent indent) override; + + static vtkmDataSet* New(); + + void SetVtkmDataSet(const vtkm::cont::DataSet& ds); + vtkm::cont::DataSet GetVtkmDataSet() const; + + /** + * Copy the geometric and topological structure of an object. Note that + * the invoking object and the object pointed to by the parameter ds must + * be of the same type. + */ + void CopyStructure(vtkDataSet* ds) override; + + /** + * Determine the number of points composing the dataset. + */ + vtkIdType GetNumberOfPoints() override; + + /** + * Determine the number of cells composing the dataset. + */ + vtkIdType GetNumberOfCells() override; + + /** + * Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints. + */ + double* GetPoint(vtkIdType ptId) VTK_SIZEHINT(3) override; + + /** + * Copy point coordinates into user provided array x[3] for specified + * point id. + */ + void GetPoint(vtkIdType id, double x[3]) override; + + using vtkDataSet::GetCell; + /** + * Get cell with cellId such that: 0 <= cellId < NumberOfCells. + */ + vtkCell* GetCell(vtkIdType cellId) override; + void GetCell(vtkIdType cellId, vtkGenericCell* cell) override; + + /** + * Get the bounds of the cell with cellId such that: + * 0 <= cellId < NumberOfCells. + */ + void GetCellBounds(vtkIdType cellId, double bounds[6]) override; + + /** + * Get type of cell with cellId such that: 0 <= cellId < NumberOfCells. + */ + int GetCellType(vtkIdType cellId) override; + + /** + * Topological inquiry to get points defining cell. + */ + void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override; + + /** + * Topological inquiry to get cells using point. + */ + void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override; + + ///@{ + /** + * Locate the closest point to the global coordinate x. Return the + * point id. If point id < 0; then no point found. (This may arise + * when point is outside of dataset.) + */ + vtkIdType FindPoint(double x[3]) override; + ///@} + + /** + * Locate cell based on global coordinate x and tolerance + * squared. If cell and cellId is non-nullptr, then search starts from + * this cell and looks at immediate neighbors. Returns cellId >= 0 + * if inside, < 0 otherwise. The parametric coordinates are + * provided in pcoords[3]. The interpolation weights are returned in + * weights[]. (The number of weights is equal to the number of + * points in the found cell). Tolerance is used to control how close + * the point is to be considered "in" the cell. + */ + vtkIdType FindCell(double x[3], vtkCell* cell, vtkIdType cellId, double tol2, int& subId, + double pcoords[3], double* weights) override; + + /** + * This is a version of the above method that can be used with + * multithreaded applications. A vtkGenericCell must be passed in + * to be used in internal calls that might be made to GetCell() + */ + vtkIdType FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell, vtkIdType cellId, + double tol2, int& subId, double pcoords[3], double* weights) override; + + /** + * Reclaim any extra memory used to store data. + */ + void Squeeze() override; + + /** + * Compute the data bounding box from data points. + */ + void ComputeBounds() override; + + /** + * Restore data object to initial state. + * THIS METHOD IS NOT THREAD SAFE. + */ + void Initialize() override; + + /** + * Convenience method returns largest cell size in dataset. This is generally + * used to allocate memory for supporting data structures. + */ + int GetMaxCellSize() override; + + /** + * Return the actual size of the data in kibibytes (1024 bytes). This number + * is valid only after the pipeline has updated. The memory size + * returned is guaranteed to be greater than or equal to the + * memory required to represent the data (e.g., extra space in + * arrays, etc. are not included in the return value). + */ + unsigned long GetActualMemorySize() override; + + /** + * Return the type of data object. + */ + int GetDataObjectType() override { return VTK_DATA_SET; } + + ///@{ + /** + * Shallow and Deep copy. + */ + void ShallowCopy(vtkDataObject* src) override; + void DeepCopy(vtkDataObject* src) override; + ///@} + +protected: + vtkmDataSet(); + ~vtkmDataSet() override; + +private: + vtkmDataSet(const vtkmDataSet&) = delete; + void operator=(const vtkmDataSet&) = delete; + + struct DataMembers; + std::shared_ptr Internals; +}; + +#endif // vtkmDataSet_h diff --git a/Accelerators/Vtkm/DataModel/vtkmFilterPolicy.h b/Accelerators/Vtkm/DataModel/vtkmFilterPolicy.h new file mode 100644 index 000000000..eda35c4c3 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmFilterPolicy.h @@ -0,0 +1,48 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmFilterPolicy_h +#define vtkmFilterPolicy_h +#ifndef __VTK_WRAP__ +#ifndef VTK_WRAPPING_CXX + +#include "vtkmConfigDataModel.h" //required for general vtkm setup + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//------------------------------------------------------------------------------ +class vtkmOutputFilterPolicy : public vtkm::filter::PolicyBase +{ +public: + using FieldTypeList = tovtkm::FieldTypeOutVTK; + + using StructuredCellSetList = tovtkm::CellListStructuredOutVTK; + using UnstructuredCellSetList = tovtkm::CellListUnstructuredOutVTK; + using AllCellSetList = tovtkm::CellListAllOutVTK; +}; + +#endif +#endif +#endif +// VTK-HeaderTest-Exclude: vtkmFilterPolicy.h diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.cxx new file mode 100644 index 000000000..a1de6fad6 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.cxx @@ -0,0 +1,160 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "ArrayConverters.hxx" + +#include "vtkmDataArray.h" +#include "vtkmFilterPolicy.h" + +#include "vtkmlib/PortalTraits.h" + +#include +#include + +#include "vtkCellData.h" +#include "vtkDataArray.h" +#include "vtkDataObject.h" +#include "vtkDataSet.h" +#include "vtkPointData.h" +#include "vtkPoints.h" + +namespace tovtkm +{ +void ProcessFields(vtkDataSet* input, vtkm::cont::DataSet& dataset, tovtkm::FieldsFlag fields) +{ + if ((fields & tovtkm::FieldsFlag::Points) != tovtkm::FieldsFlag::None) + { + vtkPointData* pd = input->GetPointData(); + for (int i = 0; i < pd->GetNumberOfArrays(); i++) + { + vtkDataArray* array = pd->GetArray(i); + if (array == nullptr) + { + continue; + } + + vtkm::cont::Field pfield = tovtkm::Convert(array, vtkDataObject::FIELD_ASSOCIATION_POINTS); + dataset.AddField(pfield); + } + } + + if ((fields & tovtkm::FieldsFlag::Cells) != tovtkm::FieldsFlag::None) + { + vtkCellData* cd = input->GetCellData(); + for (int i = 0; i < cd->GetNumberOfArrays(); i++) + { + vtkDataArray* array = cd->GetArray(i); + if (array == nullptr) + { + continue; + } + + vtkm::cont::Field cfield = tovtkm::Convert(array, vtkDataObject::FIELD_ASSOCIATION_CELLS); + dataset.AddField(cfield); + } + } +} + +template +vtkm::cont::Field Convert(vtkmDataArray* input, int association) +{ + // we need to switch on if we are a cell or point field first! + // The problem is that the constructor signature for fields differ based + // on if they are a cell or point field. + if (association == vtkDataObject::FIELD_ASSOCIATION_POINTS) + { + return vtkm::cont::make_FieldPoint(input->GetName(), input->GetVtkmUnknownArrayHandle()); + } + else if (association == vtkDataObject::FIELD_ASSOCIATION_CELLS) + { + return vtkm::cont::make_FieldCell(input->GetName(), input->GetVtkmUnknownArrayHandle()); + } + + return vtkm::cont::Field(); +} + +// determine the type and call the proper Convert routine +vtkm::cont::Field Convert(vtkDataArray* input, int association) +{ + // The association will tell us if we have a cell or point field + + // We need to properly deduce the ValueType of the array. This means + // that we need to switch on Float/Double/Int, and then figure out the + // number of components. The upside is that the Convert Method can internally + // figure out the number of components, and not have to generate a lot + // of template to do so + + // Investigate using vtkArrayDispatch, AOS for all types, and than SOA for + // just + // float/double + vtkm::cont::Field field; + switch (input->GetDataType()) + { + vtkTemplateMacro( + vtkAOSDataArrayTemplate* typedIn1 = + vtkAOSDataArrayTemplate::FastDownCast(input); + if (typedIn1) { field = Convert(typedIn1, association); } else { + vtkSOADataArrayTemplate* typedIn2 = + vtkSOADataArrayTemplate::FastDownCast(input); + if (typedIn2) + { + field = Convert(typedIn2, association); + } + else + { + vtkmDataArray* typedIn3 = vtkmDataArray::SafeDownCast(input); + if (typedIn3) + { + field = Convert(typedIn3, association); + } + } + }); + // end vtkTemplateMacro + } + return field; +} +} // namespace tovtkm + +namespace fromvtkm +{ + +bool ConvertArrays(const vtkm::cont::DataSet& input, vtkDataSet* output) +{ + vtkPointData* pd = output->GetPointData(); + vtkCellData* cd = output->GetCellData(); + + vtkm::IdComponent numFields = input.GetNumberOfFields(); + for (vtkm::IdComponent i = 0; i < numFields; ++i) + { + const vtkm::cont::Field& f = input.GetField(i); + vtkDataArray* vfield = Convert(f); + if (vfield && f.GetAssociation() == vtkm::cont::Field::Association::POINTS) + { + pd->AddArray(vfield); + vfield->FastDelete(); + } + else if (vfield && f.GetAssociation() == vtkm::cont::Field::Association::CELL_SET) + { + cd->AddArray(vfield); + vfield->FastDelete(); + } + else if (vfield) + { + vfield->Delete(); + } + } + return true; +} +} // namespace fromvtkm diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.h b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.h new file mode 100644 index 000000000..f4837476c --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.h @@ -0,0 +1,64 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_ArrayConverters_h +#define vtkmlib_ArrayConverters_h + +#include "vtkmlib/DataArrayConverters.h" + +#include "vtkAcceleratorsVTKmDataModelModule.h" //required for correct implementation +#include "vtkmConfigDataModel.h" //required for general vtkm setup + +#include "vtkAOSDataArrayTemplate.h" +#include "vtkSOADataArrayTemplate.h" + +#include +#include + +#include // for std::underlying_type + +class vtkDataArray; +class vtkDataSet; +class vtkPoints; + +namespace vtkm +{ +namespace cont +{ +class DataSet; +class CoordinateSystem; +} +} + +namespace tovtkm +{ + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +void ProcessFields(vtkDataSet* input, vtkm::cont::DataSet& dataset, tovtkm::FieldsFlag fields); + +// determine the type and call the proper Convert routine +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::Field Convert(vtkDataArray* input, int association); +} + +namespace fromvtkm +{ + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +bool ConvertArrays(const vtkm::cont::DataSet& input, vtkDataSet* output); +} + +#endif // vtkmlib_ArrayConverters_h diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.hxx b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.hxx new file mode 100644 index 000000000..bae3b0c65 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConverters.hxx @@ -0,0 +1,93 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_ArrayConverters_hxx +#define vtkmlib_ArrayConverters_hxx + +#include "ArrayConverters.h" +#include "vtkmlib/DataArrayConverters.hxx" + +#include + +#include "vtkDataArray.h" +#include "vtkDataObject.h" + +namespace tovtkm +{ + +template +vtkm::cont::Field Convert(DataArrayType* input, int association) +{ + // we need to switch on if we are a cell or point field first! + // The problem is that the constructor signature for fields differ based + // on if they are a cell or point field. + if (association == vtkDataObject::FIELD_ASSOCIATION_POINTS) + { + return ConvertPointField(input); + } + else if (association == vtkDataObject::FIELD_ASSOCIATION_CELLS) + { + return ConvertCellField(input); + } + + return vtkm::cont::Field(); +} + +#if !defined(vtkmlib_ArrayConverterExport_cxx) +#define VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, ValueType) \ + extern template vtkm::cont::Field Convert>( \ + ArrayType * input, int association); +#else +#define VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, ValueType) \ + template vtkm::cont::Field Convert>( \ + ArrayType * input, int association); +#endif + +#define VTK_EXPORT_SIGNED_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, char) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, int) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, long) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, long long) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, short) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, signed char) + +#define VTK_EXPORT_UNSIGNED_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned char) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned int) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned long) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned long long) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned short) + +#define VTK_EXPORT_REAL_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, double) \ + VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, float) + +#if !defined(vtkmlib_ArrayConverterExport_cxx) +#define VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ + VTK_EXPORT_SIGNED_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ + VTK_EXPORT_UNSIGNED_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ + VTK_EXPORT_REAL_ARRAY_CONVERSION_TO_VTKM(ArrayType) + +VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM(vtkAOSDataArrayTemplate) +VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM(vtkSOADataArrayTemplate) + +#undef VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM +#undef VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL + +#endif // !defined(ArrayConverterExport_cxx) + +} // tovtkm +#endif diff --git a/Accelerators/Vtkm/vtkmlib/ArrayConvertersReal.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConvertersReal.cxx similarity index 100% rename from Accelerators/Vtkm/vtkmlib/ArrayConvertersReal.cxx rename to Accelerators/Vtkm/DataModel/vtkmlib/ArrayConvertersReal.cxx diff --git a/Accelerators/Vtkm/vtkmlib/ArrayConvertersSigned.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConvertersSigned.cxx similarity index 100% rename from Accelerators/Vtkm/vtkmlib/ArrayConvertersSigned.cxx rename to Accelerators/Vtkm/DataModel/vtkmlib/ArrayConvertersSigned.cxx diff --git a/Accelerators/Vtkm/vtkmlib/ArrayConvertersUnsigned.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/ArrayConvertersUnsigned.cxx similarity index 100% rename from Accelerators/Vtkm/vtkmlib/ArrayConvertersUnsigned.cxx rename to Accelerators/Vtkm/DataModel/vtkmlib/ArrayConvertersUnsigned.cxx diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/CellSetConverters.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/CellSetConverters.cxx new file mode 100644 index 000000000..b33464e2f --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/CellSetConverters.cxx @@ -0,0 +1,282 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "CellSetConverters.h" + +#include "ArrayConverters.hxx" +#include "DataSetConverters.h" + +#include "vtkmFilterPolicy.h" + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "vtkCellArray.h" +#include "vtkCellType.h" +#include "vtkIdTypeArray.h" +#include "vtkNew.h" +#include "vtkUnsignedCharArray.h" + +namespace tovtkm +{ + +namespace +{ + +struct ReorderHex : vtkm::worklet::WorkletMapField +{ + using ControlSignature = void(FieldInOut); + + void operator()(vtkm::Vec& indices) const + { + auto doSwap = [&](vtkm::IdComponent id1, vtkm::IdComponent id2) { + const auto t = indices[id1]; + indices[id1] = indices[id2]; + indices[id2] = t; + }; + + doSwap(2, 3); + doSwap(6, 7); + } +}; + +struct BuildSingleTypeCellSetVisitor +{ + template + vtkm::cont::DynamicCellSet operator()( + CellStateT& state, vtkm::UInt8 cellType, vtkm::IdComponent cellSize, vtkIdType numPoints) + { + using VTKIdT = typename CellStateT::ValueType; // might not be vtkIdType... + using VTKArrayT = vtkAOSDataArrayTemplate; + static constexpr bool IsVtkmIdType = std::is_same::value; + + // Construct an arrayhandle that holds the connectivity array + using DirectConverter = tovtkm::DataArrayToArrayHandle; + auto connHandleDirect = DirectConverter::Wrap(state.GetConnectivity()); + + // Cast if necessary: + auto connHandle = IsVtkmIdType ? connHandleDirect + : vtkm::cont::make_ArrayHandleCast(connHandleDirect); + + using ConnHandleType = typename std::decay::type; + using ConnStorageTag = typename ConnHandleType::StorageTag; + using CellSetType = vtkm::cont::CellSetSingleType; + + CellSetType cellSet; + cellSet.Fill(static_cast(numPoints), cellType, cellSize, connHandle); + return cellSet; + } +}; + +struct BuildSingleTypeVoxelCellSetVisitor +{ + template + vtkm::cont::DynamicCellSet operator()(CellStateT& state, vtkIdType numPoints) + { + vtkm::cont::ArrayHandle connHandle; + { + auto* conn = state.GetConnectivity(); + const auto* origData = conn->GetPointer(0); + const vtkm::Id numIds = conn->GetNumberOfValues(); + vtkm::cont::ArrayCopy( + vtkm::cont::make_ArrayHandle(origData, numIds, vtkm::CopyFlag::Off), connHandle); + + // reorder cells from voxel->hex: which only can run on + // devices that have shared memory / vtable with the CPU + vtkm::cont::ScopedRuntimeDeviceTracker tracker( + vtkm::cont::DeviceAdapterTagAny{}, vtkm::cont::RuntimeDeviceTrackerMode::Disable); + tracker.ResetDevice(vtkm::cont::DeviceAdapterTagTBB{}); + tracker.ResetDevice(vtkm::cont::DeviceAdapterTagOpenMP{}); + tracker.ResetDevice(vtkm::cont::DeviceAdapterTagSerial{}); + + vtkm::cont::Invoker invoke; + invoke(ReorderHex{}, vtkm::cont::make_ArrayHandleGroupVec<8>(connHandle)); + } + + using CellSetType = vtkm::cont::CellSetSingleType<>; + + CellSetType cellSet; + cellSet.Fill(numPoints, vtkm::CELL_SHAPE_HEXAHEDRON, 8, connHandle); + return cellSet; + } +}; + +} // end anon namespace + +// convert a cell array of a single type to a vtkm CellSetSingleType +vtkm::cont::DynamicCellSet ConvertSingleType( + vtkCellArray* cells, int cellType, vtkIdType numberOfPoints) +{ + switch (cellType) + { + case VTK_LINE: + return cells->Visit( + BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_LINE, 2, numberOfPoints); + + case VTK_HEXAHEDRON: + return cells->Visit( + BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_HEXAHEDRON, 8, numberOfPoints); + + case VTK_VOXEL: + // Note that this is a special case that reorders ids voxel to hex: + return cells->Visit(BuildSingleTypeVoxelCellSetVisitor{}, numberOfPoints); + + case VTK_QUAD: + return cells->Visit( + BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_QUAD, 4, numberOfPoints); + + case VTK_TETRA: + return cells->Visit( + BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_TETRA, 4, numberOfPoints); + + case VTK_TRIANGLE: + return cells->Visit( + BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_TRIANGLE, 3, numberOfPoints); + + case VTK_VERTEX: + return cells->Visit( + BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_VERTEX, 1, numberOfPoints); + + case VTK_WEDGE: + return cells->Visit( + BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_WEDGE, 6, numberOfPoints); + + case VTK_PYRAMID: + return cells->Visit( + BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_PYRAMID, 5, numberOfPoints); + + default: + break; + } + + throw vtkm::cont::ErrorBadType("Unsupported VTK cell type in " + "CellSetSingleType converter."); +} + +namespace +{ + +struct BuildExplicitCellSetVisitor +{ + template + vtkm::cont::DynamicCellSet operator()(CellStateT& state, + const vtkm::cont::ArrayHandle& shapes, vtkm::Id numPoints) const + { + using VTKIdT = typename CellStateT::ValueType; // might not be vtkIdType... + using VTKArrayT = vtkAOSDataArrayTemplate; + static constexpr bool IsVtkmIdType = std::is_same::value; + + // Construct arrayhandles to hold the arrays + using DirectConverter = tovtkm::DataArrayToArrayHandle; + auto offsetsHandleDirect = DirectConverter::Wrap(state.GetOffsets()); + auto connHandleDirect = DirectConverter::Wrap(state.GetConnectivity()); + + // Cast if necessary: + auto connHandle = IsVtkmIdType ? connHandleDirect + : vtkm::cont::make_ArrayHandleCast(connHandleDirect); + auto offsetsHandle = IsVtkmIdType + ? offsetsHandleDirect + : vtkm::cont::make_ArrayHandleCast(offsetsHandleDirect); + + using ShapesStorageTag = typename std::decay::type::StorageTag; + using ConnStorageTag = typename decltype(connHandle)::StorageTag; + using OffsetsStorageTag = typename decltype(offsetsHandle)::StorageTag; + using CellSetType = + vtkm::cont::CellSetExplicit; + + CellSetType cellSet; + cellSet.Fill(numPoints, shapes, connHandle, offsetsHandle); + return cellSet; + } +}; + +} // end anon namespace + +// convert a cell array of mixed types to a vtkm CellSetExplicit +vtkm::cont::DynamicCellSet Convert( + vtkUnsignedCharArray* types, vtkCellArray* cells, vtkIdType numberOfPoints) +{ + using ShapeArrayType = vtkAOSDataArrayTemplate; + using ShapeConverter = tovtkm::DataArrayToArrayHandle; + return cells->Visit(BuildExplicitCellSetVisitor{}, ShapeConverter::Wrap(types), numberOfPoints); +} + +} // namespace tovtkm + +namespace fromvtkm +{ + +bool Convert(const vtkm::cont::DynamicCellSet& toConvert, vtkCellArray* cells, + vtkUnsignedCharArray* typesArray) +{ + const auto* cellset = toConvert.GetCellSetBase(); + + // small hack as we can't compute properly the number of cells + // instead we will pre-allocate and than shrink + const vtkm::Id numCells = cellset->GetNumberOfCells(); + const vtkm::Id maxSize = numCells * 8; // largest cell type is hex + + // TODO this could steal the guts out of explicit cellsets as a future + // no-copy optimization. + vtkNew offsetsArray; + offsetsArray->SetNumberOfTuples(static_cast(numCells + 1)); + vtkNew connArray; + connArray->SetNumberOfTuples(static_cast(maxSize)); + + if (typesArray) + { + typesArray->SetNumberOfComponents(1); + typesArray->SetNumberOfTuples(static_cast(numCells)); + } + + vtkIdType* connIter = connArray->GetPointer(0); + const vtkIdType* connBegin = connIter; + + for (vtkm::Id cellId = 0; cellId < numCells; ++cellId) + { + const vtkIdType vtkCellId = static_cast(cellId); + const vtkm::Id npts = cellset->GetNumberOfPointsInCell(cellId); + assert(npts <= 8 && "Initial allocation assumes no more than 8 pts/cell."); + + const vtkIdType offset = static_cast(connIter - connBegin); + offsetsArray->SetValue(vtkCellId, offset); + + cellset->GetCellPointIds(cellId, connIter); + connIter += npts; + + if (typesArray) + { + typesArray->SetValue(vtkCellId, cellset->GetCellShape(cellId)); + } + } + + const vtkIdType connSize = static_cast(connIter - connBegin); + offsetsArray->SetValue(static_cast(numCells), connSize); + connArray->Resize(connSize); + cells->SetData(offsetsArray, connArray); + + return true; +} + +} // namespace fromvtkm diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/CellSetConverters.h b/Accelerators/Vtkm/DataModel/vtkmlib/CellSetConverters.h new file mode 100644 index 000000000..181982a60 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/CellSetConverters.h @@ -0,0 +1,49 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_CellSetConverters_h +#define vtkmlib_CellSetConverters_h + +#include "vtkAcceleratorsVTKmDataModelModule.h" +#include "vtkmConfigDataModel.h" //required for general vtkm setup + +#include +#include + +class vtkCellArray; +class vtkUnsignedCharArray; +class vtkIdTypeArray; + +namespace tovtkm +{ +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::DynamicCellSet ConvertSingleType( + vtkCellArray* cells, int cellType, vtkIdType numberOfPoints); + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::DynamicCellSet Convert( + vtkUnsignedCharArray* types, vtkCellArray* cells, vtkIdType numberOfPoints); +} + +namespace fromvtkm +{ + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +bool Convert(const vtkm::cont::DynamicCellSet& toConvert, vtkCellArray* cells, + vtkUnsignedCharArray* types = nullptr); +} + +#endif // vtkmlib_CellSetConverters_h diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.cxx new file mode 100644 index 000000000..0af4e2034 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.cxx @@ -0,0 +1,309 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#include "DataSetConverters.h" + +#include "ArrayConverters.h" +#include "CellSetConverters.h" +#include "ImageDataConverter.h" +#include "PolyDataConverter.h" +#include "UnstructuredGridConverter.h" + +#include "vtkmDataArray.h" + +#include "vtkCellArray.h" +#include "vtkCellData.h" +#include "vtkCellTypes.h" +#include "vtkDataObject.h" +#include "vtkDataObjectTypes.h" +#include "vtkDataSetAttributes.h" +#include "vtkImageData.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" +#include "vtkRectilinearGrid.h" +#include "vtkSmartPointer.h" +#include "vtkStructuredGrid.h" +#include "vtkUnstructuredGrid.h" + +#include +#include +#include +#include +#include + +namespace tovtkm +{ + +namespace +{ + +template +vtkm::cont::CoordinateSystem deduce_container(vtkPoints* points) +{ + typedef vtkm::Vec Vec3; + + vtkAOSDataArrayTemplate* typedIn = vtkAOSDataArrayTemplate::FastDownCast(points->GetData()); + if (typedIn) + { + auto p = DataArrayToArrayHandle, 3>::Wrap(typedIn); + return vtkm::cont::CoordinateSystem("coords", p); + } + + vtkSOADataArrayTemplate* typedIn2 = + vtkSOADataArrayTemplate::FastDownCast(points->GetData()); + if (typedIn2) + { + auto p = DataArrayToArrayHandle, 3>::Wrap(typedIn2); + return vtkm::cont::CoordinateSystem("coords", p); + } + + vtkmDataArray* typedIn3 = vtkmDataArray::SafeDownCast(points->GetData()); + if (typedIn3) + { + return vtkm::cont::CoordinateSystem("coords", typedIn3->GetVtkmUnknownArrayHandle()); + } + + typedef vtkm::Vec Vec3; + Vec3* xyz = nullptr; + return vtkm::cont::make_CoordinateSystem("coords", xyz, 0); +} +} +//------------------------------------------------------------------------------ +// convert a vtkPoints array into a coordinate system +vtkm::cont::CoordinateSystem Convert(vtkPoints* points) +{ + if (points) + { + if (points->GetDataType() == VTK_FLOAT) + { + return deduce_container(points); + } + else if (points->GetDataType() == VTK_DOUBLE) + { + return deduce_container(points); + } + } + + // unsupported/null point set + typedef vtkm::Vec Vec3; + Vec3* xyz = nullptr; + return vtkm::cont::make_CoordinateSystem("coords", xyz, 0); +} + +//------------------------------------------------------------------------------ +// convert an structured grid type +vtkm::cont::DataSet Convert(vtkStructuredGrid* input, FieldsFlag fields) +{ + const int dimensionality = input->GetDataDimension(); + int dims[3]; + input->GetDimensions(dims); + + vtkm::cont::DataSet dataset; + + // first step convert the points over to an array handle + vtkm::cont::CoordinateSystem coords = Convert(input->GetPoints()); + dataset.AddCoordinateSystem(coords); + + // second step is to create structured cellset that represe + if (dimensionality == 1) + { + vtkm::cont::CellSetStructured<1> cells; + cells.SetPointDimensions(dims[0]); + dataset.SetCellSet(cells); + } + else if (dimensionality == 2) + { + vtkm::cont::CellSetStructured<2> cells; + cells.SetPointDimensions(vtkm::make_Vec(dims[0], dims[1])); + dataset.SetCellSet(cells); + } + else + { // going to presume 3d for everything else + vtkm::cont::CellSetStructured<3> cells; + cells.SetPointDimensions(vtkm::make_Vec(dims[0], dims[1], dims[2])); + dataset.SetCellSet(cells); + } + + ProcessFields(input, dataset, fields); + + return dataset; +} + +//------------------------------------------------------------------------------ +// determine the type and call the proper Convert routine +vtkm::cont::DataSet Convert(vtkDataSet* input, FieldsFlag fields) +{ + switch (input->GetDataObjectType()) + { + case VTK_UNSTRUCTURED_GRID: + return Convert(vtkUnstructuredGrid::SafeDownCast(input), fields); + case VTK_STRUCTURED_GRID: + return Convert(vtkStructuredGrid::SafeDownCast(input), fields); + case VTK_UNIFORM_GRID: + case VTK_IMAGE_DATA: + return Convert(vtkImageData::SafeDownCast(input), fields); + case VTK_POLY_DATA: + return Convert(vtkPolyData::SafeDownCast(input), fields); + + case VTK_UNSTRUCTURED_GRID_BASE: + case VTK_RECTILINEAR_GRID: + case VTK_STRUCTURED_POINTS: + default: + return vtkm::cont::DataSet(); + } +} + +} // namespace tovtkm + +namespace fromvtkm +{ + +namespace +{ + +struct ComputeExtents +{ + template + void operator()(const vtkm::cont::CellSetStructured& cs, + const vtkm::Id3& structuredCoordsDims, int extent[6]) const + { + auto extStart = cs.GetGlobalPointIndexStart(); + for (int i = 0, ii = 0; i < 3; ++i) + { + if (structuredCoordsDims[i] > 1) + { + extent[2 * i] = vtkm::VecTraits::GetComponent(extStart, ii++); + extent[(2 * i) + 1] = extent[2 * i] + structuredCoordsDims[i] - 1; + } + else + { + extent[2 * i] = extent[(2 * i) + 1] = 0; + } + } + } + + template + void operator()(const vtkm::cont::CellSetStructured& cs, int extent[6]) const + { + auto extStart = cs.GetGlobalPointIndexStart(); + auto csDim = cs.GetPointDimensions(); + for (int i = 0; i < Dim; ++i) + { + extent[2 * i] = vtkm::VecTraits::GetComponent(extStart, i); + extent[(2 * i) + 1] = + extent[2 * i] + vtkm::VecTraits::GetComponent(csDim, i) - 1; + } + for (int i = Dim; i < 3; ++i) + { + extent[2 * i] = extent[(2 * i) + 1] = 0; + } + } +}; +} // anonymous namespace + +void PassAttributesInformation(vtkDataSetAttributes* input, vtkDataSetAttributes* output) +{ + for (int attribType = 0; attribType < vtkDataSetAttributes::NUM_ATTRIBUTES; attribType++) + { + vtkDataArray* attribute = input->GetAttribute(attribType); + if (attribute == nullptr) + { + continue; + } + output->SetActiveAttribute(attribute->GetName(), attribType); + } +} + +bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkRectilinearGrid* output, vtkDataSet* input) +{ + using ListCellSetStructured = vtkm::List, + vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3>>; + auto cellSet = vtkmOut.GetCellSet().ResetCellSetList(ListCellSetStructured{}); + + using coordType = + vtkm::cont::ArrayHandleCartesianProduct, + vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle>; + auto coordsArray = vtkm::cont::Cast(vtkmOut.GetCoordinateSystem().GetData()); + + vtkSmartPointer xArray = + Convert(vtkm::cont::make_FieldPoint("xArray", coordsArray.GetFirstArray())); + vtkSmartPointer yArray = + Convert(vtkm::cont::make_FieldPoint("yArray", coordsArray.GetSecondArray())); + vtkSmartPointer zArray = + Convert(vtkm::cont::make_FieldPoint("zArray", coordsArray.GetThirdArray())); + + if (!xArray || !yArray || !zArray) + { + return false; + } + + vtkm::Id3 dims( + xArray->GetNumberOfValues(), yArray->GetNumberOfValues(), zArray->GetNumberOfValues()); + + int extents[6]; + vtkm::cont::CastAndCall(cellSet, ComputeExtents{}, dims, extents); + + output->SetExtent(extents); + output->SetXCoordinates(xArray); + output->SetYCoordinates(yArray); + output->SetZCoordinates(zArray); + + // Next we need to convert any extra fields from vtkm over to vtk + if (!fromvtkm::ConvertArrays(vtkmOut, output)) + { + return false; + } + + // Pass information about attributes. + PassAttributesInformation(input->GetPointData(), output->GetPointData()); + PassAttributesInformation(input->GetCellData(), output->GetCellData()); + + return true; +} + +bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkStructuredGrid* output, vtkDataSet* input) +{ + using ListCellSetStructured = vtkm::List, + vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3>>; + auto cellSet = vtkmOut.GetCellSet().ResetCellSetList(ListCellSetStructured{}); + + int extents[6]; + vtkm::cont::CastAndCall(cellSet, ComputeExtents{}, extents); + + vtkSmartPointer points = Convert(vtkmOut.GetCoordinateSystem()); + if (!points) + { + return false; + } + + output->SetExtent(extents); + output->SetPoints(points); + + // Next we need to convert any extra fields from vtkm over to vtk + if (!fromvtkm::ConvertArrays(vtkmOut, output)) + { + return false; + } + + // Pass information about attributes. + PassAttributesInformation(input->GetPointData(), output->GetPointData()); + PassAttributesInformation(input->GetCellData(), output->GetCellData()); + + return true; +} + +} // namespace fromvtkm diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.h b/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.h new file mode 100644 index 000000000..65b4aa4b0 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.h @@ -0,0 +1,65 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_DataSetConverters_h +#define vtkmlib_DataSetConverters_h + +#include "vtkAcceleratorsVTKmDataModelModule.h" + +#include "ArrayConverters.h" // for FieldsFlag + +#include "vtkmConfigDataModel.h" //required for general vtkm setup + +#include + +class vtkDataSet; +class vtkDataSetAttributes; +class vtkImageData; +class vtkPoints; +class vtkRectilinearGrid; +class vtkStructuredGrid; + +namespace tovtkm +{ + +// convert a vtkPoints array into a coordinate system +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::CoordinateSystem Convert(vtkPoints* points); + +// convert an structured grid type +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::DataSet Convert(vtkStructuredGrid* input, FieldsFlag fields = FieldsFlag::None); + +// determine the type and call the proper Convert routine +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::DataSet Convert(vtkDataSet* input, FieldsFlag fields = FieldsFlag::None); +} + +namespace fromvtkm +{ + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +void PassAttributesInformation(vtkDataSetAttributes* input, vtkDataSetAttributes* output); + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkRectilinearGrid* output, vtkDataSet* input); + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkStructuredGrid* output, vtkDataSet* input); + +} + +#endif // vtkmlib_DataSetConverters_h diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.cxx new file mode 100644 index 000000000..92f5107af --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.cxx @@ -0,0 +1,172 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: ImageDataConverter.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "ImageDataConverter.h" + +#include +#include + +#include "ArrayConverters.h" +#include "DataSetConverters.h" + +#include "vtkCellData.h" +#include "vtkDataArray.h" +#include "vtkDataSetAttributes.h" +#include "vtkImageData.h" +#include "vtkPointData.h" + +namespace +{ + +struct ComputeExtents +{ + template + void operator()(const vtkm::cont::CellSetStructured& cs, + const vtkm::Id3& structuredCoordsDims, int extent[6]) const + { + auto extStart = cs.GetGlobalPointIndexStart(); + for (int i = 0, ii = 0; i < 3; ++i) + { + if (structuredCoordsDims[i] > 1) + { + extent[2 * i] = vtkm::VecTraits::GetComponent(extStart, ii++); + extent[(2 * i) + 1] = extent[2 * i] + structuredCoordsDims[i] - 1; + } + else + { + extent[2 * i] = extent[(2 * i) + 1] = 0; + } + } + } +}; + +struct SetGlobalPointIndexStart +{ + template + void operator()(const vtkm::cont::CellSetStructured&, const vtkm::Id3& structuredCoordsDims, + const int extent[6], DynamicCellSetType& dcs) const + { + typename vtkm::cont::CellSetStructured::SchedulingRangeType extStart{}; + for (int i = 0, ii = 0; i < 3; ++i) + { + if (structuredCoordsDims[i] > 1) + { + vtkm::VecTraits::SetComponent(extStart, ii++, extent[2 * i]); + } + } + vtkm::cont::Cast>(dcs).SetGlobalPointIndexStart(extStart); + } +}; + +} // anonymous namespace + +namespace tovtkm +{ + +//------------------------------------------------------------------------------ +// convert an image data type +vtkm::cont::DataSet Convert(vtkImageData* input, FieldsFlag fields) +{ + int extent[6]; + input->GetExtent(extent); + double vorigin[3]; + input->GetOrigin(vorigin); + double vspacing[3]; + input->GetSpacing(vspacing); + int vdims[3]; + input->GetDimensions(vdims); + + vtkm::Vec origin( + static_cast((static_cast(extent[0]) * vspacing[0]) + vorigin[0]), + static_cast((static_cast(extent[2]) * vspacing[1]) + vorigin[1]), + static_cast((static_cast(extent[4]) * vspacing[2]) + vorigin[2])); + vtkm::Vec spacing(static_cast(vspacing[0]), + static_cast(vspacing[1]), static_cast(vspacing[2])); + vtkm::Id3 dims(vdims[0], vdims[1], vdims[2]); + + vtkm::cont::DataSet dataset = vtkm::cont::DataSetBuilderUniform::Create(dims, origin, spacing); + + using ListCellSetStructured = vtkm::List, + vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3>>; + auto cellSet = dataset.GetCellSet().ResetCellSetList(ListCellSetStructured{}); + vtkm::cont::CastAndCall(cellSet, SetGlobalPointIndexStart{}, dims, extent, dataset.GetCellSet()); + + ProcessFields(input, dataset, fields); + + return dataset; +} + +} // tovtkm + +namespace fromvtkm +{ + +bool Convert( + const vtkm::cont::DataSet& voutput, int extents[6], vtkImageData* output, vtkDataSet* input) +{ + vtkm::cont::CoordinateSystem const& cs = voutput.GetCoordinateSystem(); + if (!cs.GetData().IsType()) + { + return false; + } + + auto points = cs.GetData().AsArrayHandle(); + auto portal = points.ReadPortal(); + + auto origin = portal.GetOrigin(); + auto spacing = portal.GetSpacing(); + auto dim = portal.GetDimensions(); + VTKM_ASSERT((extents[1] - extents[0] + 1) == dim[0] && (extents[3] - extents[2] + 1) == dim[1] && + (extents[5] - extents[4] + 1) == dim[2]); + + origin[0] -= static_cast(extents[0]) * spacing[0]; + origin[1] -= static_cast(extents[2]) * spacing[1]; + origin[2] -= static_cast(extents[4]) * spacing[2]; + + output->SetExtent(extents); + output->SetOrigin(origin[0], origin[1], origin[2]); + output->SetSpacing(spacing[0], spacing[1], spacing[2]); + + // Next we need to convert any extra fields from vtkm over to vtk + bool arraysConverted = fromvtkm::ConvertArrays(voutput, output); + + // Pass information about attributes. + PassAttributesInformation(input->GetPointData(), output->GetPointData()); + PassAttributesInformation(input->GetCellData(), output->GetCellData()); + + return arraysConverted; +} + +bool Convert(const vtkm::cont::DataSet& voutput, vtkImageData* output, vtkDataSet* input) +{ + vtkm::cont::CoordinateSystem const& cs = voutput.GetCoordinateSystem(); + if (!cs.GetData().IsType()) + { + return false; + } + + auto points = cs.GetData().AsArrayHandle(); + auto portal = points.ReadPortal(); + + auto dim = portal.GetDimensions(); + int extents[6]; + using ListCellSetStructured = vtkm::List, + vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3>>; + auto cellSet = voutput.GetCellSet().ResetCellSetList(ListCellSetStructured{}); + vtkm::cont::CastAndCall(cellSet, ComputeExtents{}, dim, extents); + + return Convert(voutput, extents, output, input); +} + +} // fromvtkm diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.h b/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.h new file mode 100644 index 000000000..67d405394 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/ImageDataConverter.h @@ -0,0 +1,48 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: ImageDataConverter.h + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#ifndef vtkmlib_ImageDataConverter_h +#define vtkmlib_ImageDataConverter_h + +#include "vtkAcceleratorsVTKmDataModelModule.h" + +#include "ArrayConverters.h" // for FieldsFlag + +#include "vtkmConfigDataModel.h" //required for general vtkm setup + +#include + +class vtkImageData; +class vtkDataSet; + +namespace tovtkm +{ + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::DataSet Convert(vtkImageData* input, FieldsFlag fields = FieldsFlag::None); + +} + +namespace fromvtkm +{ + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +bool Convert(const vtkm::cont::DataSet& voutput, vtkImageData* output, vtkDataSet* input); + +VTKACCELERATORSVTKMDATAMODEL_EXPORT +bool Convert( + const vtkm::cont::DataSet& voutput, int extents[6], vtkImageData* output, vtkDataSet* input); + +} +#endif // vtkmlib_ImageDataConverter_h diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.cxx new file mode 100644 index 000000000..814af43cc --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.cxx @@ -0,0 +1,144 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "ImplicitFunctionConverter.h" + +#include "vtkmFilterPolicy.h" + +#include "vtkBox.h" +#include "vtkCylinder.h" +#include "vtkPlane.h" +#include "vtkSphere.h" + +#include + +namespace tovtkm +{ + +inline vtkm::Vec MakeFVec3(const double x[3]) +{ + return vtkm::Vec(static_cast(x[0]), + static_cast(x[1]), static_cast(x[2])); +} + +ImplicitFunctionConverter::ImplicitFunctionConverter() + : InFunction(nullptr) + , MTime(0) +{ +} + +void ImplicitFunctionConverter::Set(vtkImplicitFunction* function) +{ + vtkBox* box = nullptr; + vtkCylinder* cylinder = nullptr; + vtkPlane* plane = nullptr; + vtkSphere* sphere = nullptr; + + if ((box = vtkBox::SafeDownCast(function))) + { + double xmin[3], xmax[3]; + box->GetXMin(xmin); + box->GetXMax(xmax); + + this->OutFunction = vtkm::Box(MakeFVec3(xmin), MakeFVec3(xmax)); + } + else if ((cylinder = vtkCylinder::SafeDownCast(function))) + { + double center[3], axis[3], radius; + cylinder->GetCenter(center); + cylinder->GetAxis(axis); + radius = cylinder->GetRadius(); + + this->OutFunction = + vtkm::Cylinder(MakeFVec3(center), MakeFVec3(axis), static_cast(radius)); + } + else if ((plane = vtkPlane::SafeDownCast(function))) + { + double origin[3], normal[3]; + plane->GetOrigin(origin); + plane->GetNormal(normal); + + this->OutFunction = vtkm::Plane(MakeFVec3(origin), MakeFVec3(normal)); + } + else if ((sphere = vtkSphere::SafeDownCast(function))) + { + double center[3], radius; + sphere->GetCenter(center); + radius = sphere->GetRadius(); + + this->OutFunction = vtkm::Sphere(MakeFVec3(center), static_cast(radius)); + } + else + { + vtkGenericWarningMacro(<< "The implicit functions " << function->GetClassName() + << " is not supported by vtk-m."); + return; + } + + this->MTime = function->GetMTime(); + this->InFunction = function; +} + +const vtkm::ImplicitFunctionGeneral& ImplicitFunctionConverter::Get() +{ + if (this->InFunction && (this->MTime < this->InFunction->GetMTime())) + { + vtkBox* box = nullptr; + vtkCylinder* cylinder = nullptr; + vtkPlane* plane = nullptr; + vtkSphere* sphere = nullptr; + + if ((box = vtkBox::SafeDownCast(this->InFunction))) + { + double xmin[3], xmax[3]; + box->GetXMin(xmin); + box->GetXMax(xmax); + + this->OutFunction = vtkm::Box(MakeFVec3(xmin), MakeFVec3(xmax)); + } + else if ((cylinder = vtkCylinder::SafeDownCast(this->InFunction))) + { + double center[3], axis[3], radius; + cylinder->GetCenter(center); + cylinder->GetAxis(axis); + radius = cylinder->GetRadius(); + + this->OutFunction = + vtkm::Cylinder(MakeFVec3(center), MakeFVec3(axis), static_cast(radius)); + } + else if ((plane = vtkPlane::SafeDownCast(this->InFunction))) + { + double origin[3], normal[3]; + plane->GetOrigin(origin); + plane->GetNormal(normal); + + this->OutFunction = vtkm::Plane(MakeFVec3(origin), MakeFVec3(normal)); + } + else if ((sphere = vtkSphere::SafeDownCast(this->InFunction))) + { + double center[3], radius; + sphere->GetCenter(center); + radius = sphere->GetRadius(); + + this->OutFunction = vtkm::Sphere(MakeFVec3(center), static_cast(radius)); + } + + this->MTime = this->InFunction->GetMTime(); + } + + return this->OutFunction; +} + +} // tovtkm diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.h b/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.h new file mode 100644 index 000000000..a1a571c93 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/ImplicitFunctionConverter.h @@ -0,0 +1,46 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#ifndef vtkmlib_ImplicitFunctionConverter_h +#define vtkmlib_ImplicitFunctionConverter_h + +#include "vtkAcceleratorsVTKmDataModelModule.h" +#include "vtkType.h" // For vtkMTimeType +#include "vtkmConfigDataModel.h" //required for general vtkm setup + +#include "vtkm/ImplicitFunction.h" + +class vtkImplicitFunction; + +namespace tovtkm +{ + +class VTKACCELERATORSVTKMDATAMODEL_EXPORT ImplicitFunctionConverter +{ +public: + ImplicitFunctionConverter(); + + void Set(vtkImplicitFunction*); + const vtkm::ImplicitFunctionGeneral& Get(); + +private: + vtkImplicitFunction* InFunction; + vtkm::ImplicitFunctionGeneral OutFunction; + mutable vtkMTimeType MTime; +}; + +} + +#endif // vtkmlib_ImplicitFunctionConverter_h diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/PolyDataConverter.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/PolyDataConverter.cxx new file mode 100644 index 000000000..6bc8632eb --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/PolyDataConverter.cxx @@ -0,0 +1,217 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "PolyDataConverter.h" + +#include "ArrayConverters.h" +#include "CellSetConverters.h" +#include "DataSetConverters.h" + +// datasets we support +#include "vtkCellArray.h" +#include "vtkCellData.h" +#include "vtkCellTypes.h" +#include "vtkDataObject.h" +#include "vtkDataObjectTypes.h" +#include "vtkDataSetAttributes.h" +#include "vtkImageData.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" +#include "vtkStructuredGrid.h" +#include "vtkUniformGrid.h" +#include "vtkUnstructuredGrid.h" + +#include +#include +#include + +namespace +{ +struct build_type_array +{ + template + void operator()(CellStateT& state, vtkUnsignedCharArray* types) const + { + const vtkIdType size = state.GetNumberOfCells(); + for (vtkIdType i = 0; i < size; ++i) + { + auto cellSize = state.GetCellSize(i); + unsigned char cellType; + switch (cellSize) + { + case 3: + cellType = VTK_TRIANGLE; + break; + case 4: + cellType = VTK_QUAD; + break; + default: + cellType = VTK_POLYGON; + break; + } + types->SetValue(i, cellType); + } + } +}; +} +namespace tovtkm +{ + +//------------------------------------------------------------------------------ +// convert an polydata type +vtkm::cont::DataSet Convert(vtkPolyData* input, FieldsFlag fields) +{ + // the poly data is an interesting issue with the fact that the + // vtk datastructure can contain multiple types. + // we should look at querying the cell types, so we can use single cell + // set where possible + vtkm::cont::DataSet dataset; + + // first step convert the points over to an array handle + vtkm::cont::CoordinateSystem coords = Convert(input->GetPoints()); + dataset.AddCoordinateSystem(coords); + + // first check if we only have polys/lines/verts + bool filled = false; + const bool onlyPolys = (input->GetNumberOfCells() == input->GetNumberOfPolys()); + const bool onlyLines = (input->GetNumberOfCells() == input->GetNumberOfLines()); + const bool onlyVerts = (input->GetNumberOfCells() == input->GetNumberOfVerts()); + + const vtkIdType numPoints = input->GetNumberOfPoints(); + if (onlyPolys) + { + vtkCellArray* cells = input->GetPolys(); + const vtkIdType homoSize = cells->IsHomogeneous(); + if (homoSize == 3) + { + // We are all triangles + vtkm::cont::DynamicCellSet dcells = ConvertSingleType(cells, VTK_TRIANGLE, numPoints); + dataset.SetCellSet(dcells); + filled = true; + } + else if (homoSize == 4) + { + // We are all quads + vtkm::cont::DynamicCellSet dcells = ConvertSingleType(cells, VTK_QUAD, numPoints); + dataset.SetCellSet(dcells); + filled = true; + } + else + { + // need to construct a vtkUnsignedCharArray* types mapping for our zoo data + // we can do this by mapping number of points per cell to the type + // 3 == tri, 4 == quad, else polygon + vtkNew types; + types->SetNumberOfComponents(1); + types->SetNumberOfTuples(static_cast(cells->GetNumberOfCells())); + + cells->Visit(build_type_array{}, types.GetPointer()); + + vtkm::cont::DynamicCellSet dcells = Convert(types, cells, numPoints); + dataset.SetCellSet(dcells); + filled = true; + } + } + else if (onlyLines) + { + vtkCellArray* cells = input->GetLines(); + const vtkIdType homoSize = cells->IsHomogeneous(); + if (homoSize == 2) + { + // We are all lines + vtkm::cont::DynamicCellSet dcells = ConvertSingleType(cells, VTK_LINE, numPoints); + dataset.SetCellSet(dcells); + filled = true; + } + else + { + vtkErrorWithObjectMacro(input, + "VTK-m does not currently support " + "PolyLine cells."); + } + } + else if (onlyVerts) + { + vtkCellArray* cells = input->GetVerts(); + const vtkIdType homoSize = cells->IsHomogeneous(); + if (homoSize == 1) + { + // We are all single vertex + vtkm::cont::DynamicCellSet dcells = ConvertSingleType(cells, VTK_VERTEX, numPoints); + dataset.SetCellSet(dcells); + filled = true; + } + else + { + vtkErrorWithObjectMacro(input, + "VTK-m does not currently support " + "PolyVertex cells."); + } + } + else + { + vtkErrorWithObjectMacro(input, + "VTK-m does not currently support mixed " + "cell types or triangle strips in " + "vtkPolyData."); + } + + if (!filled) + { + // todo: we need to convert a mixed type which + } + + ProcessFields(input, dataset, fields); + + return dataset; +} + +} // namespace tovtkm + +namespace fromvtkm +{ + +//------------------------------------------------------------------------------ +bool Convert(const vtkm::cont::DataSet& voutput, vtkPolyData* output, vtkDataSet* input) +{ + vtkPoints* points = fromvtkm::Convert(voutput.GetCoordinateSystem()); + output->SetPoints(points); + points->FastDelete(); + + // this should be fairly easy as the cells are all a single cell type + // so we just need to determine what cell type it is and copy the results + // into a new array + vtkm::cont::DynamicCellSet const& outCells = voutput.GetCellSet(); + vtkNew cells; + const bool cellsConverted = fromvtkm::Convert(outCells, cells.GetPointer()); + if (!cellsConverted) + { + return false; + } + + output->SetPolys(cells.GetPointer()); + + // next we need to convert any extra fields from vtkm over to vtk + bool arraysConverted = ConvertArrays(voutput, output); + + // Pass information about attributes. + PassAttributesInformation(input->GetPointData(), output->GetPointData()); + PassAttributesInformation(input->GetCellData(), output->GetCellData()); + + return arraysConverted; +} + +} // namespace fromvtkm diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/PolyDataConverter.h b/Accelerators/Vtkm/DataModel/vtkmlib/PolyDataConverter.h new file mode 100644 index 000000000..dcadf33cb --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/PolyDataConverter.h @@ -0,0 +1,43 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_PolyDataConverter_h +#define vtkmlib_PolyDataConverter_h + +#include "vtkAcceleratorsVTKmDataModelModule.h" + +#include "ArrayConverters.h" // for FieldsFlag + +#include "vtkmConfigDataModel.h" //required for general vtkm setup + +#include + +class vtkPolyData; +class vtkDataSet; + +namespace tovtkm +{ +// convert an polydata type +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::DataSet Convert(vtkPolyData* input, FieldsFlag fields = FieldsFlag::None); +} + +namespace fromvtkm +{ +VTKACCELERATORSVTKMDATAMODEL_EXPORT +bool Convert(const vtkm::cont::DataSet& voutput, vtkPolyData* output, vtkDataSet* input); +} +#endif // vtkmlib_PolyDataConverter_h diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/UnstructuredGridConverter.cxx b/Accelerators/Vtkm/DataModel/vtkmlib/UnstructuredGridConverter.cxx new file mode 100644 index 000000000..e093e1ae2 --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/UnstructuredGridConverter.cxx @@ -0,0 +1,122 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#include "UnstructuredGridConverter.h" + +#include "ArrayConverters.h" +#include "CellSetConverters.h" +#include "DataSetConverters.h" + +// datasets we support +#include "vtkCellArray.h" +#include "vtkCellData.h" +#include "vtkCellTypes.h" +#include "vtkDataObject.h" +#include "vtkDataObjectTypes.h" +#include "vtkDataSetAttributes.h" +#include "vtkImageData.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" +#include "vtkStructuredGrid.h" +#include "vtkUniformGrid.h" +#include "vtkUnstructuredGrid.h" + +#include +#include +#include + +namespace tovtkm +{ + +//------------------------------------------------------------------------------ +// convert an unstructured grid type +vtkm::cont::DataSet Convert(vtkUnstructuredGrid* input, FieldsFlag fields) +{ + // This will need to use the custom storage and portals so that + // we can efficiently map between VTK and VTKm + vtkm::cont::DataSet dataset; + + // first step convert the points over to an array handle + vtkm::cont::CoordinateSystem coords = Convert(input->GetPoints()); + dataset.AddCoordinateSystem(coords); + // last + + // Use our custom explicit cell set to do the conversion + const vtkIdType numPoints = input->GetNumberOfPoints(); + if (input->IsHomogeneous()) + { + int cellType = input->GetCellType(0); // get the celltype + vtkm::cont::DynamicCellSet cells = ConvertSingleType(input->GetCells(), cellType, numPoints); + dataset.SetCellSet(cells); + } + else + { + vtkm::cont::DynamicCellSet cells = + Convert(input->GetCellTypesArray(), input->GetCells(), numPoints); + dataset.SetCellSet(cells); + } + + ProcessFields(input, dataset, fields); + + return dataset; +} + +} // namespace tovtkm + +namespace fromvtkm +{ + +//------------------------------------------------------------------------------ +bool Convert(const vtkm::cont::DataSet& voutput, vtkUnstructuredGrid* output, vtkDataSet* input) +{ + vtkPoints* points = fromvtkm::Convert(voutput.GetCoordinateSystem()); + // If this fails, it's likely a missing entry in tovtkm::PointListOutVTK: + if (!points) + { + return false; + } + output->SetPoints(points); + points->FastDelete(); + + // With unstructured grids we need to actually convert 3 arrays from + // vtkm to vtk + vtkNew cells; + vtkNew types; + vtkm::cont::DynamicCellSet const& outCells = voutput.GetCellSet(); + + const bool cellsConverted = fromvtkm::Convert(outCells, cells.GetPointer(), types.GetPointer()); + + if (!cellsConverted) + { + return false; + } + + output->SetCells(types.GetPointer(), cells.GetPointer()); + + // now have to set this info back to the unstructured grid + + // Next we need to convert any extra fields from vtkm over to vtk + const bool arraysConverted = fromvtkm::ConvertArrays(voutput, output); + + // Pass information about attributes. + PassAttributesInformation(input->GetPointData(), output->GetPointData()); + PassAttributesInformation(input->GetCellData(), output->GetCellData()); + + return arraysConverted; +} + +} // namespace fromvtkm diff --git a/Accelerators/Vtkm/DataModel/vtkmlib/UnstructuredGridConverter.h b/Accelerators/Vtkm/DataModel/vtkmlib/UnstructuredGridConverter.h new file mode 100644 index 000000000..595604bcd --- /dev/null +++ b/Accelerators/Vtkm/DataModel/vtkmlib/UnstructuredGridConverter.h @@ -0,0 +1,44 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#ifndef vtkmlib_UnstructuredGridConverter_h +#define vtkmlib_UnstructuredGridConverter_h + +#include "vtkAcceleratorsVTKmDataModelModule.h" + +#include "ArrayConverters.h" // For FieldsFlag + +#include "vtkmConfigDataModel.h" //required for general vtkm setup + +#include + +class vtkUnstructuredGrid; +class vtkDataSet; + +namespace tovtkm +{ + +// convert an unstructured grid type +VTKACCELERATORSVTKMDATAMODEL_EXPORT +vtkm::cont::DataSet Convert(vtkUnstructuredGrid* input, FieldsFlag fields = FieldsFlag::None); +} + +namespace fromvtkm +{ +VTKACCELERATORSVTKMDATAMODEL_EXPORT +bool Convert(const vtkm::cont::DataSet& voutput, vtkUnstructuredGrid* output, vtkDataSet* input); +} +#endif // vtkmlib_UnstructuredGridConverter_h diff --git a/Accelerators/Vtkm/Filters/CMakeLists.txt b/Accelerators/Vtkm/Filters/CMakeLists.txt new file mode 100644 index 000000000..a7cf3af34 --- /dev/null +++ b/Accelerators/Vtkm/Filters/CMakeLists.txt @@ -0,0 +1,127 @@ +##============================================================================= +## +## Copyright (c) Kitware, Inc. +## All rights reserved. +## See LICENSE.txt for details. +## +## This software is distributed WITHOUT ANY WARRANTY; without even +## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +## PURPOSE. See the above copyright notice for more information. +## +## Copyright 2012 Sandia Corporation. +## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +## the U.S. Government retains certain rights in this software. +## +##============================================================================= + +list(INSERT CMAKE_MODULE_PATH 0 + "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") + +set(classes + vtkmAverageToCells + vtkmAverageToPoints + vtkmCleanGrid + vtkmClip + vtkmContour + vtkmCoordinateSystemTransform + vtkmExternalFaces + vtkmExtractVOI + vtkmGradient + vtkmHistogram + vtkmImageConnectivity + vtkmLevelOfDetail + vtkmNDHistogram + vtkmPointElevation + vtkmPointTransform + vtkmPolyDataNormals + vtkmProbe + vtkmThreshold + vtkmTriangleMeshPointNormals + vtkmWarpScalar + vtkmWarpVector + ) + +set(sources + vtkmClipInstantiationsWithField.cxx + vtkmClipInstantiationsWithImplicitFunction.cxx) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/vtkmConfigFilters.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfigFilters.h" + @ONLY) + +set(headers + "${CMAKE_CURRENT_BINARY_DIR}/vtkmConfigFilters.h") + +if (TARGET vtkm::cuda) + enable_language(CUDA) + + # Temporarily suppress "has address taken but no possible call to it" warnings, + # until we figure out its implications. + # We are disabling all warnings as nvlink has no known way to suppress + # individual warning types. + string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w") +endif () + +set(force_static) +if (TARGET vtkm::cuda AND BUILD_SHARED_LIBS) + set(force_static FORCE_STATIC) +endif () + +vtk_module_add_module(VTK::AcceleratorsVTKmFilters + ${force_static} + SOURCES ${sources} + HEADERS ${headers} + CLASSES ${classes}) +_vtk_module_real_target(vtkm_accel_target VTK::AcceleratorsVTKmFilters) +vtkm_add_target_information(${vtkm_accel_target} + EXTENDS_VTKM + MODIFY_CUDA_FLAGS + DEVICE_SOURCES ${sources}) + +vtk_module_set_property(VTK::AcceleratorsVTKmFilters + PROPERTY JOB_POOL_COMPILE + VALUE vtkm_pool) +vtk_module_link(VTK::AcceleratorsVTKmFilters + PRIVATE + vtkm_worklet + vtkm_filter) + +if (TARGET vtkm::cuda) + vtk_module_set_property(VTK::AcceleratorsVTKmFilters + PROPERTY CUDA_SEPARABLE_COMPILATION + VALUE ON) + vtk_module_compile_options(VTK::AcceleratorsVTKmFilters + PUBLIC $<$:-Xcudafe --diag_suppress=extra_semicolon>) +endif () + +if (MSVC) + set(msvc_warning_flags + # Generates numerous false positives with template code about unreachable + # code + /wd4702 + # Generates numerous warning that implicit assignment operators can't be + # constructed. This is understood and we don't care. + /wd4512 + # Generates numerous warning that implicit constructors can't be + # constructed. This is understood and we don't care. + /wd4510 + # Generates warnings when decorated names are over 4096 characters + # This compiler warning is deprecated and no longer occurs with VS2017+. + # So we suppress for VS2015 + /wd4503 + ) + set(vtkm_msvc_flags) + foreach (msvc_warning_flag IN LISTS msvc_warning_flags) + if (TARGET vtkm::cuda) + list(APPEND vtkm_msvc_flags + $<$:-Xcompiler=${msvc_warning_flag},${msvc_warning_flag}>) + else () + list(APPEND vtkm_msvc_flags + ${msvc_warning_flag}) + endif () + endforeach () + vtk_module_compile_options(VTK::AcceleratorsVTKmFilters + PRIVATE + ${vtkm_msvc_flags}) +endif () diff --git a/Accelerators/Vtkm/Testing/CMakeLists.txt b/Accelerators/Vtkm/Filters/Testing/CMakeLists.txt similarity index 100% rename from Accelerators/Vtkm/Testing/CMakeLists.txt rename to Accelerators/Vtkm/Filters/Testing/CMakeLists.txt diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/CMakeLists.txt b/Accelerators/Vtkm/Filters/Testing/Cxx/CMakeLists.txt new file mode 100644 index 000000000..4609e8d8f --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/CMakeLists.txt @@ -0,0 +1,55 @@ + +vtk_add_test_cxx(vtkAcceleratorsVTKmFiltersCxxTests tests + TestVTKMCleanGrid.cxx + TestVTKMCoordinateSystemTransform.cxx,NO_VALID + TestVTKMClip.cxx + TestVTKMClipWithImplicitFunction.cxx + TestVTKMExternalFaces.cxx + TestVTKMExtractVOI.cxx + TestVTKMGradient.cxx,NO_VALID + TestVTKMGradientAndVorticity.cxx,NO_VALID + TestVTKMHistogram.cxx,NO_VALID + TestVTKMLevelOfDetail.cxx + TestVTKMMarchingCubes.cxx + TestVTKMMarchingCubes2.cxx + TestVTKMNDHistogram.cxx,NO_VALID + TestVTKMPointElevation.cxx + TestVTKMPointTransform.cxx + TestVTKMProbe.cxx,NO_VALID + TestVTKMPolyDataNormals.cxx + TestVTKMThreshold.cxx + TestVTKMThreshold2.cxx + TestVTKMTriangleMeshPointNormals.cxx + TestVTKMWarpScalar.cxx + TestVTKMWarpVector.cxx + ) + +if (TARGET vtkm::cuda) + #the enable_language call is scoped! so we have to re-enable + #cuda in the test directory + enable_language(CUDA) + foreach(src IN LISTS tests) + set_source_files_properties(${src}.cxx PROPERTIES LANGUAGE "CUDA") + endforeach() + + #the tests aren't scoped as a child directory of vtkAcceleratorsVTKmFilters + #so we need to redo this logic + vtkm_get_cuda_flags(CMAKE_CUDA_FLAGS) + + # Temporarily suppress "has address taken but no possible call to it" warnings, + # until we figure out its implications. + # We are disabling all warnings as nvlink has no known way to suppress + # individual warning types. + string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w") +endif() + + +vtk_test_cxx_executable(vtkAcceleratorsVTKmFiltersCxxTests tests + RENDERING_FACTORY + ) + +if (TARGET vtkm::cuda) + # When cuda is enabled VTK::AcceleratorsVTKmFilters is built statically but with fpic + # enabled so the tests are also built with fpic enabled + set_target_properties(vtkAcceleratorsVTKmFiltersCxxTests PROPERTIES POSITION_INDEPENDENT_CODE ON) +endif() diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMCleanGrid.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMCleanGrid.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMCleanGrid.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMCleanGrid.cxx diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMClip.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMClip.cxx new file mode 100644 index 000000000..58e3508f1 --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMClip.cxx @@ -0,0 +1,175 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestVTKMClip.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#include "vtkmClip.h" + +#include "vtkActor.h" +#include "vtkCamera.h" +#include "vtkDataSetSurfaceFilter.h" +#include "vtkDelaunay3D.h" +#include "vtkDoubleArray.h" +#include "vtkImageData.h" +#include "vtkImageToPoints.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPolyDataMapper.h" +#include "vtkRTAnalyticSource.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkSphereSource.h" +#include "vtkUnstructuredGrid.h" + +namespace +{ + +template +void GenerateScalars(DataSetT* dataset, bool negate) +{ + vtkIdType numPoints = dataset->GetNumberOfPoints(); + + vtkNew scalars; + scalars->SetName("x+y"); + scalars->SetNumberOfComponents(1); + scalars->SetNumberOfTuples(numPoints); + + double point[3]; + for (vtkIdType i = 0; i < numPoints; ++i) + { + dataset->GetPoint(i, point); + scalars->SetTypedComponent(i, 0, (negate ? -point[0] - point[1] : point[0] + point[1])); + } + dataset->GetPointData()->SetScalars(scalars); +} + +} // end anon namespace + +int TestVTKMClip(int, char*[]) +{ + vtkNew renderer; + + // First input is a polydata with 2D cells. This should produce a polydata + // output from vtkmClip. + vtkNew sphereSource; + sphereSource->SetThetaResolution(50); + sphereSource->SetPhiResolution(50); + sphereSource->Update(); + vtkPolyData* sphere = sphereSource->GetOutput(); + GenerateScalars(sphere, false); + + // Clip at zero: + vtkNew sphereClipper; + sphereClipper->ForceVTKmOn(); + sphereClipper->SetInputData(sphere); + sphereClipper->SetComputeScalars(true); + sphereClipper->SetClipValue(0.); + + vtkNew sphSurface; + sphSurface->SetInputConnection(sphereClipper->GetOutputPort()); + + vtkNew sphereMapper; + sphereMapper->SetInputConnection(sphSurface->GetOutputPort()); + sphereMapper->SetScalarVisibility(1); + sphereMapper->SetScalarModeToUsePointFieldData(); + sphereMapper->SelectColorArray("x+y"); + sphereMapper->SetScalarRange(0, 1); + + vtkNew sphereActor; + sphereActor->SetMapper(sphereMapper); + sphereActor->SetPosition(0.5, 0.5, 0.); + sphereActor->RotateWXYZ(90., 0., 0., 1.); + renderer->AddActor(sphereActor); + + // Second input is an unstructured grid with 3D cells. This should produce an + // unstructured grid output from vtkmClip. + vtkNew imageSource; + imageSource->SetWholeExtent(-5, 5, -5, 5, -5, 5); + + // Convert image to pointset + vtkNew imageToPoints; + imageToPoints->SetInputConnection(imageSource->GetOutputPort()); + + // Convert point set to tets: + vtkNew tetrahedralizer; + tetrahedralizer->SetInputConnection(imageToPoints->GetOutputPort()); + tetrahedralizer->Update(); + vtkUnstructuredGrid* tets = tetrahedralizer->GetOutput(); + GenerateScalars(tets, true); + + // Clip at zero: + vtkNew tetClipper; + tetClipper->ForceVTKmOn(); + tetClipper->SetInputData(tets); + tetClipper->SetComputeScalars(true); + tetClipper->SetClipValue(0.); + + vtkNew tetSurface; + tetSurface->SetInputConnection(tetClipper->GetOutputPort()); + + vtkNew tetMapper; + tetMapper->SetInputConnection(tetSurface->GetOutputPort()); + tetMapper->SetScalarVisibility(1); + tetMapper->SetScalarModeToUsePointFieldData(); + tetMapper->SelectColorArray("x+y"); + tetMapper->SetScalarRange(0, 10); + + vtkNew tetActor; + tetActor->SetMapper(tetMapper); + tetActor->SetScale(1. / 5.); + renderer->AddActor(tetActor); + + // Third dataset tests imagedata. This should produce an unstructured grid: + vtkImageData* image = imageSource->GetOutput(); + GenerateScalars(image, false); + + vtkNew imageClipper; + imageClipper->ForceVTKmOn(); + imageClipper->SetInputData(image); + imageClipper->SetComputeScalars(true); + imageClipper->SetClipValue(0.); + + vtkNew imageSurface; + imageSurface->SetInputConnection(imageClipper->GetOutputPort()); + + vtkNew imageMapper; + imageMapper->SetInputConnection(imageSurface->GetOutputPort()); + imageMapper->SetScalarVisibility(1); + imageMapper->SetScalarModeToUsePointFieldData(); + imageMapper->SelectColorArray("x+y"); + imageMapper->SetScalarRange(0, 10); + + vtkNew imageActor; + imageActor->SetMapper(imageMapper); + imageActor->SetScale(1. / 5.); + imageActor->SetPosition(1.0, 1.0, 0.); + renderer->AddActor(imageActor); + + vtkNew iren; + vtkNew renWin; + renWin->SetMultiSamples(0); + iren->SetRenderWindow(renWin); + renWin->AddRenderer(renderer); + + renWin->SetSize(500, 500); + renderer->GetActiveCamera()->SetPosition(0, 0, 1); + renderer->GetActiveCamera()->SetFocalPoint(0, 0, 0); + renderer->GetActiveCamera()->SetViewUp(0, 1, 0); + renderer->ResetCamera(); + + renWin->Render(); + iren->Start(); + + return EXIT_SUCCESS; +} diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMClipWithImplicitFunction.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMClipWithImplicitFunction.cxx new file mode 100644 index 000000000..37e09c46c --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMClipWithImplicitFunction.cxx @@ -0,0 +1,74 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestVTKMClipWithImplicitFunction.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "vtkmClip.h" + +#include "vtkActor.h" +#include "vtkDataArray.h" +#include "vtkDataSetSurfaceFilter.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" +#include "vtkPolyDataMapper.h" +#include "vtkRTAnalyticSource.h" +#include "vtkRegressionTestImage.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkSphere.h" + +int TestVTKMClipWithImplicitFunction(int argc, char* argv[]) +{ + vtkNew wavelet; + wavelet->SetWholeExtent(-8, 8, -8, 8, -8, 8); + wavelet->SetCenter(0, 0, 0); + + vtkNew sphere; + sphere->SetCenter(0, 0, 0); + sphere->SetRadius(10); + vtkNew clip; + clip->ForceVTKmOn(); + clip->SetInputConnection(wavelet->GetOutputPort()); + clip->SetClipFunction(sphere); + + vtkNew surface; + surface->SetInputConnection(clip->GetOutputPort()); + + vtkNew mapper; + mapper->SetInputConnection(surface->GetOutputPort()); + mapper->SetScalarRange(37, 150); + + vtkNew actor; + actor->SetMapper(mapper); + + vtkNew renderer; + renderer->AddActor(actor); + renderer->ResetCamera(); + + vtkNew renWin; + renWin->AddRenderer(renderer); + + vtkNew iren; + iren->SetRenderWindow(renWin); + iren->Initialize(); + + renWin->Render(); + int retVal = vtkRegressionTestImage(renWin); + if (retVal == vtkRegressionTester::DO_INTERACTOR) + { + iren->Start(); + } + + return !retVal; +} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMCoordinateSystemTransform.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMCoordinateSystemTransform.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMCoordinateSystemTransform.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMCoordinateSystemTransform.cxx diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMExternalFaces.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMExternalFaces.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMExternalFaces.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMExternalFaces.cxx diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMExtractVOI.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMExtractVOI.cxx new file mode 100644 index 000000000..80d4e346a --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMExtractVOI.cxx @@ -0,0 +1,85 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestVTKMExtractVOI.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "vtkmExtractVOI.h" + +#include "vtkActor.h" +#include "vtkDataSetSurfaceFilter.h" +#include "vtkNew.h" +#include "vtkPolyDataMapper.h" +#include "vtkRTAnalyticSource.h" +#include "vtkRegressionTestImage.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkSphereSource.h" +#include "vtkTriangleFilter.h" + +#include "vtkImageData.h" + +int TestVTKMExtractVOI(int argc, char* argv[]) +{ + vtkNew sphere; + sphere->SetRadius(2.0); + + vtkNew sphereMapper; + sphereMapper->SetInputConnection(sphere->GetOutputPort()); + + vtkNew sphereActor; + sphereActor->SetMapper(sphereMapper); + + vtkNew rt; + rt->SetWholeExtent(-50, 50, -50, 50, 0, 0); + + vtkNew voi; + voi->ForceVTKmOn(); + voi->SetInputConnection(rt->GetOutputPort()); + voi->SetVOI(-11, 39, 5, 45, 0, 0); + voi->SetSampleRate(5, 5, 1); + + // Get rid of ambiguous triagulation issues. + vtkNew surf; + surf->SetInputConnection(voi->GetOutputPort()); + + vtkNew tris; + tris->SetInputConnection(surf->GetOutputPort()); + + vtkNew mapper; + mapper->SetInputConnection(tris->GetOutputPort()); + mapper->SetScalarRange(130, 280); + + vtkNew actor; + actor->SetMapper(mapper); + + vtkNew renderer; + renderer->AddActor(actor); + renderer->AddActor(sphereActor); + renderer->ResetCamera(); + + vtkNew renWin; + renWin->AddRenderer(renderer); + + vtkNew iren; + iren->SetRenderWindow(renWin); + iren->Initialize(); + + renWin->Render(); + int retVal = vtkRegressionTestImage(renWin); + if (retVal == vtkRegressionTester::DO_INTERACTOR) + { + iren->Start(); + } + + return !retVal; +} diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMGradient.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMGradient.cxx new file mode 100644 index 000000000..e8e80cb4a --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMGradient.cxx @@ -0,0 +1,324 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestGradientAndVorticity.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +/*---------------------------------------------------------------------------- + Copyright (c) Sandia Corporation + See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. +----------------------------------------------------------------------------*/ + +#include "vtkArrayCalculator.h" +#include "vtkCell.h" +#include "vtkCellData.h" +#include "vtkDoubleArray.h" +#include "vtkImageData.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkRTAnalyticSource.h" +#include "vtkUnstructuredGrid.h" +#include "vtkmCleanGrid.h" +#include "vtkmGradient.h" + +#include + +#include + +namespace +{ +double Tolerance = 0.00001; + +//------------------------------------------------------------------------------ +int IsGradientCorrect(vtkDoubleArray* gradients, vtkDoubleArray* correct) +{ + int numberOfComponents = gradients->GetNumberOfComponents(); + for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) + { + bool invalid = false; + for (int j = 0; j < numberOfComponents; j++) + { + double value = gradients->GetTypedComponent(i, j); + double expected = correct->GetTypedComponent(i, j); + + if ((value - expected) > Tolerance) + { + invalid = true; + } + } + + if (invalid) + { + std::vector values; + values.resize(numberOfComponents); + std::vector expected; + expected.resize(numberOfComponents); + + gradients->GetTypedTuple(i, values.data()); + correct->GetTypedTuple(i, expected.data()); + + std::cout << "Gradient[ " << i << " ] should look like: " << std::endl; + std::cout << expected[0] << ", " << expected[1] << ", " << expected[2] << std::endl; + if (numberOfComponents > 3) + { + std::cout << expected[3] << ", " << expected[4] << ", " << expected[5] << std::endl; + std::cout << expected[6] << ", " << expected[7] << ", " << expected[8] << std::endl; + } + + std::cout << "Gradient[ " << i << " ] actually looks like: " << std::endl; + std::cout << values[0] << ", " << values[1] << ", " << values[2] << std::endl; + if (numberOfComponents > 3) + { + std::cout << values[3] << ", " << values[4] << ", " << values[5] << std::endl; + std::cout << values[6] << ", " << values[7] << ", " << values[8] << std::endl; + } + std::cout << std::endl; + } + + if (i > 10 && invalid) + { + return 0; + } + } + return 1; +} + +//------------------------------------------------------------------------------ +// we assume that the gradients are correct and so we can compute the "real" +// vorticity from it +int IsVorticityCorrect(vtkDoubleArray* gradients, vtkDoubleArray* vorticity) +{ + if (gradients->GetNumberOfComponents() != 9 || vorticity->GetNumberOfComponents() != 3) + { + vtkGenericWarningMacro("Bad number of components."); + return 0; + } + for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) + { + double* g = gradients->GetTuple(i); + double* v = vorticity->GetTuple(i); + if (!test_equal(v[0], g[7] - g[5])) + { + vtkGenericWarningMacro("Bad vorticity[0] value " + << v[0] << " " << g[7] - g[5] << " difference is " << (v[0] - g[7] + g[5])); + return 0; + } + else if (!test_equal(v[1], g[2] - g[6])) + { + vtkGenericWarningMacro("Bad vorticity[1] value " + << v[1] << " " << g[2] - g[6] << " difference is " << (v[1] - g[2] + g[6])); + return 0; + } + else if (!test_equal(v[2], g[3] - g[1])) + { + vtkGenericWarningMacro("Bad vorticity[2] value " + << v[2] << " " << g[3] - g[1] << " difference is " << (v[2] - g[3] + g[1])); + return 0; + } + } + + return 1; +} + +//------------------------------------------------------------------------------ +// we assume that the gradients are correct and so we can compute the "real" +// Q criterion from it +int IsQCriterionCorrect(vtkDoubleArray* gradients, vtkDoubleArray* qCriterion) +{ + if (gradients->GetNumberOfComponents() != 9 || qCriterion->GetNumberOfComponents() != 1) + { + vtkGenericWarningMacro("Bad number of components."); + return 0; + } + for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) + { + double* g = gradients->GetTuple(i); + double qc = qCriterion->GetValue(i); + + double t1 = .25 * + ((g[7] - g[5]) * (g[7] - g[5]) + (g[3] - g[1]) * (g[3] - g[1]) + + (g[2] - g[6]) * (g[2] - g[6])); + double t2 = .5 * + (g[0] * g[0] + g[4] * g[4] + g[8] * g[8] + + .5 * + ((g[3] + g[1]) * (g[3] + g[1]) + (g[6] + g[2]) * (g[6] + g[2]) + + (g[7] + g[5]) * (g[7] + g[5]))); + + if (!test_equal(qc, t1 - t2)) + { + vtkGenericWarningMacro( + "Bad Q-criterion value " << qc << " " << t1 - t2 << " difference is " << (qc - t1 + t2)); + return 0; + } + } + + return 1; +} + +//------------------------------------------------------------------------------ +// we assume that the gradients are correct and so we can compute the "real" +// divergence from it +int IsDivergenceCorrect(vtkDoubleArray* gradients, vtkDoubleArray* divergence) +{ + if (gradients->GetNumberOfComponents() != 9 || divergence->GetNumberOfComponents() != 1) + { + vtkGenericWarningMacro("Bad number of components."); + return 0; + } + for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) + { + double* g = gradients->GetTuple(i); + double div = divergence->GetValue(i); + double gValue = g[0] + g[4] + g[8]; + + if (!test_equal(div, gValue)) + { + vtkGenericWarningMacro( + "Bad divergence value " << div << " " << gValue << " difference is " << (div - gValue)); + return 0; + } + } + + return 1; +} + +//------------------------------------------------------------------------------ +int PerformTest(vtkDataSet* grid) +{ + // Cleaning out the existing field data so that I can replace it with + // an analytic function that I know the gradient of + grid->GetPointData()->Initialize(); + const char fieldName[] = "LinearField"; + + vtkNew calculator; + calculator->SetInputData(grid); + calculator->SetResultArrayName(fieldName); + calculator->SetFunction("coordsY*iHat+coordsX*jHat+coordsZ*kHat"); + calculator->SetAttributeTypeToPointData(); + calculator->AddCoordinateScalarVariable("coordsX", 0); + calculator->AddCoordinateScalarVariable("coordsY", 1); + calculator->AddCoordinateScalarVariable("coordsZ", 2); + + const char resultName[] = "Result"; + + vtkNew pointGradients; + pointGradients->ForceVTKmOn(); + pointGradients->SetInputConnection(calculator->GetOutputPort()); + pointGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); + pointGradients->SetResultArrayName(resultName); + + vtkNew correctPointGradients; + correctPointGradients->SetInputConnection(calculator->GetOutputPort()); + correctPointGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); + correctPointGradients->SetResultArrayName(resultName); + + pointGradients->Update(); + correctPointGradients->Update(); + + vtkDoubleArray* gradPointArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(pointGradients->GetOutput())->GetPointData()->GetArray(resultName)); + + vtkDoubleArray* correctPointArray = + vtkArrayDownCast(vtkDataSet::SafeDownCast(correctPointGradients->GetOutput()) + ->GetPointData() + ->GetArray(resultName)); + + if (!IsGradientCorrect(gradPointArray, correctPointArray)) + { + return EXIT_FAILURE; + } + + vtkNew pointVorticity; + pointVorticity->ForceVTKmOn(); + pointVorticity->SetInputConnection(calculator->GetOutputPort()); + pointVorticity->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); + pointVorticity->SetResultArrayName(resultName); + pointVorticity->SetComputeVorticity(1); + pointVorticity->SetComputeQCriterion(1); + pointVorticity->SetComputeDivergence(1); + pointVorticity->Update(); + + // point stuff + vtkDoubleArray* vorticityPointArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Vorticity")); + if (!IsVorticityCorrect(gradPointArray, vorticityPointArray)) + { + return EXIT_FAILURE; + } + + vtkDoubleArray* divergencePointArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Divergence")); + if (!IsDivergenceCorrect(gradPointArray, divergencePointArray)) + { + return EXIT_FAILURE; + } + + vtkDoubleArray* qCriterionPointArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Q-criterion")); + if (!IsQCriterionCorrect(gradPointArray, qCriterionPointArray)) + { + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} +} // end local namespace + +//------------------------------------------------------------------------------ +int TestVTKMGradient(int /* argc */, char* /* argv */[]) +{ + vtkDataSet* grid = nullptr; + + vtkNew wavelet; + wavelet->SetWholeExtent(-10, 10, -10, 10, -10, 10); + wavelet->SetCenter(0, 0, 0); + wavelet->Update(); + + grid = vtkDataSet::SafeDownCast(wavelet->GetOutput()); + + if (PerformTest(grid)) + { + return EXIT_FAILURE; + } + + // convert the structured grid to an unstructured grid + vtkNew ug; + ug->SetInputConnection(wavelet->GetOutputPort()); + ug->Update(); + + grid = vtkDataSet::SafeDownCast(ug->GetOutput()); + if (PerformTest(grid)) + { + return EXIT_FAILURE; + } + + // now try with 2D wavelets + wavelet->SetWholeExtent(-10, 10, -10, 10, 0, 0); + wavelet->SetCenter(0, 0, 0); + wavelet->Update(); + + grid = vtkDataSet::SafeDownCast(wavelet->GetOutput()); + if (PerformTest(grid)) + { + return EXIT_FAILURE; + } + + // convert the 2D structured grid to an unstructured grid + ug->Update(); + + grid = vtkDataSet::SafeDownCast(ug->GetOutput()); + if (PerformTest(grid)) + { + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMGradientAndVorticity.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMGradientAndVorticity.cxx new file mode 100644 index 000000000..e3d44b310 --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMGradientAndVorticity.cxx @@ -0,0 +1,416 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestGradientAndVorticity.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +/*---------------------------------------------------------------------------- + Copyright (c) Sandia Corporation + See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. +----------------------------------------------------------------------------*/ + +#include "vtkArrayCalculator.h" +#include "vtkCell.h" +#include "vtkCellData.h" +#include "vtkDoubleArray.h" +#include "vtkPointData.h" +#include "vtkSmartPointer.h" +#include "vtkStdString.h" +#include "vtkStructuredGrid.h" +#include "vtkStructuredGridReader.h" +#include "vtkUnstructuredGrid.h" +#include "vtkUnstructuredGridReader.h" +#include "vtkmGradient.h" + +#include +#include + +#define VTK_CREATE(type, var) vtkSmartPointer var = vtkSmartPointer::New() + +// The 3D cell with the maximum number of points is VTK_LAGRANGE_HEXAHEDRON. +// We support up to 6th order hexahedra. +#define VTK_MAXIMUM_NUMBER_OF_POINTS 216 + +namespace +{ +double Tolerance = 0.00001; + +//------------------------------------------------------------------------------ +void CreateCellData(vtkDataSet* grid, int numberOfComponents, int offset, const char* arrayName) +{ + vtkIdType numberOfCells = grid->GetNumberOfCells(); + VTK_CREATE(vtkDoubleArray, array); + array->SetNumberOfComponents(numberOfComponents); + array->SetNumberOfTuples(numberOfCells); + std::vector tupleValues(numberOfComponents); + double point[3], parametricCenter[3], weights[VTK_MAXIMUM_NUMBER_OF_POINTS]; + for (vtkIdType i = 0; i < numberOfCells; i++) + { + vtkCell* cell = grid->GetCell(i); + cell->GetParametricCenter(parametricCenter); + int subId = 0; + cell->EvaluateLocation(subId, parametricCenter, point, weights); + for (int j = 0; j < numberOfComponents; j++) + { // +offset makes the curl/vorticity nonzero + tupleValues[j] = point[(j + offset) % 3]; + } + array->SetTypedTuple(i, &tupleValues[0]); + } + array->SetName(arrayName); + grid->GetCellData()->AddArray(array); +} + +//------------------------------------------------------------------------------ +void CreatePointData(vtkDataSet* grid, int numberOfComponents, int offset, const char* arrayName) +{ + vtkIdType numberOfPoints = grid->GetNumberOfPoints(); + VTK_CREATE(vtkDoubleArray, array); + array->SetNumberOfComponents(numberOfComponents); + array->SetNumberOfTuples(numberOfPoints); + std::vector tupleValues(numberOfComponents); + double point[3]; + for (vtkIdType i = 0; i < numberOfPoints; i++) + { + grid->GetPoint(i, point); + for (int j = 0; j < numberOfComponents; j++) + { // +offset makes the curl/vorticity nonzero + tupleValues[j] = point[(j + offset) % 3]; + } + array->SetTypedTuple(i, &tupleValues[0]); + } + array->SetName(arrayName); + grid->GetPointData()->AddArray(array); +} + +//------------------------------------------------------------------------------ +int IsGradientCorrect(vtkDoubleArray* gradients, vtkDoubleArray* correct) +{ + int numberOfComponents = gradients->GetNumberOfComponents(); + for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) + { + bool invalid = false; + for (int j = 0; j < numberOfComponents; j++) + { + double value = gradients->GetTypedComponent(i, j); + double expected = correct->GetTypedComponent(i, j); + + if ((value - expected) > Tolerance) + { + invalid = true; + } + } + + if (invalid) + { + std::vector values; + values.resize(numberOfComponents); + std::vector expected; + expected.resize(numberOfComponents); + + gradients->GetTypedTuple(i, values.data()); + correct->GetTypedTuple(i, expected.data()); + + std::cout << "Gradient[ i ] should look like: " << std::endl; + std::cout << expected[0] << ", " << expected[1] << ", " << expected[2] << std::endl; + if (numberOfComponents > 3) + { + std::cout << expected[3] << ", " << expected[4] << ", " << expected[5] << std::endl; + std::cout << expected[6] << ", " << expected[7] << ", " << expected[8] << std::endl; + } + + std::cout << "Gradient[ i ] actually looks like: " << std::endl; + std::cout << values[0] << ", " << values[1] << ", " << values[2] << std::endl; + if (numberOfComponents > 3) + { + std::cout << values[3] << ", " << values[4] << ", " << values[5] << std::endl; + std::cout << values[6] << ", " << values[7] << ", " << values[8] << std::endl; + } + std::cout << std::endl; + } + + if (i > 10 && invalid) + { + return 0; + } + } + return 1; +} + +//------------------------------------------------------------------------------ +// we assume that the gradients are correct and so we can compute the "real" +// vorticity from it +int IsVorticityCorrect(vtkDoubleArray* gradients, vtkDoubleArray* vorticity) +{ + if (gradients->GetNumberOfComponents() != 9 || vorticity->GetNumberOfComponents() != 3) + { + vtkGenericWarningMacro("Bad number of components."); + return 0; + } + for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) + { + double* g = gradients->GetTuple(i); + double* v = vorticity->GetTuple(i); + if (!test_equal(v[0], g[7] - g[5])) + { + vtkGenericWarningMacro("Bad vorticity[0] value " + << v[0] << " " << g[7] - g[5] << " difference is " << (v[0] - g[7] + g[5])); + return 0; + } + else if (!test_equal(v[1], g[2] - g[6])) + { + vtkGenericWarningMacro("Bad vorticity[1] value " + << v[1] << " " << g[2] - g[6] << " difference is " << (v[1] - g[2] + g[6])); + return 0; + } + else if (!test_equal(v[2], g[3] - g[1])) + { + vtkGenericWarningMacro("Bad vorticity[2] value " + << v[2] << " " << g[3] - g[1] << " difference is " << (v[2] - g[3] + g[1])); + return 0; + } + } + + return 1; +} + +//------------------------------------------------------------------------------ +// we assume that the gradients are correct and so we can compute the "real" +// Q criterion from it +int IsQCriterionCorrect(vtkDoubleArray* gradients, vtkDoubleArray* qCriterion) +{ + if (gradients->GetNumberOfComponents() != 9 || qCriterion->GetNumberOfComponents() != 1) + { + vtkGenericWarningMacro("Bad number of components."); + return 0; + } + for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) + { + double* g = gradients->GetTuple(i); + double qc = qCriterion->GetValue(i); + + double t1 = .25 * + ((g[7] - g[5]) * (g[7] - g[5]) + (g[3] - g[1]) * (g[3] - g[1]) + + (g[2] - g[6]) * (g[2] - g[6])); + double t2 = .5 * + (g[0] * g[0] + g[4] * g[4] + g[8] * g[8] + + .5 * + ((g[3] + g[1]) * (g[3] + g[1]) + (g[6] + g[2]) * (g[6] + g[2]) + + (g[7] + g[5]) * (g[7] + g[5]))); + + if (!test_equal(qc, t1 - t2)) + { + vtkGenericWarningMacro( + "Bad Q-criterion value " << qc << " " << t1 - t2 << " difference is " << (qc - t1 + t2)); + return 0; + } + } + + return 1; +} + +//------------------------------------------------------------------------------ +// we assume that the gradients are correct and so we can compute the "real" +// divergence from it +int IsDivergenceCorrect(vtkDoubleArray* gradients, vtkDoubleArray* divergence) +{ + if (gradients->GetNumberOfComponents() != 9 || divergence->GetNumberOfComponents() != 1) + { + vtkGenericWarningMacro("Bad number of components."); + return 0; + } + for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) + { + double* g = gradients->GetTuple(i); + double div = divergence->GetValue(i); + double gValue = g[0] + g[4] + g[8]; + + if (!test_equal(div, gValue)) + { + vtkGenericWarningMacro( + "Bad divergence value " << div << " " << gValue << " difference is " << (div - gValue)); + return 0; + } + } + + return 1; +} + +//------------------------------------------------------------------------------ +int PerformTest(vtkDataSet* grid) +{ + // Cleaning out the existing field data so that I can replace it with + // an analytic function that I know the gradient of + grid->GetPointData()->Initialize(); + grid->GetCellData()->Initialize(); + const char fieldName[] = "LinearField"; + int offset = 1; + const int numberOfComponents = 3; + CreateCellData(grid, numberOfComponents, offset, fieldName); + CreatePointData(grid, numberOfComponents, offset, fieldName); + + const char resultName[] = "Result"; + + VTK_CREATE(vtkmGradient, cellGradients); + cellGradients->ForceVTKmOn(); + cellGradients->SetInputData(grid); + cellGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_CELLS, fieldName); + cellGradients->SetResultArrayName(resultName); + + VTK_CREATE(vtkGradientFilter, correctCellGradients); + correctCellGradients->SetInputData(grid); + correctCellGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_CELLS, fieldName); + correctCellGradients->SetResultArrayName(resultName); + + VTK_CREATE(vtkmGradient, pointGradients); + pointGradients->ForceVTKmOn(); + pointGradients->SetInputData(grid); + pointGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); + pointGradients->SetResultArrayName(resultName); + + VTK_CREATE(vtkGradientFilter, correctPointGradients); + correctPointGradients->SetInputData(grid); + correctPointGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); + correctPointGradients->SetResultArrayName(resultName); + + cellGradients->Update(); + pointGradients->Update(); + + correctCellGradients->Update(); + correctPointGradients->Update(); + + vtkDoubleArray* gradCellArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(cellGradients->GetOutput())->GetCellData()->GetArray(resultName)); + + vtkDoubleArray* correctCellArray = + vtkArrayDownCast(vtkDataSet::SafeDownCast(correctCellGradients->GetOutput()) + ->GetCellData() + ->GetArray(resultName)); + + if (!grid->IsA("vtkStructuredGrid")) + { + // ignore cell gradients on structured grids as the version for + // VTK-m differs from VTK. Once VTK-m is able to do stencil based + // gradients for point and cells, we can enable this check. + if (!IsGradientCorrect(gradCellArray, correctCellArray)) + { + return EXIT_FAILURE; + } + } + + vtkDoubleArray* gradPointArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(pointGradients->GetOutput())->GetPointData()->GetArray(resultName)); + + vtkDoubleArray* correctPointArray = + vtkArrayDownCast(vtkDataSet::SafeDownCast(correctPointGradients->GetOutput()) + ->GetPointData() + ->GetArray(resultName)); + + if (!IsGradientCorrect(gradPointArray, correctPointArray)) + { + return EXIT_FAILURE; + } + + // now check on the vorticity calculations + VTK_CREATE(vtkmGradient, cellVorticity); + cellVorticity->ForceVTKmOn(); + cellVorticity->SetInputData(grid); + cellVorticity->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_CELLS, fieldName); + cellVorticity->SetResultArrayName(resultName); + cellVorticity->SetComputeVorticity(1); + cellVorticity->Update(); + + VTK_CREATE(vtkmGradient, pointVorticity); + pointVorticity->ForceVTKmOn(); + pointVorticity->SetInputData(grid); + pointVorticity->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); + pointVorticity->SetResultArrayName(resultName); + pointVorticity->SetComputeVorticity(1); + pointVorticity->SetComputeQCriterion(1); + pointVorticity->SetComputeDivergence(1); + pointVorticity->Update(); + + // cell stuff + vtkDoubleArray* vorticityCellArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(cellVorticity->GetOutput())->GetCellData()->GetArray("Vorticity")); + if (!IsVorticityCorrect(gradCellArray, vorticityCellArray)) + { + return EXIT_FAILURE; + } + + // point stuff + vtkDoubleArray* vorticityPointArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Vorticity")); + if (!IsVorticityCorrect(gradPointArray, vorticityPointArray)) + { + return EXIT_FAILURE; + } + + vtkDoubleArray* divergencePointArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Divergence")); + if (!IsDivergenceCorrect(gradPointArray, divergencePointArray)) + { + return EXIT_FAILURE; + } + + vtkDoubleArray* qCriterionPointArray = vtkArrayDownCast( + vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Q-criterion")); + if (!IsQCriterionCorrect(gradPointArray, qCriterionPointArray)) + { + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} +} // end local namespace + +//------------------------------------------------------------------------------ +int TestVTKMGradientAndVorticity(int argc, char* argv[]) +{ + int i; + // Need to get the data root. + const char* data_root = nullptr; + for (i = 0; i < argc - 1; i++) + { + if (strcmp("-D", argv[i]) == 0) + { + data_root = argv[i + 1]; + break; + } + } + if (!data_root) + { + vtkGenericWarningMacro("Need to specify the directory to VTK_DATA_ROOT with -D ."); + return EXIT_FAILURE; + } + + vtkStdString filename(std::string(data_root) + "/Data/SampleStructGrid.vtk"); + VTK_CREATE(vtkStructuredGridReader, structuredGridReader); + structuredGridReader->SetFileName(filename.c_str()); + structuredGridReader->Update(); + vtkDataSet* grid = vtkDataSet::SafeDownCast(structuredGridReader->GetOutput()); + + if (PerformTest(grid)) + { + return EXIT_FAILURE; + } + + // convert the structured grid to an unstructured grid + VTK_CREATE(vtkUnstructuredGrid, ug); + ug->SetPoints(vtkStructuredGrid::SafeDownCast(grid)->GetPoints()); + ug->Allocate(grid->GetNumberOfCells()); + for (vtkIdType id = 0; id < grid->GetNumberOfCells(); id++) + { + vtkCell* cell = grid->GetCell(id); + ug->InsertNextCell(cell->GetCellType(), cell->GetPointIds()); + } + + return PerformTest(ug); +} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMHistogram.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMHistogram.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMHistogram.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMHistogram.cxx diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMLevelOfDetail.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMLevelOfDetail.cxx new file mode 100644 index 000000000..f13fd644e --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMLevelOfDetail.cxx @@ -0,0 +1,507 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestThreshold.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +// Uncomment this to directly compare serial and TBB versions +// #define FORCE_VTKM_DEVICE + +// TODO: Make a way to force the VTK-m device without actually loading VTK-m +// headers (and all subsequent dependent headers). + +#include "vtkActor.h" +#include "vtkCamera.h" +#include "vtkCellArray.h" +#include "vtkCellData.h" +#include "vtkContourFilter.h" +#include "vtkDataSetMapper.h" +#include "vtkDataSetSurfaceFilter.h" +#include "vtkMaskPoints.h" +#include "vtkNew.h" +#include "vtkPLYReader.h" +#include "vtkPNGWriter.h" +#include "vtkPointData.h" +#include "vtkPoints.h" +#include "vtkPolyData.h" +#include "vtkPolyDataMapper.h" +#include "vtkProperty.h" +#include "vtkQuadricClustering.h" +#include "vtkRTAnalyticSource.h" +#include "vtkRegressionTestImage.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkSmartPointer.h" +#include "vtkTestUtilities.h" +#include "vtkTextActor.h" +#include "vtkTextProperty.h" +#include "vtkTimerLog.h" +#include "vtkTriangleFilter.h" +#include "vtkWindowToImageFilter.h" +#include "vtkXMLPolyDataReader.h" +#include "vtkmLevelOfDetail.h" + +#ifdef FORCE_VTKM_DEVICE + +#include + +#include +#include + +#endif // FORCE_VTKM_DEVICE + +#include +#include + +/* + * This test has benchmarking code as well as a unit test. + * + * To run the benchmarks, add a "Benchmark" argument when invoking this test. + * + * By default, a wavelet is generated and used to time the filter's execution. + * By setting the LUCY_PATH define below to the path to lucy.ply (or any other + * ply file), other datasets can be used during benchmarking. + * + * The benchmark will print out timing information comparing vtkmLevelOfDetail + * to vtkQuadricClustering, and also generate side-by-side renderings of each + * algorithm for various grid dimensions. These images are written to the + * working directory can be combined into a summary image by running + * imagemagick's convert utility: + * + * convert LOD_0* -append summary.png + */ + +//#define LUCY_PATH "/prm/lucy.ply" + +namespace +{ + +const int NUM_SAMPLES = 1; +const int FONT_SIZE = 30; + +struct VTKmFilterGenerator +{ + using FilterType = vtkmLevelOfDetail; + + int GridSize; + + VTKmFilterGenerator(int gridSize) + : GridSize(gridSize) + { + } + + FilterType* operator()() const + { + FilterType* filter = FilterType::New(); + filter->SetNumberOfDivisions(this->GridSize, this->GridSize, this->GridSize); + return filter; + } + + vtkSmartPointer Result; +}; + +struct VTKFilterGenerator +{ + using FilterType = vtkQuadricClustering; + + int GridSize; + bool UseInputPoints; + vtkSmartPointer Result; + + VTKFilterGenerator(int gridSize, bool useInputPoints) + : GridSize(gridSize) + , UseInputPoints(useInputPoints) + { + } + + FilterType* operator()() const + { + FilterType* filter = FilterType::New(); + filter->SetNumberOfDivisions(this->GridSize, this->GridSize, this->GridSize); + + // Mimic PV's GeometeryRepresentation decimator settings: + filter->SetAutoAdjustNumberOfDivisions(0); + filter->SetUseInternalTriangles(0); + filter->SetCopyCellData(1); + filter->SetUseInputPoints(this->UseInputPoints ? 1 : 0); + + return filter; + } +}; + +template +double BenchmarkFilter(FilterGenerator& filterGen, vtkPolyData* input) +{ + using FilterType = typename FilterGenerator::FilterType; + + vtkNew timer; + double result = 0.f; + + for (int i = 0; i < NUM_SAMPLES; ++i) + { + FilterType* filter = filterGen(); + filter->SetInputData(input); + + timer->StartTimer(); + filter->Update(); + timer->StopTimer(); + + result += timer->GetElapsedTime(); + filterGen.Result = filter->GetOutput(); + filter->Delete(); + } + + return result / static_cast(NUM_SAMPLES); +} + +void RenderResults(int gridSize, vtkPolyData* input, double vtkmTime, vtkPolyData* vtkmData, + double vtkTime, vtkPolyData* vtkData) +{ + double modelColor[3] = { 1., 1., 1. }; + double bgColor[3] = { .75, .75, .75 }; + double textColor[3] = { 0., 0., 0. }; + + vtkNew vtkRen; + { + vtkRen->SetViewport(0., 0., 0.5, 1.); + vtkRen->SetBackground(bgColor); + + vtkNew mapper; + mapper->SetInputData(vtkData); + vtkNew actor; + actor->SetMapper(mapper); + actor->GetProperty()->SetRepresentationToSurface(); + actor->GetProperty()->SetColor(modelColor); + vtkRen->AddActor(actor); + + std::ostringstream tmp; + tmp << "VTK: " << std::setprecision(3) << vtkTime << "s\n" + << "NumPts: " << vtkData->GetNumberOfPoints() << "\n" + << "NumTri: " << vtkData->GetNumberOfCells() << "\n"; + + vtkNew timeText; + timeText->SetInput(tmp.str().c_str()); + timeText->GetTextProperty()->SetJustificationToCentered(); + timeText->GetTextProperty()->SetColor(textColor); + timeText->GetTextProperty()->SetFontSize(FONT_SIZE); + timeText->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); + timeText->GetPositionCoordinate()->SetValue(0.5, 0.01); + vtkRen->AddActor(timeText); + } + + vtkNew vtkmRen; + { + vtkmRen->SetViewport(0.5, 0., 1., 1.); + vtkmRen->SetBackground(bgColor); + + vtkNew mapper; + mapper->SetInputData(vtkmData); + vtkNew actor; + actor->SetMapper(mapper); + actor->GetProperty()->SetRepresentationToSurface(); + actor->GetProperty()->SetColor(modelColor); + vtkmRen->AddActor(actor); + + std::ostringstream tmp; + tmp << "VTK-m: " << std::setprecision(3) << vtkmTime << "s\n" + << "NumPts: " << vtkmData->GetNumberOfPoints() << "\n" + << "NumTri: " << vtkmData->GetNumberOfCells() << "\n"; + + vtkNew timeText; + timeText->SetInput(tmp.str().c_str()); + timeText->GetTextProperty()->SetJustificationToCentered(); + timeText->GetTextProperty()->SetColor(textColor); + timeText->GetTextProperty()->SetFontSize(FONT_SIZE); + timeText->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); + timeText->GetPositionCoordinate()->SetValue(0.5, 0.01); + vtkmRen->AddActor(timeText); + } + + vtkNew metaRen; + { + metaRen->SetPreserveColorBuffer(1); + + std::ostringstream tmp; + tmp << gridSize << "x" << gridSize << "x" << gridSize << "\n" + << "InPts: " << input->GetNumberOfPoints() << "\n" + << "InTri: " << input->GetNumberOfCells() << "\n"; + + vtkNew gridText; + gridText->SetInput(tmp.str().c_str()); + gridText->GetTextProperty()->SetJustificationToCentered(); + gridText->GetTextProperty()->SetVerticalJustificationToTop(); + gridText->GetTextProperty()->SetColor(textColor); + gridText->GetTextProperty()->SetFontSize(FONT_SIZE); + gridText->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); + gridText->GetPositionCoordinate()->SetValue(0.5, 0.95); + metaRen->AddActor(gridText); + } + + vtkNew renWin; + renWin->SetSize(800, 400); + renWin->AddRenderer(vtkRen); + renWin->AddRenderer(vtkmRen); + renWin->AddRenderer(metaRen); + + renWin->Render(); + +#ifdef LUCY_PATH + vtkRen->GetActiveCamera()->SetPosition(0, 1, 0); + vtkRen->GetActiveCamera()->SetViewUp(0, 0, 1); + vtkRen->GetActiveCamera()->SetFocalPoint(0, 0, 0); +#endif + + vtkRen->ResetCamera(); + vtkRen->GetActiveCamera()->Zoom(2.0); + vtkmRen->SetActiveCamera(vtkRen->GetActiveCamera()); + renWin->Render(); + + vtkNew w2i; + w2i->SetInput(renWin); + + std::ostringstream tmp; + tmp << "LOD_" << std::setw(4) << std::setfill('0') << std::right << gridSize << ".png"; + + vtkNew png; + png->SetInputConnection(w2i->GetOutputPort()); + png->SetFileName(tmp.str().c_str()); + png->Write(); +} + +void RunBenchmark(int gridSize) +{ + // Prepare input dataset: + static vtkSmartPointer input; + if (!input) + { +#ifndef LUCY_PATH + vtkNew wavelet; + wavelet->SetXFreq(60); + wavelet->SetYFreq(30); + wavelet->SetZFreq(40); + wavelet->SetXMag(10); + wavelet->SetYMag(18); + wavelet->SetZMag(5); + wavelet->SetWholeExtent(-255, 256, -255, 256, -127, 128); + vtkNew contour; + contour->SetInputConnection(wavelet->GetOutputPort()); + contour->SetNumberOfContours(1); + contour->SetValue(0, 157.); + contour->Update(); + input = contour->GetOutput(); +#else + vtkNew reader; + reader->SetFileName(LUCY_PATH); + reader->Update(); + input = reader->GetOutput(); +#endif + } + +#ifdef FORCE_VTKM_DEVICE + + vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetRuntimeDeviceTracker(); + + // Run VTKm + vtkSmartPointer vtkmResultSerial; + double vtkmTimeSerial = 0.; + { + tracker.ForceDevice(vtkm::cont::DeviceAdapterTagSerial()); + VTKmFilterGenerator generator(gridSize); + vtkmTimeSerial = BenchmarkFilter(generator, input); + vtkmResultSerial = generator.Result; + tracker.Reset(); + } + +#ifdef VTKM_ENABLE_TBB + vtkSmartPointer vtkmResultTBB; + double vtkmTimeTBB = 0.; + bool tbbDeviceValid = tracker.CanRunOn(vtkm::cont::DeviceAdapterTagTBB()); + if (tbbDeviceValid) + { + tracker.ForceDevice(vtkm::cont::DeviceAdapterTagTBB()); + VTKmFilterGenerator generator(gridSize); + vtkmTimeTBB = BenchmarkFilter(generator, input); + vtkmResultTBB = generator.Result; + tracker.Reset(); + } +#endif // VTKM_ENABLE_TBB + +#else // !FORCE_VTKM_DEVICE + + // Run VTKm + vtkSmartPointer vtkmResult; + double vtkmTime = 0.; + { + VTKmFilterGenerator generator(gridSize); + vtkmTime = BenchmarkFilter(generator, input); + vtkmResult = generator.Result; + } + +#endif + + // Run VTK -- average clustered points + vtkSmartPointer vtkResultAvePts; + double vtkTimeAvePts = 0.; + { + VTKFilterGenerator generator(gridSize, false); + vtkTimeAvePts = BenchmarkFilter(generator, input); + vtkResultAvePts = generator.Result; + } + + // Run VTK -- reuse input points + vtkSmartPointer vtkResult; + double vtkTime = 0.; + { + VTKFilterGenerator generator(gridSize, true); + vtkTime = BenchmarkFilter(generator, input); + vtkResult = generator.Result; + } + + std::cerr << "Results for a " << gridSize << "x" << gridSize << "x" << gridSize << " grid.\n" + << "Input dataset has " << input->GetNumberOfPoints() + << " points " + "and " + << input->GetNumberOfCells() << " cells.\n"; + +#ifdef FORCE_VTKM_DEVICE + + std::cerr << "vtkmLevelOfDetail (serial, average clustered points): " << vtkmTimeSerial + << " seconds, " << vtkmResultSerial->GetNumberOfPoints() << " points, " + << vtkmResultSerial->GetNumberOfCells() << " cells.\n"; + +#ifdef VTKM_ENABLE_TBB + if (tbbDeviceValid) + { + std::cerr << "vtkmLevelOfDetail (tbb, average clustered points): " << vtkmTimeTBB + << " seconds, " << vtkmResultTBB->GetNumberOfPoints() << " points, " + << vtkmResultTBB->GetNumberOfCells() << " cells.\n"; + } +#endif // VTKM_ENABLE_TBB + +#else // !FORCE_VTKM_DEVICE + + std::cerr << "vtkmLevelOfDetail (average clustered points): " << vtkmTime << " seconds, " + << vtkmResult->GetNumberOfPoints() << " points, " << vtkmResult->GetNumberOfCells() + << " cells.\n"; + +#endif // !FORCE_VTKM_DEVICE + + std::cerr << "vtkQuadricClustering (average clustered points): " << vtkTimeAvePts << " seconds, " + << vtkResultAvePts->GetNumberOfPoints() << " points, " + << vtkResultAvePts->GetNumberOfCells() << " cells.\n" + << "vtkQuadricClustering (reuse input points): " << vtkTime << " seconds, " + << vtkResult->GetNumberOfPoints() << " points, " << vtkResult->GetNumberOfCells() + << " cells.\n"; + +#ifdef FORCE_VTKM_DEVICE +#ifdef VTKM_ENABLE_TBB + RenderResults(gridSize, input, vtkmTimeTBB, vtkmResultTBB, vtkTime, vtkResult); +#endif // VTKM_ENABLE_TBB +#else // !FORCE_VTKM_DEVICE + RenderResults(gridSize, input, vtkmTime, vtkmResult, vtkTime, vtkResult); +#endif // !FORCE_VTKM_DEVICE +} + +void RunBenchmarks() +{ + RunBenchmark(32); + RunBenchmark(64); + RunBenchmark(128); + RunBenchmark(256); + RunBenchmark(512); +} + +} // end anon namespace + +int TestVTKMLevelOfDetail(int argc, char* argv[]) +{ + bool doBenchmarks = false; + + for (int i = 1; i < argc; ++i) + { + if (std::string("Benchmark") == argv[i]) + { + doBenchmarks = true; + break; + } + } + + if (doBenchmarks) + { + RunBenchmarks(); + return 0; + } + + vtkNew ren; + vtkNew renWin; + vtkNew iren; + + renWin->AddRenderer(ren); + iren->SetRenderWindow(renWin); + + //--------------------------------------------------- + // Load file and make only triangles + //--------------------------------------------------- + char* fname = vtkTestUtilities::ExpandDataFileName(argc, argv, "Data/cow.vtp"); + vtkNew reader; + reader->SetFileName(fname); + delete[] fname; + + vtkNew clean; + clean->SetInputConnection(reader->GetOutputPort()); + clean->Update(); + + //--------------------------------------------------- + // Test LOD filter 4 times + // We will setup 4 instances of the filter at different + // levels of subdivision to make sure it is working properly + //--------------------------------------------------- + + std::vector> levelOfDetails(4); + std::vector> surfaces(4); + std::vector> mappers(4); + std::vector> actors(4); + + for (int i = 0; i < 4; ++i) + { + levelOfDetails[i]->SetInputConnection(clean->GetOutputPort()); + // subdivision levels of 16, 32, 48, 64 + levelOfDetails[i]->SetNumberOfXDivisions(((i + 1) * 16)); + levelOfDetails[i]->SetNumberOfYDivisions(((i + 1) * 16)); + levelOfDetails[i]->SetNumberOfZDivisions(((i + 1) * 16)); + + surfaces[i]->SetInputConnection(levelOfDetails[i]->GetOutputPort()); + + mappers[i]->SetInputConnection(surfaces[i]->GetOutputPort()); + + actors[i]->SetMapper(mappers[i]); + actors[i]->SetPosition((i % 2) * 10, -(i / 2) * 10, 0); + + ren->AddActor(actors[i]); + } + + ren->SetBackground(0.1, 0.2, 0.4); + ren->ResetCamera(); + ren->GetActiveCamera()->Zoom(1.3); + renWin->SetSize(600, 600); + + renWin->Render(); + + int retVal = vtkRegressionTestImage(renWin); + if (retVal == vtkRegressionTester::DO_INTERACTOR) + { + iren->Start(); + retVal = vtkRegressionTester::PASSED; + } + return (!retVal); +} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMMarchingCubes.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMMarchingCubes.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMMarchingCubes.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMMarchingCubes.cxx diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMMarchingCubes2.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMMarchingCubes2.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMMarchingCubes2.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMMarchingCubes2.cxx diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMNDHistogram.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMNDHistogram.cxx new file mode 100644 index 000000000..f874dc32c --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMNDHistogram.cxx @@ -0,0 +1,124 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestVTKMClip.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#include "vtkmNDHistogram.h" + +#include "vtkActor.h" +#include "vtkArrayData.h" +#include "vtkCamera.h" +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkDelaunay3D.h" +#include "vtkDoubleArray.h" +#include "vtkImageData.h" +#include "vtkImageToPoints.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkSparseArray.h" +#include "vtkTable.h" + +namespace +{ +const std::vector arrayNames = { "temperature0", "temperature1", "temperature2", + "temperature3" }; +const std::vector> resultBins = { + { 0, 0, 1, 1, 2, 2, 3, 3 }, + { 0, 1, 1, 2, 2, 3, 3, 4 }, + { 0, 1, 2, 2, 3, 4, 4, 5 }, + { 0, 1, 2, 3, 3, 4, 5, 6 }, +}; +const std::vector resultFrequency = { 2, 1, 1, 1, 1, 1, 1, 2 }; +const int nData = 10; +const std::vector bins = { 4, 5, 6, 7 }; +void AddArrayToVTKData( + std::string scalarName, vtkDataSetAttributes* pd, double* data, vtkIdType size) +{ + vtkNew scalars; + scalars->SetArray(data, size, 1); + scalars->SetName(scalarName.c_str()); + pd->AddArray(scalars); +} + +void MakeTestDataset(vtkDataSet* dataset) +{ + static double T0[nData], T1[nData], T2[nData], T3[nData]; + for (int i = 0; i < nData; i++) + { + T0[i] = i * 1.0; + T1[i] = i * 2.0; + T2[i] = i * 3.0; + T3[i] = i * 4.0; + } + + vtkPointData* pd = dataset->GetPointData(); + AddArrayToVTKData(arrayNames[0], pd, T0, static_cast(nData)); + AddArrayToVTKData(arrayNames[1], pd, T1, static_cast(nData)); + AddArrayToVTKData(arrayNames[2], pd, T2, static_cast(nData)); + AddArrayToVTKData(arrayNames[3], pd, T3, static_cast(nData)); +} +} + +int TestVTKMNDHistogram(int, char*[]) +{ + vtkNew ds; + MakeTestDataset(ds); + + vtkNew filter; + filter->SetInputData(ds); + size_t index = 0; + for (const auto& an : arrayNames) + { + filter->AddFieldAndBin(an, bins[index++]); + } + filter->Update(); + vtkArrayData* arrayData = filter->GetOutput(); + + assert(arrayData != nullptr); + // Valid the data range and bin delta + for (vtkIdType i = 0; i < 4; i++) + { + // Validate the delta and range + auto range = filter->GetDataRange(i); + double delta = filter->GetBinDelta(i); + if (range.first != 0.0 || range.second != (i + 1) * 9) + { + std::cout << "array index=" << i << " does not have right range" << std::endl; + return 1; + } + if (delta != ((range.second - range.first) / bins[i])) + { + std::cout << "array index" << i << " does not have right delta" << std::endl; + return 1; + } + } + vtkSparseArray* sa = static_cast*>(arrayData->GetArray(0)); + vtkArrayCoordinates coordinates; + const vtkIdType dimensions = sa->GetDimensions(); // 4 + const vtkIdType non_null_size = sa->GetNonNullSize(); // 8 + for (vtkIdType n = 0; n != non_null_size; ++n) + { + sa->GetCoordinatesN(n, coordinates); + for (vtkIdType d = 0; d != dimensions; ++d) + { + assert(coordinates[d] == static_cast(resultBins[d][n])); + if (coordinates[d] != static_cast(resultBins[d][n])) + { + std::cout << "value does not match at index " << n << " dimension " << d << std::endl; + } + } + assert(resultFrequency[n] == sa->GetValue(coordinates)); + } + return 0; +} diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPointElevation.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPointElevation.cxx new file mode 100644 index 000000000..a0a628365 --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPointElevation.cxx @@ -0,0 +1,114 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#include "vtkActor.h" +#include "vtkCamera.h" +#include "vtkDataSetSurfaceFilter.h" +#include "vtkFloatArray.h" +#include "vtkImageData.h" +#include "vtkMath.h" +#include "vtkNew.h" +#include "vtkPlaneSource.h" +#include "vtkPointData.h" +#include "vtkPoints.h" +#include "vtkPolyData.h" +#include "vtkPolyDataMapper.h" +#include "vtkProperty.h" +#include "vtkRegressionTestImage.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkTriangleFilter.h" +#include "vtkmPointElevation.h" + +namespace +{ +int RunVTKPipeline(vtkPlaneSource* plane, int argc, char* argv[]) +{ + vtkNew ren; + vtkNew renWin; + vtkNew iren; + + renWin->AddRenderer(ren); + iren->SetRenderWindow(renWin); + + vtkNew tf; + tf->SetInputConnection(plane->GetOutputPort()); + tf->Update(); + + vtkNew pd; + pd->CopyStructure(tf->GetOutput()); + vtkIdType numPts = pd->GetNumberOfPoints(); + vtkPoints* oldPts = tf->GetOutput()->GetPoints(); + vtkNew newPts; + newPts->SetNumberOfPoints(numPts); + for (vtkIdType i = 0; i < numPts; i++) + { + auto pt = oldPts->GetPoint(i); + auto r = sqrt(pow(pt[0], 2) + pow(pt[1], 2)); + auto z = 1.5 * cos(2 * r); + newPts->SetPoint(i, pt[0], pt[1], z); + } + pd->SetPoints(newPts); + + vtkNew pe; + pe->ForceVTKmOn(); + pe->SetInputData(pd); + pe->SetLowPoint(0, 0, -1.5); + pe->SetHighPoint(0, 0, 1.5); + pe->SetScalarRange(-1.5, 1.5); + + vtkNew mapper; + mapper->SetInputConnection(pe->GetOutputPort()); + mapper->ScalarVisibilityOn(); + mapper->SelectColorArray("elevation"); + + vtkNew actor; + actor->SetMapper(mapper); + + // Add the actor to the renderer, set the background and size + ren->AddActor(actor); + + ren->SetBackground(0, 0, 0); + vtkNew camera; + camera->SetPosition(1, 50, 50); + ren->SetActiveCamera(camera); + renWin->Render(); + + int retVal = vtkRegressionTestImage(renWin); + if (retVal == vtkRegressionTester::DO_INTERACTOR) + { + iren->Start(); + retVal = vtkRegressionTester::PASSED; + } + return (!retVal); +} +} // Anonymous namespace + +int TestVTKMPointElevation(int argc, char* argv[]) +{ + // Create a plane source + vtkNew plane; + int res = 200; + plane->SetXResolution(res); + plane->SetYResolution(res); + plane->SetOrigin(-10, -10, 0); + plane->SetPoint1(10, -10, 0); + plane->SetPoint2(-10, 10, 0); + + // Run the pipeline + return RunVTKPipeline(plane, argc, argv); +} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMPointTransform.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPointTransform.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMPointTransform.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPointTransform.cxx diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPolyDataNormals.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPolyDataNormals.cxx new file mode 100644 index 000000000..3704f8237 --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMPolyDataNormals.cxx @@ -0,0 +1,154 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestVTKMExtractVOI.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "vtkmPolyDataNormals.h" + +#include "vtkActor.h" +#include "vtkArrowSource.h" +#include "vtkCamera.h" +#include "vtkCellCenters.h" +#include "vtkCellData.h" +#include "vtkCleanPolyData.h" +#include "vtkCylinderSource.h" +#include "vtkGlyph3D.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPolyDataMapper.h" +#include "vtkProperty.h" +#include "vtkRegressionTestImage.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkSmartPointer.h" +#include "vtkTriangleFilter.h" + +namespace +{ + +void MakeInputDataSet(vtkPolyData* ds) +{ + vtkNew cylinder; + cylinder->SetRadius(1.0); + cylinder->SetResolution(8); + cylinder->CappingOn(); + + vtkNew triangle; + triangle->SetInputConnection(cylinder->GetOutputPort()); + + vtkNew clean; + clean->SetInputConnection(triangle->GetOutputPort()); + + clean->Update(); + + ds->ShallowCopy(clean->GetOutput()); + ds->GetPointData()->Initialize(); + ds->GetCellData()->Initialize(); +} + +} + +int TestVTKMPolyDataNormals(int argc, char* argv[]) +{ + vtkNew input; + MakeInputDataSet(input); + + vtkNew normals; + normals->ForceVTKmOn(); + normals->SetInputData(input); + normals->ComputePointNormalsOn(); + normals->ComputeCellNormalsOn(); + normals->AutoOrientNormalsOn(); + normals->FlipNormalsOn(); + normals->ConsistencyOn(); + + // cylinder mapper and actor + vtkNew cylinderMapper; + cylinderMapper->SetInputData(input); + + vtkNew cylinderActor; + cylinderActor->SetMapper(cylinderMapper); + vtkSmartPointer cylinderProperty; + cylinderProperty.TakeReference(cylinderActor->MakeProperty()); + cylinderProperty->SetRepresentationToWireframe(); + cylinderProperty->SetColor(0.3, 0.3, 0.3); + cylinderActor->SetProperty(cylinderProperty); + + vtkNew arrow; + + // point normals + vtkNew pnGlyphs; + pnGlyphs->SetInputConnection(normals->GetOutputPort()); + pnGlyphs->SetSourceConnection(arrow->GetOutputPort()); + pnGlyphs->SetScaleFactor(0.5); + pnGlyphs->OrientOn(); + pnGlyphs->SetVectorModeToUseNormal(); + + vtkNew pnMapper; + pnMapper->SetInputConnection(pnGlyphs->GetOutputPort()); + + vtkNew pnActor; + pnActor->SetMapper(pnMapper); + + vtkNew pnRenderer; + pnRenderer->AddActor(cylinderActor); + pnRenderer->AddActor(pnActor); + pnRenderer->ResetCamera(); + pnRenderer->GetActiveCamera()->SetPosition(0.0, 4.5, 7.5); + pnRenderer->ResetCameraClippingRange(); + + // cell normals + vtkNew cells; + cells->SetInputConnection(normals->GetOutputPort()); + + vtkNew cnGlyphs; + cnGlyphs->SetInputConnection(cells->GetOutputPort()); + cnGlyphs->SetSourceConnection(arrow->GetOutputPort()); + cnGlyphs->SetScaleFactor(0.5); + cnGlyphs->OrientOn(); + cnGlyphs->SetVectorModeToUseNormal(); + + vtkNew cnMapper; + cnMapper->SetInputConnection(cnGlyphs->GetOutputPort()); + + vtkNew cnActor; + cnActor->SetMapper(cnMapper); + + vtkNew cnRenderer; + cnRenderer->AddActor(cylinderActor); + cnRenderer->AddActor(cnActor); + cnRenderer->ResetCamera(); + cnRenderer->GetActiveCamera()->SetPosition(0.0, 8.0, 0.1); + cnRenderer->ResetCameraClippingRange(); + + // render + vtkNew renWin; + renWin->SetSize(600, 300); + pnRenderer->SetViewport(0.0, 0.0, 0.5, 1.0); + renWin->AddRenderer(pnRenderer); + cnRenderer->SetViewport(0.5, 0.0, 1.0, 1.0); + renWin->AddRenderer(cnRenderer); + + vtkNew iren; + iren->SetRenderWindow(renWin); + iren->Initialize(); + + renWin->Render(); + int retVal = vtkRegressionTestImage(renWin); + if (retVal == vtkRegressionTester::DO_INTERACTOR) + { + iren->Start(); + } + + return !retVal; +} diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMProbe.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMProbe.cxx new file mode 100644 index 000000000..96bccf604 --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMProbe.cxx @@ -0,0 +1,153 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#include "vtkCellData.h" +#include "vtkDataArray.h" +#include "vtkDataSet.h" +#include "vtkFloatArray.h" +#include "vtkImageData.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkmProbe.h" + +namespace +{ +int inputDim = 9; +int sourceDim = 4; +void populatePointAndCellArray(vtkFloatArray* pointArray, vtkFloatArray* cellArray) +{ + pointArray->SetNumberOfValues(sourceDim * sourceDim); + pointArray->SetName("pointdata"); + for (vtkIdType i = 0; i < static_cast(sourceDim * sourceDim); i++) + { + pointArray->SetValue(i, 0.3f * i); + } + cellArray->SetName("celldata"); + cellArray->SetNumberOfValues((sourceDim - 1) * (sourceDim - 1)); + for (vtkIdType i = 0; i < static_cast((sourceDim - 1) * (sourceDim - 1)); i++) + { + cellArray->SetValue(i, 0.7f * i); + } +} + +const std::vector& GetExpectedPointData() +{ + static std::vector expected = { + 1.05f, 1.155f, 1.26f, 1.365f, 1.47f, 1.575f, 1.68f, 0.0f, 0.0f, 1.47f, 1.575f, 1.68f, // + 1.785f, 1.89f, 1.995f, 2.1f, 0.0f, 0.0f, 1.89f, 1.995f, 2.1f, 2.205f, 2.31f, 2.415f, // + 2.52f, 0.0f, 0.0f, 2.31f, 2.415f, 2.52f, 2.625f, 2.73f, 2.835f, 2.94f, 0.0f, 0.0f, // + 2.73f, 2.835f, 2.94f, 3.045f, 3.15f, 3.255f, 3.36f, 0.0f, 0.0f, 3.15f, 3.255f, 3.36f, // + 3.465f, 3.57f, 3.675f, 3.78f, 0.0f, 0.0f, 3.57f, 3.675f, 3.78f, 3.885f, 3.99f, 4.095f, // + 4.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, // + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // + }; + return expected; +} + +const std::vector& GetExpectedCellData() +{ + static std::vector expected = { + 0.0f, 0.7f, 0.7f, 0.7f, 1.4f, 1.4f, 1.4f, 0.0f, 0.0f, 2.1f, 2.8f, 2.8f, 2.8f, 3.5f, // + 3.5f, 3.5f, 0.0f, 0.0f, 2.1f, 2.8f, 2.8f, 2.8f, 3.5f, 3.5f, 3.5f, 0.0f, 0.0f, 2.1f, // + 2.8f, 2.8f, 2.8f, 3.5f, 3.5f, 3.5f, 0.0f, 0.0f, 4.2f, 4.9f, 4.9f, 4.9f, 5.6f, 5.6f, // + 5.6f, 0.0f, 0.0f, 4.2f, 4.9f, 4.9f, 4.9f, 5.6f, 5.6f, 5.6f, 0.0f, 0.0f, 4.2f, 4.9f, // + 4.9f, 4.9f, 5.6f, 5.6f, 5.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, // + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // + }; + return expected; +} + +const std::vector& GetExpectedHiddenPoints() +{ + static std::vector expected = { + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, // + 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, // + 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, // + 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, // + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 // + }; + return expected; +} + +const std::vector& GetExpectedHiddenCells() +{ + static std::vector expected = { + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, // + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, // + 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, // + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 // + }; + return expected; +} + +template +void TestResultArray(vtkDataArray* result, const std::vector& expected) +{ + if (result->GetNumberOfValues() != static_cast(expected.size())) + { + std::cout << "Array " << result->GetName() << " has wrong size" << std::endl; + exit(EXIT_FAILURE); + } + + for (vtkIdType i = 0; i < result->GetNumberOfValues(); ++i) + { + double diff = result->GetComponent(i, 0) - expected[static_cast(i)]; + diff = std::max(diff, -diff); + // The weird use of the not (!) operator here is to catch when diff is a NaN value, + // which will always return false for a comparison. + if (!(diff < 1e-5)) + { + std::cout << "Array " << result->GetName() << " has wrong value" + << " at index " << i << ". result value=" << result->GetComponent(i, 0) + << " expected value=" << expected[static_cast(i)] << std::endl; + exit(EXIT_FAILURE); + } + } +} + +} // Anonymous namespace + +int TestVTKMProbe(int, char*[]) +{ + vtkNew input; + input->SetOrigin(0.7, 0.7, 0.0); + input->SetSpacing(0.35, 0.35, 1.0); + input->SetExtent(0, inputDim - 1, 0, inputDim - 1, 0, 0); + + vtkNew source; + source->SetOrigin(0.0, 0.0, 0.0); + source->SetSpacing(1.0, 1.0, 1.0); + source->SetExtent(0, sourceDim - 1, 0, sourceDim - 1, 0, 0); + + vtkNew pointArray, cellArray; + populatePointAndCellArray(pointArray, cellArray); + source->GetPointData()->AddArray(pointArray); + source->GetCellData()->AddArray(cellArray); + + vtkNew probe; + probe->SetValidPointMaskArrayName("validPoint"); + probe->SetValidCellMaskArrayName("validCell"); + probe->SetInputData(input); + probe->SetSourceData(source); + probe->Update(); + + vtkDataSet* result = probe->GetOutput(); + TestResultArray(result->GetPointData()->GetArray(pointArray->GetName()), GetExpectedPointData()); + TestResultArray(result->GetCellData()->GetArray(cellArray->GetName()), GetExpectedCellData()); + TestResultArray(result->GetPointData()->GetArray("validPoint"), GetExpectedHiddenPoints()); + TestResultArray(result->GetCellData()->GetArray("validCell"), GetExpectedHiddenCells()); + return 0; +} diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMThreshold.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMThreshold.cxx new file mode 100644 index 000000000..2bd407b28 --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMThreshold.cxx @@ -0,0 +1,117 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= + +#include "vtkActor.h" +#include "vtkDataSetSurfaceFilter.h" +#include "vtkFloatArray.h" +#include "vtkImageData.h" +#include "vtkMath.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPolyDataMapper.h" +#include "vtkProperty.h" +#include "vtkRegressionTestImage.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkThreshold.h" +#include "vtkTrivialProducer.h" +#include "vtkmThreshold.h" + +namespace +{ +void fillElevationArray(vtkFloatArray* elven, vtkImageData* grid) +{ + elven->SetName("Elevation"); + const vtkIdType size = grid->GetNumberOfPoints(); + elven->SetNumberOfValues(size); + double pos[3] = { 0, 0, 0 }; + for (vtkIdType i = 0; i < size; ++i) + { + grid->GetPoint(i, pos); + elven->SetValue(i, sqrt(vtkMath::Dot(pos, pos))); + } +} + +int RunVTKPipeline(vtkImageData* grid, int argc, char* argv[]) +{ + vtkNew ren; + vtkNew renWin; + vtkNew iren; + + renWin->AddRenderer(ren); + iren->SetRenderWindow(renWin); + + // compute an elevation array + vtkNew elevationPoints; + fillElevationArray(elevationPoints, grid); + grid->GetPointData()->AddArray(elevationPoints); + + vtkNew producer; + producer->SetOutput(grid); + + vtkNew threshold; + threshold->ForceVTKmOn(); + threshold->SetInputConnection(producer->GetOutputPort()); + threshold->SetPointsDataTypeToFloat(); + threshold->AllScalarsOn(); + threshold->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN); + threshold->SetLowerThreshold(0.0); + threshold->SetUpperThreshold(100.0); + threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "Elevation"); + + vtkNew surface; + surface->SetInputConnection(threshold->GetOutputPort()); + + vtkNew mapper; + mapper->SetInputConnection(surface->GetOutputPort()); + mapper->ScalarVisibilityOn(); + mapper->SetScalarModeToUsePointFieldData(); + mapper->SelectColorArray("Elevation"); + mapper->SetScalarRange(0.0, 100.0); + + vtkNew actor; + actor->SetMapper(mapper); + actor->GetProperty()->SetAmbient(1.0); + actor->GetProperty()->SetDiffuse(0.0); + + ren->AddActor(actor); + ren->ResetCamera(); + renWin->Render(); + + int retVal = vtkRegressionTestImage(renWin); + if (retVal == vtkRegressionTester::DO_INTERACTOR) + { + iren->Start(); + retVal = vtkRegressionTester::PASSED; + } + return (!retVal); +} + +} // Anonymous namespace + +int TestVTKMThreshold(int argc, char* argv[]) +{ + // create the sample grid + vtkNew grid; + int dim = 128; + grid->SetOrigin(0.0, 0.0, 0.0); + grid->SetSpacing(1.0, 1.0, 1.0); + grid->SetExtent(0, dim - 1, 0, dim - 1, 0, dim - 1); + + // run the pipeline + return RunVTKPipeline(grid, argc, argv); +} diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMThreshold2.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMThreshold2.cxx new file mode 100644 index 000000000..cdefa91b8 --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMThreshold2.cxx @@ -0,0 +1,91 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestThreshold.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#include "vtkActor.h" +#include "vtkDataSetSurfaceFilter.h" +#include "vtkElevationFilter.h" +#include "vtkFloatArray.h" +#include "vtkImageData.h" +#include "vtkNew.h" +#include "vtkPointData.h" +#include "vtkPolyDataMapper.h" +#include "vtkRTAnalyticSource.h" +#include "vtkRegressionTestImage.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkmThreshold.h" + +int TestVTKMThreshold2(int argc, char* argv[]) +{ + vtkNew ren; + vtkNew renWin; + vtkNew iren; + + renWin->AddRenderer(ren); + iren->SetRenderWindow(renWin); + + //--------------------------------------------------- + // Test using different thresholding methods + //--------------------------------------------------- + vtkNew source; + + vtkNew elevation; + elevation->SetInputConnection(source->GetOutputPort()); + elevation->SetScalarRange(0.0, 1.0); + elevation->SetLowPoint(-10.0, -10.0, -10.0); + elevation->SetHighPoint(10.0, 10.0, 10.0); + + vtkNew threshold; + threshold->ForceVTKmOn(); + threshold->SetInputConnection(elevation->GetOutputPort()); + threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "RTData"); + + double L = 100.0; + double U = 200.0; + threshold->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN); + threshold->SetLowerThreshold(L); + threshold->SetUpperThreshold(U); + threshold->SetAllScalars(0); + threshold->Update(); + + threshold->UseContinuousCellRangeOn(); + threshold->Update(); + + vtkNew surface; + surface->SetInputConnection(threshold->GetOutputPort()); + + vtkNew mapper; + mapper->SetInputConnection(surface->GetOutputPort()); + mapper->ScalarVisibilityOn(); + mapper->SetScalarModeToUsePointFieldData(); + mapper->SelectColorArray("Elevation"); + mapper->SetScalarRange(0.0, 1.0); + + vtkNew actor; + actor->SetMapper(mapper); + + ren->AddActor(actor); + ren->ResetCamera(); + renWin->Render(); + + int retVal = vtkRegressionTestImage(renWin); + if (retVal == vtkRegressionTester::DO_INTERACTOR) + { + iren->Start(); + retVal = vtkRegressionTester::PASSED; + } + return (!retVal); +} diff --git a/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMTriangleMeshPointNormals.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMTriangleMeshPointNormals.cxx new file mode 100644 index 000000000..12b7e713c --- /dev/null +++ b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMTriangleMeshPointNormals.cxx @@ -0,0 +1,110 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: TestVTKMTriangleMeshPointNormals.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. +=========================================================================*/ +#include "vtkActor.h" +#include "vtkArrowSource.h" +#include "vtkCamera.h" +#include "vtkCleanPolyData.h" +#include "vtkGlyph3D.h" +#include "vtkInteractorStyleTrackballCamera.h" +#include "vtkNew.h" +#include "vtkPolyDataMapper.h" +#include "vtkRegressionTestImage.h" +#include "vtkRenderWindow.h" +#include "vtkRenderWindowInteractor.h" +#include "vtkRenderer.h" +#include "vtkTesting.h" +#include "vtkTriangleFilter.h" +#include "vtkXMLPolyDataReader.h" +#include "vtkmTriangleMeshPointNormals.h" + +int TestVTKMTriangleMeshPointNormals(int argc, char* argv[]) +{ + vtkSmartPointer testHelper = vtkSmartPointer::New(); + testHelper->AddArguments(argc, argv); + if (!testHelper->IsFlagSpecified("-D")) + { + std::cerr << "Error: -D /path/to/data was not specified."; + return EXIT_FAILURE; + } + + std::string dataRoot = testHelper->GetDataRoot(); + std::string fileName = dataRoot + "/Data/cow.vtp"; + std::cout << fileName << std::endl; + + // reader + vtkNew reader; + reader->SetFileName(fileName.c_str()); + + // triangle filter + vtkNew triFilter; + triFilter->SetInputConnection(reader->GetOutputPort()); + + // cleaning filter + vtkNew cleanFilter; + cleanFilter->SetInputConnection(triFilter->GetOutputPort()); + + // normals + vtkNew normFilter; + normFilter->ForceVTKmOn(); + normFilter->SetInputConnection(cleanFilter->GetOutputPort()); + + // mapper, actor + vtkNew mapper; + mapper->SetInputConnection(normFilter->GetOutputPort()); + vtkNew actor; + actor->SetMapper(mapper); + + // glyphs + vtkNew glyphsource; + vtkNew glyph; + glyph->SetInputConnection(normFilter->GetOutputPort()); + glyph->SetSourceConnection(glyphsource->GetOutputPort()); + glyph->SetVectorModeToUseNormal(); + glyph->SetColorModeToColorByVector(); + glyph->SetScaleModeToScaleByVector(); + glyph->SetScaleFactor(0.5); + vtkNew glyphmapper; + glyphmapper->SetInputConnection(glyph->GetOutputPort()); + vtkNew glyphactor; + glyphactor->SetMapper(glyphmapper); + + // renderer + vtkNew renderer; + renderer->AddActor(actor); + renderer->AddActor(glyphactor); + renderer->SetBackground(0.0, 0.0, 0.0); + renderer->ResetCamera(); + + // renderwindow, interactor + vtkNew renWin; + renWin->AddRenderer(renderer); + renWin->SetSize(300, 300); + renWin->SetMultiSamples(0); + vtkNew iren; + iren->SetRenderWindow(renWin); + + iren->Initialize(); + renWin->Render(); + + int retVal = vtkRegressionTestImage(renWin); + if (retVal == vtkRegressionTester::DO_INTERACTOR) + { + vtkNew iStyle; + iren->SetInteractorStyle(iStyle); + renWin->SetSize(1000, 1000); + iren->Start(); + } + + return !retVal; +} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMWarpScalar.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMWarpScalar.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMWarpScalar.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMWarpScalar.cxx diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMWarpVector.cxx b/Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMWarpVector.cxx similarity index 100% rename from Accelerators/Vtkm/Testing/Cxx/TestVTKMWarpVector.cxx rename to Accelerators/Vtkm/Filters/Testing/Cxx/TestVTKMWarpVector.cxx diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMCleanGrid.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMCleanGrid.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMCleanGrid.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMCleanGrid.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMClip.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMClip.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMClip.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMClip.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMClipWithImplicitFunction.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMClipWithImplicitFunction.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMClipWithImplicitFunction.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMClipWithImplicitFunction.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMExternalFaces.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMExternalFaces.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMExternalFaces.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMExternalFaces.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMExtractVOI.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMExtractVOI.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMExtractVOI.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMExtractVOI.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMLevelOfDetail.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMLevelOfDetail.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMLevelOfDetail.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMLevelOfDetail.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMMarchingCubes.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMMarchingCubes.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMMarchingCubes.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMMarchingCubes.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMMarchingCubes2.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMMarchingCubes2.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMMarchingCubes2.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMMarchingCubes2.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMMarchingCubes_1.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMMarchingCubes_1.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMMarchingCubes_1.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMMarchingCubes_1.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMPointElevation.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMPointElevation.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMPointElevation.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMPointElevation.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMPointTransform.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMPointTransform.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMPointTransform.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMPointTransform.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMPolyDataNormals.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMPolyDataNormals.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMPolyDataNormals.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMPolyDataNormals.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMThreshold.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMThreshold.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMThreshold.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMThreshold.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMThreshold2.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMThreshold2.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMThreshold2.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMThreshold2.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMThreshold_1.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMThreshold_1.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMThreshold_1.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMThreshold_1.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMTriangleMeshPointNormals.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMTriangleMeshPointNormals.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMTriangleMeshPointNormals.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMTriangleMeshPointNormals.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMWarpScalar.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMWarpScalar.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMWarpScalar.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMWarpScalar.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMWarpVector.png.sha512 b/Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMWarpVector.png.sha512 similarity index 100% rename from Accelerators/Vtkm/Testing/Data/Baseline/TestVTKMWarpVector.png.sha512 rename to Accelerators/Vtkm/Filters/Testing/Data/Baseline/TestVTKMWarpVector.png.sha512 diff --git a/Accelerators/Vtkm/Testing/Python/CMakeLists.txt b/Accelerators/Vtkm/Filters/Testing/Python/CMakeLists.txt similarity index 100% rename from Accelerators/Vtkm/Testing/Python/CMakeLists.txt rename to Accelerators/Vtkm/Filters/Testing/Python/CMakeLists.txt diff --git a/Accelerators/Vtkm/Testing/Python/TestVTKMAverageToCells.py b/Accelerators/Vtkm/Filters/Testing/Python/TestVTKMAverageToCells.py similarity index 100% rename from Accelerators/Vtkm/Testing/Python/TestVTKMAverageToCells.py rename to Accelerators/Vtkm/Filters/Testing/Python/TestVTKMAverageToCells.py diff --git a/Accelerators/Vtkm/Testing/Python/TestVTKMAverageToPoints.py b/Accelerators/Vtkm/Filters/Testing/Python/TestVTKMAverageToPoints.py similarity index 100% rename from Accelerators/Vtkm/Testing/Python/TestVTKMAverageToPoints.py rename to Accelerators/Vtkm/Filters/Testing/Python/TestVTKMAverageToPoints.py diff --git a/Accelerators/Vtkm/Filters/vtk.module b/Accelerators/Vtkm/Filters/vtk.module new file mode 100644 index 000000000..4c9fc2d35 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtk.module @@ -0,0 +1,29 @@ +NAME + VTK::AcceleratorsVTKmFilters +LIBRARY_NAME + vtkAcceleratorsVTKmFilters +DESCRIPTION + VTKm filters and algorithms +DEPENDS + VTK::AcceleratorsVTKmCore + VTK::AcceleratorsVTKmDataModel + VTK::CommonExecutionModel + VTK::FiltersGeneral + VTK::FiltersGeometry + VTK::ImagingCore +TEST_DEPENDS + VTK::CommonSystem + VTK::FiltersSources + VTK::IOImage + VTK::IOLegacy + VTK::IOPLY + VTK::IOXML + VTK::ImagingHybrid + VTK::ImagingSources + VTK::InteractionStyle + VTK::InteractionWidgets + VTK::RenderingFreeType + VTK::RenderingOpenGL2 + VTK::RenderingVolumeOpenGL2 + VTK::TestingCore + VTK::TestingRendering diff --git a/Accelerators/Vtkm/Filters/vtkmAverageToCells.cxx b/Accelerators/Vtkm/Filters/vtkmAverageToCells.cxx new file mode 100644 index 000000000..ed9d58fe9 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmAverageToCells.cxx @@ -0,0 +1,100 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmAverageToCells.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkObjectFactory.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmAverageToCells); + +//------------------------------------------------------------------------------ +vtkmAverageToCells::vtkmAverageToCells() = default; + +//------------------------------------------------------------------------------ +vtkmAverageToCells::~vtkmAverageToCells() = default; + +//------------------------------------------------------------------------------ +int vtkmAverageToCells::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + output->ShallowCopy(input); + + // grab the input array to process to determine the field we want to average + int association = this->GetInputArrayAssociation(0, inputVector); + auto fieldArray = this->GetInputArrayToProcess(0, inputVector); + if (association != vtkDataObject::FIELD_ASSOCIATION_POINTS || fieldArray == nullptr || + fieldArray->GetName() == nullptr || fieldArray->GetName()[0] == '\0') + { + vtkErrorMacro(<< "Invalid field: Requires a point field with a valid name."); + return 0; + } + + const char* fieldName = fieldArray->GetName(); + + try + { + // convert the input dataset to a vtkm::cont::DataSet + vtkm::cont::DataSet in = tovtkm::Convert(input); + auto field = tovtkm::Convert(fieldArray, association); + in.AddField(field); + + vtkm::filter::CellAverage filter; + filter.SetActiveField(fieldName, vtkm::cont::Field::Association::POINTS); + filter.SetOutputFieldName(fieldName); // should we expose this control? + + auto result = filter.Execute(in); + + // convert back the dataset to VTK, and add the field as a cell field + vtkDataArray* resultingArray = fromvtkm::Convert(result.GetCellField(fieldName)); + if (resultingArray == nullptr) + { + vtkErrorMacro(<< "Unable to convert result array from VTK-m to VTK"); + return 0; + } + + output->GetCellData()->AddArray(resultingArray); + resultingArray->FastDelete(); + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmAverageToCells::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} diff --git a/Accelerators/Vtkm/Filters/vtkmAverageToCells.h b/Accelerators/Vtkm/Filters/vtkmAverageToCells.h new file mode 100644 index 000000000..b24993427 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmAverageToCells.h @@ -0,0 +1,52 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmAverageToPoints + * @brief Accelerated point to cell interpolation filter. + * + * vtkmAverageToPoints is a filter that transforms point data (i.e., data + * specified at cell points) into cell data (i.e., data specified per cell). + * The method of transformation is based on averaging the data + * values of all points used by particular cell. This filter will also + * pass through any existing point and cell arrays. + * + */ + +#ifndef vtkmAverageToCells_h +#define vtkmAverageToCells_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkDataSetAlgorithm.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmAverageToCells : public vtkDataSetAlgorithm +{ +public: + vtkTypeMacro(vtkmAverageToCells, vtkDataSetAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmAverageToCells* New(); + +protected: + vtkmAverageToCells(); + ~vtkmAverageToCells() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + +private: + vtkmAverageToCells(const vtkmAverageToCells&) = delete; + void operator=(const vtkmAverageToCells&) = delete; +}; + +#endif // vtkmAverageToCells_h diff --git a/Accelerators/Vtkm/Filters/vtkmAverageToPoints.cxx b/Accelerators/Vtkm/Filters/vtkmAverageToPoints.cxx new file mode 100644 index 000000000..00c722f31 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmAverageToPoints.cxx @@ -0,0 +1,101 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmAverageToPoints.h" + +#include "vtkDataSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkNew.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmAverageToPoints); + +//------------------------------------------------------------------------------ +vtkmAverageToPoints::vtkmAverageToPoints() = default; + +//------------------------------------------------------------------------------ +vtkmAverageToPoints::~vtkmAverageToPoints() = default; + +//------------------------------------------------------------------------------ +int vtkmAverageToPoints::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + output->ShallowCopy(input); + + // grab the input array to process to determine the field we want to average + int association = this->GetInputArrayAssociation(0, inputVector); + auto fieldArray = this->GetInputArrayToProcess(0, inputVector); + if (association != vtkDataObject::FIELD_ASSOCIATION_CELLS || fieldArray == nullptr || + fieldArray->GetName() == nullptr || fieldArray->GetName()[0] == '\0') + { + vtkErrorMacro(<< "Invalid field: Requires a cell field with a valid name."); + return 0; + } + + const char* fieldName = fieldArray->GetName(); + + try + { + // convert the input dataset to a vtkm::cont::DataSet + vtkm::cont::DataSet in = tovtkm::Convert(input); + auto field = tovtkm::Convert(fieldArray, association); + in.AddField(field); + + vtkm::filter::PointAverage filter; + filter.SetActiveField(fieldName, vtkm::cont::Field::Association::CELL_SET); + filter.SetOutputFieldName(fieldName); // should we expose this control? + + auto result = filter.Execute(in); + + // convert back the dataset to VTK, and add the field as a point field + vtkDataArray* resultingArray = fromvtkm::Convert(result.GetPointField(fieldName)); + if (resultingArray == nullptr) + { + vtkErrorMacro(<< "Unable to convert result array from VTK-m to VTK"); + return 0; + } + + output->GetPointData()->AddArray(resultingArray); + resultingArray->FastDelete(); + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmAverageToPoints::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} diff --git a/Accelerators/Vtkm/Filters/vtkmAverageToPoints.h b/Accelerators/Vtkm/Filters/vtkmAverageToPoints.h new file mode 100644 index 000000000..4f4e49598 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmAverageToPoints.h @@ -0,0 +1,51 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmAverageToPoints + * @brief Accelerated cell to point interpolation filter. + * + * vtkmAverageToPoints is a filter that transforms cell data (i.e., data + * specified per cell) into point data (i.e., data specified at cell + * points). The method of transformation is based on averaging the data + * values of all cells using a particular point. This filter will also + * pass through any existing point and cell arrays. + * + */ +#ifndef vtkmAverageToPoints_h +#define vtkmAverageToPoints_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkDataSetAlgorithm.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmAverageToPoints : public vtkDataSetAlgorithm +{ +public: + vtkTypeMacro(vtkmAverageToPoints, vtkDataSetAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmAverageToPoints* New(); + +protected: + vtkmAverageToPoints(); + ~vtkmAverageToPoints() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + +private: + vtkmAverageToPoints(const vtkmAverageToPoints&) = delete; + void operator=(const vtkmAverageToPoints&) = delete; +}; + +#endif // vtkmAverageToPoints_h diff --git a/Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx b/Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx new file mode 100644 index 000000000..0cfde7e99 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmCleanGrid.cxx @@ -0,0 +1,102 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmCleanGrid.h" + +#include "vtkCellData.h" +#include "vtkDemandDrivenPipeline.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" +#include "vtkmlib/UnstructuredGridConverter.h" + +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmCleanGrid); + +//------------------------------------------------------------------------------ +vtkmCleanGrid::vtkmCleanGrid() + : CompactPoints(false) +{ +} + +//------------------------------------------------------------------------------ +vtkmCleanGrid::~vtkmCleanGrid() = default; + +//------------------------------------------------------------------------------ +void vtkmCleanGrid::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); + os << indent << "CompactPoints: " << (this->CompactPoints ? "On" : "Off") << "\n"; +} + +//------------------------------------------------------------------------------ +int vtkmCleanGrid::FillInputPortInformation(int, vtkInformation* info) +{ + info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet"); + return 1; +} + +//------------------------------------------------------------------------------ +int vtkmCleanGrid::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + vtkUnstructuredGrid* output = + vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + try + { + // convert the input dataset to a vtkm::cont::DataSet + auto fieldsFlag = this->CompactPoints ? tovtkm::FieldsFlag::Points : tovtkm::FieldsFlag::None; + vtkm::cont::DataSet in = tovtkm::Convert(input, fieldsFlag); + + // apply the filter + vtkm::filter::CleanGrid filter; + filter.SetCompactPointFields(this->CompactPoints); + auto result = filter.Execute(in); + + // convert back to vtkDataSet (vtkUnstructuredGrid) + if (!fromvtkm::Convert(result, output, input)) + { + vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + // pass cell data + if (!this->CompactPoints) + { + output->GetPointData()->PassData(input->GetPointData()); + } + output->GetCellData()->PassData(input->GetCellData()); + + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmCleanGrid.h b/Accelerators/Vtkm/Filters/vtkmCleanGrid.h new file mode 100644 index 000000000..3bf731ee0 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmCleanGrid.h @@ -0,0 +1,68 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmCleanGrid + * @brief removes redundant or unused cells and/or points + * + * vtkmCleanGrid is a filter that takes vtkDataSet data as input and + * generates vtkUnstructuredGrid as output. vtkmCleanGrid will convert all cells + * to an explicit representation, and if enabled, will remove unused points. + * + */ + +#ifndef vtkmCleanGrid_h +#define vtkmCleanGrid_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkUnstructuredGridAlgorithm.h" + +class vtkDataSet; +class vtkUnstructuredGrid; + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmCleanGrid : public vtkUnstructuredGridAlgorithm +{ +public: + vtkTypeMacro(vtkmCleanGrid, vtkUnstructuredGridAlgorithm); + + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmCleanGrid* New(); + + ///@{ + /** + * Get/Set if the points from the input that are unused in the output should + * be removed. This will take extra time but the result dataset may use + * less memory. Off by default. + */ + vtkSetMacro(CompactPoints, bool); + vtkGetMacro(CompactPoints, bool); + vtkBooleanMacro(CompactPoints, bool); + ///@} + +protected: + vtkmCleanGrid(); + ~vtkmCleanGrid() override; + + int FillInputPortInformation(int, vtkInformation*) override; + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + bool CompactPoints; + +private: + vtkmCleanGrid(const vtkmCleanGrid&) = delete; + void operator=(const vtkmCleanGrid&) = delete; +}; + +#endif // vtkmCleanGrid_h diff --git a/Accelerators/Vtkm/Filters/vtkmClip.cxx b/Accelerators/Vtkm/Filters/vtkmClip.cxx new file mode 100644 index 000000000..65fec3110 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmClip.cxx @@ -0,0 +1,220 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkmClip.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#include "vtkmClip.h" +#include "vtkmClipInternals.h" + +#include "vtkCellIterator.h" +#include "vtkDataArray.h" +#include "vtkDataSet.h" +#include "vtkDemandDrivenPipeline.h" +#include "vtkImplicitFunction.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" +#include "vtkTableBasedClipDataSet.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" +#include "vtkmlib/ImplicitFunctionConverter.h" +#include "vtkmlib/PolyDataConverter.h" +#include "vtkmlib/UnstructuredGridConverter.h" + +#include "vtkmFilterPolicy.h" + +#include +#include + +#include + +vtkStandardNewMacro(vtkmClip); + +//------------------------------------------------------------------------------ +void vtkmClip::PrintSelf(std::ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); + + os << indent << "ClipValue: " << this->GetClipValue() << "\n"; + os << indent << "ClipFunction: \n"; + this->GetClipFunction()->PrintSelf(os, indent.GetNextIndent()); + os << indent << "ComputeScalars: " << this->GetComputeScalars() << "\n"; +} + +//------------------------------------------------------------------------------ +vtkmClip::vtkmClip() + : Internals(new vtkmClip::internals) +{ + this->Internals->ClipFunctionConverter.reset(new tovtkm::ImplicitFunctionConverter()); + // Clip active point scalars by default + this->SetInputArrayToProcess( + 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, vtkDataSetAttributes::SCALARS); +} + +//------------------------------------------------------------------------------ +vtkmClip::~vtkmClip() = default; + +//------------------------------------------------------------------------------ +vtkMTimeType vtkmClip::GetMTime() +{ + vtkMTimeType mTime = this->Superclass::GetMTime(); + if (this->GetClipFunction()) + { + mTime = std::max(mTime, this->GetClipFunction()->GetMTime()); + } + return mTime; +} + +//------------------------------------------------------------------------------ +double vtkmClip::GetClipValue() +{ + return this->Internals->ClipValue; +} + +//------------------------------------------------------------------------------ +void vtkmClip::SetClipValue(double val) +{ + this->Internals->ClipValue = val; +} + +//------------------------------------------------------------------------------ +bool vtkmClip::GetComputeScalars() +{ + return this->Internals->ComputeScalars; +} + +//------------------------------------------------------------------------------ +void vtkmClip::SetComputeScalars(bool val) +{ + this->Internals->ComputeScalars = val; +} + +//------------------------------------------------------------------------------ +void vtkmClip::SetClipFunction(vtkImplicitFunction* clipFunction) +{ + if (this->GetClipFunction() != clipFunction) + { + this->Internals->ClipFunction = clipFunction; + this->Internals->ClipFunctionConverter->Set(clipFunction); + this->Modified(); + } +} + +//------------------------------------------------------------------------------ +vtkImplicitFunction* vtkmClip::GetClipFunction() +{ + return this->Internals->ClipFunction; +} + +//------------------------------------------------------------------------------ +int vtkmClip::RequestData( + vtkInformation*, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) +{ + vtkm::cont::ScopedRuntimeDeviceTracker tracker( + vtkm::cont::DeviceAdapterTagCuda{}, vtkm::cont::RuntimeDeviceTrackerMode::Disable); + + vtkInformation* inInfo = inInfoVec[0]->GetInformationObject(0); + vtkInformation* outInfo = outInfoVec->GetInformationObject(0); + + // Extract data objects from info: + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + vtkUnstructuredGrid* output = + vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + // Find the scalar array: + int assoc = this->GetInputArrayAssociation(0, inInfoVec); + vtkDataArray* scalars = this->GetInputArrayToProcess(0, inInfoVec); + if (!this->GetClipFunction() && + (assoc != vtkDataObject::FIELD_ASSOCIATION_POINTS || scalars == nullptr || + scalars->GetName() == nullptr || scalars->GetName()[0] == '\0')) + { + vtkErrorMacro("Invalid scalar array; array missing or not a point array."); + return 0; + } + + // Validate input objects: + if (input->GetNumberOfPoints() == 0 || input->GetNumberOfCells() == 0) + { + return 1; // nothing to do + } + + try + { + // Convert inputs to vtkm objects: + auto fieldsFlag = + this->GetComputeScalars() ? tovtkm::FieldsFlag::PointsAndCells : tovtkm::FieldsFlag::None; + auto in = tovtkm::Convert(input, fieldsFlag); + + // Run filter: + vtkm::cont::DataSet result; + if (this->GetClipFunction()) + { + result = this->Internals->ExecuteClipWithImplicitFunction(in); + } + else + { + result = this->Internals->ExecuteClipWithField(in, scalars, assoc); + } + + // Convert result to output: + if (!fromvtkm::Convert(result, output, input)) + { + vtkErrorMacro("Error generating vtkUnstructuredGrid from vtkm's result."); + return 0; + } + + if (!this->GetClipFunction() && this->GetComputeScalars()) + { + output->GetPointData()->SetActiveScalars(scalars->GetName()); + } + + return 1; + } + catch (const vtkm::cont::Error& e) + { + if (this->ForceVTKm) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + else + { + vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() + << "Falling back to serial implementation."); + + vtkNew filter; + filter->SetClipFunction(this->GetClipFunction()); + filter->SetValue(this->GetClipValue()); + filter->SetInputData(input); + filter->Update(); + output->ShallowCopy(filter->GetOutput()); + return 1; + } + } +} + +//------------------------------------------------------------------------------ +int vtkmClip::FillInputPortInformation(int, vtkInformation* info) +{ + // These are the types supported by tovtkm::Convert: + info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkUnstructuredGrid"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkStructuredGrid"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkUniformGrid"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmClip.h b/Accelerators/Vtkm/Filters/vtkmClip.h new file mode 100644 index 000000000..5e5f2ee6d --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmClip.h @@ -0,0 +1,95 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmClip + * @brief Clip a dataset using the accelerated vtk-m Clip filter. + * + * Clip a dataset using either a given value or by using an vtkImplicitFunction + * Currently the supported implicit functions are Box, Plane, and Sphere. + * + */ + +#ifndef vtkmClip_h +#define vtkmClip_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // For export macro +#include "vtkUnstructuredGridAlgorithm.h" + +#include // For std::unique_ptr + +class vtkImplicitFunction; + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmClip : public vtkUnstructuredGridAlgorithm +{ +public: + static vtkmClip* New(); + vtkTypeMacro(vtkmClip, vtkUnstructuredGridAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + + /** + * The scalar value to use when clipping the dataset. Values greater than + * ClipValue are preserved in the output dataset. Default is 0. + */ + double GetClipValue(); + void SetClipValue(double); + + /** + * If true, all input point data arrays will be mapped onto the output + * dataset. Default is true. + */ + bool GetComputeScalars(); + void SetComputeScalars(bool); + + /** + * Set the implicit function with which to perform the clipping. If set, + * \c ClipValue is ignored and the clipping is performed using the implicit + * function. + */ + void SetClipFunction(vtkImplicitFunction*); + vtkImplicitFunction* GetClipFunction(); + + vtkMTimeType GetMTime() override; + + ///@{ + /** + * When this flag is off (the default), then the computation will fall back + * to the serial VTK version if VTK-m fails to run. When the flag is on, + * the filter will generate an error if VTK-m fails to run. This is mostly + * useful in testing to make sure the expected algorithm is run. + */ + vtkGetMacro(ForceVTKm, vtkTypeBool); + vtkSetMacro(ForceVTKm, vtkTypeBool); + vtkBooleanMacro(ForceVTKm, vtkTypeBool); + ///@} + +protected: + vtkmClip(); + ~vtkmClip() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + int FillInputPortInformation(int port, vtkInformation* info) override; + + vtkTypeBool ForceVTKm = false; + + struct internals; + std::unique_ptr Internals; + +private: + vtkmClip(const vtkmClip&) = delete; + void operator=(const vtkmClip&) = delete; +}; + +#endif // vtkmClip_h diff --git a/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithField.cxx b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithField.cxx new file mode 100644 index 000000000..e81b5cdab --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithField.cxx @@ -0,0 +1,39 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkmClipInstantiationsWithField.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#include "vtkmClipInternals.h" +#include "vtkmlib/DataSetConverters.h" + +#include + +//------------------------------------------------------------------------------ +vtkm::cont::DataSet vtkmClip::internals::ExecuteClipWithField( + vtkm::cont::DataSet& in, vtkDataArray* scalars, int assoc) +{ + vtkm::filter::ClipWithField fieldFilter; + if (!this->ComputeScalars) + { + // explicitly convert just the field we need + auto inField = tovtkm::Convert(scalars, assoc); + in.AddField(inField); + // don't pass this field + fieldFilter.SetFieldsToPass( + vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE)); + } + + fieldFilter.SetActiveField(scalars->GetName(), vtkm::cont::Field::Association::POINTS); + fieldFilter.SetClipValue(this->ClipValue); + return fieldFilter.Execute(in); +} diff --git a/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx new file mode 100644 index 000000000..674d9b6e0 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmClipInstantiationsWithImplicitFunction.cxx @@ -0,0 +1,32 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkmClipInstantiationsWithImplicitFunction.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#include "vtkmClipInternals.h" +#include "vtkmlib/DataSetConverters.h" + +#include + +//------------------------------------------------------------------------------ +vtkm::cont::DataSet vtkmClip::internals::ExecuteClipWithImplicitFunction(vtkm::cont::DataSet& in) +{ + auto function = this->ClipFunctionConverter->Get(); + + vtkm::cont::DataSet result; + vtkm::filter::ClipWithImplicitFunction functionFilter; + functionFilter.SetImplicitFunction(function); + result = functionFilter.Execute(in); + + return result; +} diff --git a/Accelerators/Vtkm/Filters/vtkmClipInternals.h b/Accelerators/Vtkm/Filters/vtkmClipInternals.h new file mode 100644 index 000000000..7b4b1a1a4 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmClipInternals.h @@ -0,0 +1,38 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkmClipInternals.h + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#ifndef vtkmClipInternals_h +#define vtkmClipInternals_h + +#include "vtkDataArray.h" +#include "vtkmClip.h" +#include "vtkmlib/ImplicitFunctionConverter.h" + +#include + +struct vtkmClip::internals +{ + double ClipValue = .0; + bool ComputeScalars = true; + + vtkImplicitFunction* ClipFunction = nullptr; + std::unique_ptr ClipFunctionConverter; + + vtkm::cont::DataSet ExecuteClipWithImplicitFunction(vtkm::cont::DataSet&); + vtkm::cont::DataSet ExecuteClipWithField(vtkm::cont::DataSet&, vtkDataArray*, int); +}; + +#endif +// VTK-HeaderTest-Exclude: vtkmClipInternals.h diff --git a/Accelerators/Vtkm/Filters/vtkmConfigFilters.h.in b/Accelerators/Vtkm/Filters/vtkmConfigFilters.h.in new file mode 100644 index 000000000..f99c237ff --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmConfigFilters.h.in @@ -0,0 +1,55 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: ObjectFactory.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#ifndef vtkConfigFilters_h +#define vtkConfigFilters_h + +/*--------------------------------------------------------------------------*/ +/* Other Configuration Options */ + +#include +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation + + +/*--------------------------------------------------------------------------*/ +/* Make sure we use the same id's in VTK and VTK-m */ +#include "vtkType.h" +#ifdef VTK_USE_64BIT_IDS +# ifndef VTKM_USE_64BIT_IDS +# error VTK was defined with 64-bit ids but VTK-m with 32-bit ids. +# endif +#else // !VTK_USE_64BIT_IDS +# ifdef VTKM_USE_64BIT_IDS +# error VTK was defined with 32-bit ids but VTK-m with 64-bit ids. +# endif +#endif + + +#ifndef VTKACCELERATORSVTKMFILTERSFILTERS_TEMPLATE_EXPORT +# if !defined(VTKACCELERATORSVTKMFILTERSFILTERS_STATIC_DEFINE) && defined(_MSC_VER) + /* Warning C4910 on windows state that extern explicit template can't be + labeled with __declspec(dllexport). So that is why we use a new custom + define. But when other modules ( e.g. rendering ) include this header + we need them to see that the extern template is actually being imported. + */ + /* We are building this library with MSVC */ +# define VTKACCELERATORSVTKMFILTERSFILTERS_TEMPLATE_EXPORT +# else + /* Defer to the config module */ +# define VTKACCELERATORSVTKMFILTERSFILTERS_TEMPLATE_EXPORT VTKACCELERATORSVTKMFILTERSFILTERS_EXPORT +# endif +#endif + + +#endif // vtkConfigFilters_h diff --git a/Accelerators/Vtkm/Filters/vtkmContour.cxx b/Accelerators/Vtkm/Filters/vtkmContour.cxx new file mode 100644 index 000000000..eae3a0339 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmContour.cxx @@ -0,0 +1,135 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmContour.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkNew.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" +#include "vtkmlib/PolyDataConverter.h" + +#include "vtkmFilterPolicy.h" + +#include +#include + +vtkStandardNewMacro(vtkmContour); + +//------------------------------------------------------------------------------ +vtkmContour::vtkmContour() = default; + +//------------------------------------------------------------------------------ +vtkmContour::~vtkmContour() = default; + +//------------------------------------------------------------------------------ +void vtkmContour::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} + +//------------------------------------------------------------------------------ +int vtkmContour::RequestData( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkm::cont::ScopedRuntimeDeviceTracker tracker( + vtkm::cont::DeviceAdapterTagCuda{}, vtkm::cont::RuntimeDeviceTrackerMode::Disable); + + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + // Find the scalar array: + int association = this->GetInputArrayAssociation(0, inputVector); + vtkDataArray* inputArray = this->GetInputArrayToProcess(0, inputVector); + if (association != vtkDataObject::FIELD_ASSOCIATION_POINTS || inputArray == nullptr || + inputArray->GetName() == nullptr || inputArray->GetName()[0] == '\0') + { + vtkErrorMacro("Invalid scalar array; array missing or not a point array."); + return 0; + } + + const int numContours = this->GetNumberOfContours(); + if (numContours == 0) + { + return 1; + } + + try + { + vtkm::filter::Contour filter; + filter.SetActiveField(inputArray->GetName(), vtkm::cont::Field::Association::POINTS); + filter.SetGenerateNormals(this->GetComputeNormals() != 0); + filter.SetNumberOfIsoValues(numContours); + for (int i = 0; i < numContours; ++i) + { + filter.SetIsoValue(i, this->GetValue(i)); + } + + // convert the input dataset to a vtkm::cont::DataSet + vtkm::cont::DataSet in; + if (this->ComputeScalars) + { + in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + } + else + { + in = tovtkm::Convert(input, tovtkm::FieldsFlag::None); + // explicitly convert just the field we need + auto inField = tovtkm::Convert(inputArray, association); + in.AddField(inField); + // don't pass this field + filter.SetFieldsToPass(vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE)); + } + + vtkm::cont::DataSet result = filter.Execute(in); + + // convert back the dataset to VTK + if (!fromvtkm::Convert(result, output, input)) + { + vtkWarningMacro(<< "Unable to convert VTKm DataSet back to VTK.\n" + << "Falling back to serial implementation."); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + + if (this->ComputeScalars) + { + output->GetPointData()->SetActiveScalars(inputArray->GetName()); + } + if (this->ComputeNormals) + { + output->GetPointData()->SetActiveAttribute( + filter.GetNormalArrayName().c_str(), vtkDataSetAttributes::NORMALS); + } + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + // we got this far, everything is good + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmContour.h b/Accelerators/Vtkm/Filters/vtkmContour.h new file mode 100644 index 000000000..600e9460b --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmContour.h @@ -0,0 +1,57 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmContour + * @brief generate isosurface(s) from volume + * + * vtkmContour is a filter that takes as input a volume (e.g., 3D + * structured point set) and generates on output one or more isosurfaces. + * One or more contour values must be specified to generate the isosurfaces. + * Alternatively, you can specify a min/max scalar range and the number of + * contours to generate a series of evenly spaced contour values. + * + * @warning + * This filter is currently only supports 3D volumes. If you are interested in + * contouring other types of data, use the general vtkContourFilter. If you + * want to contour an image (i.e., a volume slice), use vtkMarchingSquares. + * + */ + +#ifndef vtkmContour_h +#define vtkmContour_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkContourFilter.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmContour : public vtkContourFilter +{ +public: + vtkTypeMacro(vtkmContour, vtkContourFilter); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmContour* New(); + +protected: + vtkmContour(); + ~vtkmContour() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + +private: + vtkmContour(const vtkmContour&) = delete; + void operator=(const vtkmContour&) = delete; +}; + +#endif // vtkmContour_h diff --git a/Accelerators/Vtkm/Filters/vtkmCoordinateSystemTransform.cxx b/Accelerators/Vtkm/Filters/vtkmCoordinateSystemTransform.cxx new file mode 100644 index 000000000..2fc5240e7 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmCoordinateSystemTransform.cxx @@ -0,0 +1,205 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmCoordinateSystemTransform.h" +#include "vtkmConfigFilters.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkImageData.h" +#include "vtkImageDataToPointSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkRectilinearGrid.h" +#include "vtkRectilinearGridToPointSet.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmCoordinateSystemTransform); + +//------------------------------------------------------------------------------ +vtkmCoordinateSystemTransform::vtkmCoordinateSystemTransform() +{ + this->TransformType = TransformTypes::None; +} + +//------------------------------------------------------------------------------ +vtkmCoordinateSystemTransform::~vtkmCoordinateSystemTransform() = default; + +//------------------------------------------------------------------------------ +void vtkmCoordinateSystemTransform::SetCartesianToCylindrical() +{ + this->TransformType = TransformTypes::CarToCyl; +} + +//------------------------------------------------------------------------------ +void vtkmCoordinateSystemTransform::SetCylindricalToCartesian() +{ + this->TransformType = TransformTypes::CylToCar; +} + +//------------------------------------------------------------------------------ +void vtkmCoordinateSystemTransform::SetCartesianToSpherical() +{ + this->TransformType = TransformTypes::CarToSph; +} + +//------------------------------------------------------------------------------ +void vtkmCoordinateSystemTransform::SetSphericalToCartesian() +{ + this->TransformType = TransformTypes::SphToCar; +} + +//------------------------------------------------------------------------------ +int vtkmCoordinateSystemTransform::FillInputPortInformation( + int vtkNotUsed(port), vtkInformation* info) +{ + info->Remove(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE()); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPointSet"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkRectilinearGrid"); + return 1; +} + +//------------------------------------------------------------------------------ +int vtkmCoordinateSystemTransform::RequestDataObject( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); + vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); + + if (inImage || inRect) + { + vtkStructuredGrid* output = vtkStructuredGrid::GetData(outputVector); + if (!output) + { + vtkNew newOutput; + outputVector->GetInformationObject(0)->Set(vtkDataObject::DATA_OBJECT(), newOutput); + } + return 1; + } + else + { + return this->Superclass::RequestDataObject(request, inputVector, outputVector); + } +} + +//------------------------------------------------------------------------------ +int vtkmCoordinateSystemTransform::RequestData( + vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkSmartPointer input = vtkPointSet::GetData(inputVector[0]); + vtkPointSet* output = vtkPointSet::GetData(outputVector); + + if (!input) + { + // Try converting image data. + vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); + if (inImage) + { + vtkNew image2points; + image2points->SetInputData(inImage); + image2points->Update(); + input = image2points->GetOutput(); + } + } + + if (!input) + { + // Try converting rectilinear grid. + vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); + if (inRect) + { + vtkNew rect2points; + rect2points->SetInputData(inRect); + rect2points->Update(); + input = rect2points->GetOutput(); + } + } + + if (!input) + { + vtkErrorMacro(<< "Invalid or missing input"); + return 0; + } + + output->CopyStructure(input); + + vtkPoints* inPts = input->GetPoints(); + + if (!inPts || this->TransformType == TransformTypes::None) + { + vtkErrorMacro(<< "Miss input points or transform type has not been specified"); + return 0; + } + + try + { + vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::Points); + vtkPoints* points = nullptr; + if (this->TransformType == TransformTypes::CarToCyl || + this->TransformType == TransformTypes::CylToCar) + { // Cylindrical coordinate transform + vtkm::filter::CylindricalCoordinateTransform cylindricalCT; + cylindricalCT.SetUseCoordinateSystemAsField(true); + (this->TransformType == TransformTypes::CarToCyl) ? cylindricalCT.SetCartesianToCylindrical() + : cylindricalCT.SetCylindricalToCartesian(); + auto result = cylindricalCT.Execute(in); + points = fromvtkm::Convert(result.GetCoordinateSystem()); + } + else + { // Spherical coordinate system + vtkm::filter::SphericalCoordinateTransform sphericalCT; + sphericalCT.SetUseCoordinateSystemAsField(true); + (this->TransformType == TransformTypes::CarToSph) ? sphericalCT.SetCartesianToSpherical() + : sphericalCT.SetSphericalToCartesian(); + auto result = sphericalCT.Execute(in); + points = fromvtkm::Convert(result.GetCoordinateSystem()); + } + + if (points) + { + output->SetPoints(points); + points->FastDelete(); + } + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + // Update ourselves and release memory + output->GetPointData()->CopyNormalsOff(); // distorted geometry + output->GetPointData()->PassData(input->GetPointData()); + output->GetCellData()->CopyNormalsOff(); // distorted geometry + output->GetCellData()->PassData(input->GetCellData()); + + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmCoordinateSystemTransform::PrintSelf(std::ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} diff --git a/Accelerators/Vtkm/Filters/vtkmCoordinateSystemTransform.h b/Accelerators/Vtkm/Filters/vtkmCoordinateSystemTransform.h new file mode 100644 index 000000000..0035fb5ed --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmCoordinateSystemTransform.h @@ -0,0 +1,71 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmCoordinateSystemTransform + * @brief transform a coordinate system between Cartesian&Cylindrical and + * Cartesian&Spherical + * + * vtkmCoordinateSystemTransform is a filter that transforms a coordinate system + * between Cartesian&Cylindrical and Cartesian&Spherical. + */ + +#ifndef vtkmCoordinateSystemTransform_h +#define vtkmCoordinateSystemTransform_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // required for correct export +#include "vtkPointSetAlgorithm.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmCoordinateSystemTransform : public vtkPointSetAlgorithm +{ + enum struct TransformTypes + { + None, + CarToCyl, + CylToCar, + CarToSph, + SphToCar + }; + +public: + vtkTypeMacro(vtkmCoordinateSystemTransform, vtkPointSetAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + + static vtkmCoordinateSystemTransform* New(); + + void SetCartesianToCylindrical(); + void SetCylindricalToCartesian(); + + void SetCartesianToSpherical(); + void SetSphericalToCartesian(); + + int FillInputPortInformation(int port, vtkInformation* info) override; + +protected: + vtkmCoordinateSystemTransform(); + ~vtkmCoordinateSystemTransform() override; + + int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector, + vtkInformationVector* outputVector) override; + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + +private: + vtkmCoordinateSystemTransform(const vtkmCoordinateSystemTransform&) = delete; + void operator=(const vtkmCoordinateSystemTransform&) = delete; + + TransformTypes TransformType; +}; + +#endif // vtkmCoordinateSystemTransform_h diff --git a/Accelerators/Vtkm/Filters/vtkmExternalFaces.cxx b/Accelerators/Vtkm/Filters/vtkmExternalFaces.cxx new file mode 100644 index 000000000..366106016 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmExternalFaces.cxx @@ -0,0 +1,134 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmExternalFaces.h" + +#include "vtkCellData.h" +#include "vtkDemandDrivenPipeline.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkNew.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkUnsignedCharArray.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/CellSetConverters.h" +#include "vtkmlib/DataSetConverters.h" +#include "vtkmlib/UnstructuredGridConverter.h" + +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmExternalFaces); + +//------------------------------------------------------------------------------ +vtkmExternalFaces::vtkmExternalFaces() + : CompactPoints(false) +{ + this->SetNumberOfInputPorts(1); + this->SetNumberOfOutputPorts(1); +} + +//------------------------------------------------------------------------------ +vtkmExternalFaces::~vtkmExternalFaces() = default; + +//------------------------------------------------------------------------------ +void vtkmExternalFaces::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} + +//------------------------------------------------------------------------------ +void vtkmExternalFaces::SetInputData(vtkUnstructuredGrid* ds) +{ + this->SetInputDataObject(0, ds); +} + +//------------------------------------------------------------------------------ +vtkUnstructuredGrid* vtkmExternalFaces::GetOutput() +{ + return vtkUnstructuredGrid::SafeDownCast(this->GetOutputDataObject(0)); +} + +//------------------------------------------------------------------------------ +int vtkmExternalFaces::FillInputPortInformation(int, vtkInformation* info) +{ + info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkUnstructuredGrid"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkStructuredGrid"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkRectilinearGrid"); + return 1; +} + +//------------------------------------------------------------------------------ +int vtkmExternalFaces::FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) +{ + info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkUnstructuredGrid"); + return 1; +} + +//------------------------------------------------------------------------------ +vtkTypeBool vtkmExternalFaces::ProcessRequest( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + // generate the data + if (request->Has(vtkDemandDrivenPipeline::REQUEST_DATA())) + { + return this->RequestData(request, inputVector, outputVector); + } + + return this->Superclass::ProcessRequest(request, inputVector, outputVector); +} + +//------------------------------------------------------------------------------ +int vtkmExternalFaces::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + vtkUnstructuredGrid* output = + vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + try + { + // convert the input dataset to a vtkm::cont::DataSet + auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + + // apply the filter + vtkm::filter::ExternalFaces filter; + filter.SetCompactPoints(this->CompactPoints); + filter.SetPassPolyData(true); + auto result = filter.Execute(in); + + // convert back to vtkDataSet (vtkUnstructuredGrid) + if (!fromvtkm::Convert(result, output, input)) + { + vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmExternalFaces.h b/Accelerators/Vtkm/Filters/vtkmExternalFaces.h new file mode 100644 index 000000000..ad009a4fc --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmExternalFaces.h @@ -0,0 +1,82 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmExternalFaces + * @brief generate External Faces of a DataSet + * + * vtkmExternalFaces is a filter that extracts all external faces from a + * data set. An external face is defined is defined as a face/side of a cell + * that belongs only to one cell in the entire mesh. + * @warning + * This filter is currently only supports propagation of point properties + * + */ + +#ifndef vtkmExternalFaces_h +#define vtkmExternalFaces_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkAlgorithm.h" + +class vtkUnstructuredGrid; + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmExternalFaces : public vtkAlgorithm +{ +public: + vtkTypeMacro(vtkmExternalFaces, vtkAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmExternalFaces* New(); + + /** + * Set the input DataSet + */ + void SetInputData(vtkUnstructuredGrid* ds); + + /** + * Get the resulr DataSet + */ + vtkUnstructuredGrid* GetOutput(); + + ///@{ + /** + * Get/Set if the points from the input that are unused in the output should + * be removed. This will take extra time but the result dataset may use + * less memory. Off by default. + */ + vtkSetMacro(CompactPoints, bool); + vtkGetMacro(CompactPoints, bool); + vtkBooleanMacro(CompactPoints, bool); + ///@} + +protected: + vtkmExternalFaces(); + ~vtkmExternalFaces() override; + + int FillInputPortInformation(int, vtkInformation*) override; + int FillOutputPortInformation(int, vtkInformation*) override; + + vtkTypeBool ProcessRequest( + vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*); + + bool CompactPoints; + +private: + vtkmExternalFaces(const vtkmExternalFaces&) = delete; + void operator=(const vtkmExternalFaces&) = delete; +}; + +#endif // vtkmExternalFaces_h diff --git a/Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx b/Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx new file mode 100644 index 000000000..32bf94f63 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmExtractVOI.cxx @@ -0,0 +1,98 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkExtractVOI.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "vtkmExtractVOI.h" + +#include "vtkCellData.h" +#include "vtkExtractStructuredGridHelper.h" +#include "vtkImageData.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkPointData.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/ImageDataConverter.h" + +#include "vtkmFilterPolicy.h" + +#include "vtkm/filter/ExtractStructured.h" + +vtkStandardNewMacro(vtkmExtractVOI); + +//------------------------------------------------------------------------------ +void vtkmExtractVOI::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} + +//------------------------------------------------------------------------------ +vtkmExtractVOI::vtkmExtractVOI() = default; +vtkmExtractVOI::~vtkmExtractVOI() = default; + +//------------------------------------------------------------------------------ +int vtkmExtractVOI::RequestData( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + + vtkImageData* input = vtkImageData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + vtkImageData* output = vtkImageData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + try + { + // convert the input dataset to a vtkm::cont::DataSet + auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + + // transform VOI + int inExtents[6], voi[6]; + input->GetExtent(inExtents); + for (int i = 0; i < 6; i += 2) + { + voi[i] = this->VOI[i] - inExtents[i]; + voi[i + 1] = this->VOI[i + 1] - inExtents[i] + 1; + } + + // apply the filter + vtkm::filter::ExtractStructured filter; + filter.SetVOI(voi[0], voi[1], voi[2], voi[3], voi[4], voi[5]); + filter.SetSampleRate(this->SampleRate[0], this->SampleRate[1], this->SampleRate[2]); + filter.SetIncludeBoundary((this->IncludeBoundary != 0)); + auto result = filter.Execute(in); + + // convert back to vtkImageData + int outExtents[6]; + this->Internal->GetOutputWholeExtent(outExtents); + if (!fromvtkm::Convert(result, outExtents, output, input)) + { + vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + if (this->ForceVTKm) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + else + { + vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() << "Falling back to vtkExtractVOI"); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + } + + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmExtractVOI.h b/Accelerators/Vtkm/Filters/vtkmExtractVOI.h new file mode 100644 index 000000000..04457fa88 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmExtractVOI.h @@ -0,0 +1,73 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkExtractVOI.h + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +/** + * @class vtkmExtractVOI + * @brief select piece (e.g., volume of interest) and/or subsample structured points dataset + * + * vtkmExtractVOI is a filter that selects a portion of an input structured + * points dataset, or subsamples an input dataset. (The selected portion of + * interested is referred to as the Volume Of Interest, or VOI.) The output of + * this filter is a structured points dataset. The filter treats input data + * of any topological dimension (i.e., point, line, image, or volume) and can + * generate output data of any topological dimension. + * + * To use this filter set the VOI ivar which are i-j-k min/max indices that + * specify a rectangular region in the data. (Note that these are 0-offset.) + * You can also specify a sampling rate to subsample the data. + * + * Typical applications of this filter are to extract a slice from a volume + * for image processing, subsampling large volumes to reduce data size, or + * extracting regions of a volume with interesting data. + * + */ +#ifndef vtkmExtractVOI_h +#define vtkmExtractVOI_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // for export macro +#include "vtkExtractVOI.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmExtractVOI : public vtkExtractVOI +{ +public: + vtkTypeMacro(vtkmExtractVOI, vtkExtractVOI); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmExtractVOI* New(); + + ///@{ + /** + * When this flag is off (the default), then the computation will fall back + * to the serial VTK version if VTK-m fails to run. When the flag is on, + * the filter will generate an error if VTK-m fails to run. This is mostly + * useful in testing to make sure the expected algorithm is run. + */ + vtkGetMacro(ForceVTKm, vtkTypeBool); + vtkSetMacro(ForceVTKm, vtkTypeBool); + vtkBooleanMacro(ForceVTKm, vtkTypeBool); + ///@} + +protected: + vtkmExtractVOI(); + ~vtkmExtractVOI() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + vtkTypeBool ForceVTKm = false; + +private: + vtkmExtractVOI(const vtkmExtractVOI&) = delete; + void operator=(const vtkmExtractVOI&) = delete; +}; + +#endif // vtkmExtractVOI_h diff --git a/Accelerators/Vtkm/Filters/vtkmGradient.cxx b/Accelerators/Vtkm/Filters/vtkmGradient.cxx new file mode 100644 index 000000000..6aa284878 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmGradient.cxx @@ -0,0 +1,245 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmGradient.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkNew.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" +#include "vtkmlib/PolyDataConverter.h" + +#include "vtkmFilterPolicy.h" + +#include +#include + +vtkStandardNewMacro(vtkmGradient); + +namespace +{ + +inline vtkm::cont::DataSet CopyDataSetStructure(const vtkm::cont::DataSet& ds) +{ + vtkm::cont::DataSet cp; + cp.CopyStructure(ds); + return cp; +} + +} // anonymous namespace + +//------------------------------------------------------------------------------ +vtkmGradient::vtkmGradient() = default; + +//------------------------------------------------------------------------------ +vtkmGradient::~vtkmGradient() = default; + +//------------------------------------------------------------------------------ +void vtkmGradient::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} + +//------------------------------------------------------------------------------ +int vtkmGradient::RequestData( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + output->ShallowCopy(input); + + // grab the input array to process to determine the field want to compute + // the gradient for + int association = this->GetInputArrayAssociation(0, inputVector); + vtkDataArray* inputArray = this->GetInputArrayToProcess(0, inputVector); + if (inputArray == nullptr || inputArray->GetName() == nullptr || inputArray->GetName()[0] == '\0') + { + vtkErrorMacro("Invalid input array."); + return 0; + } + + try + { + // convert the input dataset to a vtkm::cont::DataSet. We explicitly drop + // all arrays from the conversion as this algorithm doesn't change topology + // and therefore doesn't need input fields converted through the VTK-m filter + auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::None); + vtkm::cont::Field field = tovtkm::Convert(inputArray, association); + in.AddField(field); + + const bool fieldIsPoint = field.GetAssociation() == vtkm::cont::Field::Association::POINTS; + const bool fieldIsCell = field.GetAssociation() == vtkm::cont::Field::Association::CELL_SET; + const bool fieldIsVec = (inputArray->GetNumberOfComponents() == 3); + const bool fieldIsScalar = + inputArray->GetDataType() == VTK_FLOAT || inputArray->GetDataType() == VTK_DOUBLE; + const bool fieldValid = + (fieldIsPoint || fieldIsCell) && fieldIsScalar && !field.GetName().empty(); + + if (!fieldValid) + { + vtkWarningMacro(<< "Unsupported field type\n" + << "Falling back to vtkGradientFilter."); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + + auto passNoFields = vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE); + vtkm::filter::Gradient filter; + filter.SetFieldsToPass(passNoFields); + filter.SetColumnMajorOrdering(); + + if (fieldIsVec) + { // this properties are only valid when processing a vec<3> field + filter.SetComputeDivergence(this->ComputeDivergence != 0); + filter.SetComputeVorticity(this->ComputeVorticity != 0); + filter.SetComputeQCriterion(this->ComputeQCriterion != 0); + } + + if (this->ResultArrayName) + { + filter.SetOutputFieldName(this->ResultArrayName); + } + + if (this->DivergenceArrayName) + { + filter.SetDivergenceName(this->DivergenceArrayName); + } + + if (this->VorticityArrayName) + { + filter.SetVorticityName(this->VorticityArrayName); + } + + if (this->QCriterionArrayName) + { + filter.SetQCriterionName(this->QCriterionArrayName); + } + else + { + filter.SetQCriterionName("Q-criterion"); + } + + // Run the VTK-m Gradient Filter + // ----------------------------- + vtkm::cont::DataSet result; + if (fieldIsPoint) + { + filter.SetComputePointGradient(!this->FasterApproximation); + filter.SetActiveField(field.GetName(), vtkm::cont::Field::Association::POINTS); + result = filter.Execute(in); + + // When we have faster approximation enabled the VTK-m gradient will output + // a cell field not a point field. So at that point we will need to convert + // back to a point field + if (this->FasterApproximation) + { + vtkm::filter::PointAverage cellToPoint; + cellToPoint.SetFieldsToPass(passNoFields); + + auto c2pIn = result; + result = CopyDataSetStructure(result); + + if (this->ComputeGradient) + { + cellToPoint.SetActiveField( + filter.GetOutputFieldName(), vtkm::cont::Field::Association::CELL_SET); + auto ds = cellToPoint.Execute(c2pIn); + result.AddField(ds.GetField(0)); + } + if (this->ComputeDivergence && fieldIsVec) + { + cellToPoint.SetActiveField( + filter.GetDivergenceName(), vtkm::cont::Field::Association::CELL_SET); + auto ds = cellToPoint.Execute(c2pIn); + result.AddField(ds.GetField(0)); + } + if (this->ComputeVorticity && fieldIsVec) + { + cellToPoint.SetActiveField( + filter.GetVorticityName(), vtkm::cont::Field::Association::CELL_SET); + auto ds = cellToPoint.Execute(c2pIn); + result.AddField(ds.GetField(0)); + } + if (this->ComputeQCriterion && fieldIsVec) + { + cellToPoint.SetActiveField( + filter.GetQCriterionName(), vtkm::cont::Field::Association::CELL_SET); + auto ds = cellToPoint.Execute(c2pIn); + result.AddField(ds.GetField(0)); + } + } + } + else + { + // we need to convert the field to be a point field + vtkm::filter::PointAverage cellToPoint; + cellToPoint.SetFieldsToPass(passNoFields); + cellToPoint.SetActiveField(field.GetName(), field.GetAssociation()); + cellToPoint.SetOutputFieldName(field.GetName()); + in = cellToPoint.Execute(in); + + filter.SetComputePointGradient(false); + filter.SetActiveField(field.GetName(), vtkm::cont::Field::Association::POINTS); + result = filter.Execute(in); + } + + // Remove gradient field from result if it was not requested. + auto requestedResult = result; + if (!this->ComputeGradient) + { + requestedResult = CopyDataSetStructure(result); + vtkm::Id numOfFields = static_cast(result.GetNumberOfFields()); + for (vtkm::Id i = 0; i < numOfFields; ++i) + { + if (result.GetField(i).GetName() != filter.GetOutputFieldName()) + { + requestedResult.AddField(result.GetField(i)); + } + } + } + + // convert arrays back to VTK + if (!fromvtkm::ConvertArrays(result, output)) + { + vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + if (this->ForceVTKm) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + else + { + vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() + << "Falling back to serial implementation."); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + } + + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmGradient.h b/Accelerators/Vtkm/Filters/vtkmGradient.h new file mode 100644 index 000000000..2c7080fc9 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmGradient.h @@ -0,0 +1,71 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmGradient + * @brief A general filter for gradient estimation. + * + * Estimates the gradient of a field in a data set. The gradient calculation + * is dependent on the input dataset type. The created gradient array + * is of the same type as the array it is calculated from (e.g. point data + * or cell data) as well as data type (e.g. float, double). The output array has + * 3*number of components of the input data array. The ordering for the + * output tuple will be {du/dx, du/dy, du/dz, dv/dx, dv/dy, dv/dz, dw/dx, + * dw/dy, dw/dz} for an input array {u, v, w}. + * + * Also options to additionally compute the divergence, vorticity and + * Q criterion of input vector fields. + * + */ + +#ifndef vtkmGradient_h +#define vtkmGradient_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkGradientFilter.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmGradient : public vtkGradientFilter +{ +public: + vtkTypeMacro(vtkmGradient, vtkGradientFilter); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmGradient* New(); + + ///@{ + /** + * When this flag is off (the default), then the computation will fall back + * to the serial VTK version if VTK-m fails to run. When the flag is on, + * the filter will generate an error if VTK-m fails to run. This is mostly + * useful in testing to make sure the expected algorithm is run. + */ + vtkGetMacro(ForceVTKm, vtkTypeBool); + vtkSetMacro(ForceVTKm, vtkTypeBool); + vtkBooleanMacro(ForceVTKm, vtkTypeBool); + ///@} + +protected: + vtkmGradient(); + ~vtkmGradient() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + vtkTypeBool ForceVTKm = false; + +private: + vtkmGradient(const vtkmGradient&) = delete; + void operator=(const vtkmGradient&) = delete; +}; + +#endif // vtkmGradient_h diff --git a/Accelerators/Vtkm/Filters/vtkmHistogram.cxx b/Accelerators/Vtkm/Filters/vtkmHistogram.cxx new file mode 100644 index 000000000..c13fd7424 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmHistogram.cxx @@ -0,0 +1,166 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkElevationFilter.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "vtkmHistogram.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkDoubleArray.h" +#include "vtkFieldData.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkPointData.h" +#include "vtkTable.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkSmartPointer.h" + +#include "vtkmFilterPolicy.h" +#include + +vtkStandardNewMacro(vtkmHistogram); + +//------------------------------------------------------------------------------ +vtkmHistogram::vtkmHistogram() +{ + this->CustomBinRange[0] = 0; + this->CustomBinRange[0] = 100; + this->UseCustomBinRanges = false; + this->CenterBinsAroundMinAndMax = false; + this->NumberOfBins = 10; +} + +//------------------------------------------------------------------------------ +vtkmHistogram::~vtkmHistogram() = default; + +//------------------------------------------------------------------------------ +int vtkmHistogram::FillInputPortInformation(int port, vtkInformation* info) +{ + this->Superclass::FillInputPortInformation(port, info); + + info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataObject"); + return 1; +} + +//------------------------------------------------------------------------------ +int vtkmHistogram::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkTable* output = vtkTable::GetData(outputVector, 0); + output->Initialize(); + + // These are the mid-points for each of the bins + vtkSmartPointer binExtents = vtkSmartPointer::New(); + binExtents->SetNumberOfComponents(1); + binExtents->SetNumberOfTuples(static_cast(this->NumberOfBins)); + binExtents->SetName("bin_extents"); + binExtents->FillComponent(0, 0.0); + + // Grab the input array to process to determine the field we want to apply histogram + int association = this->GetInputArrayAssociation(0, inputVector); + auto fieldArray = this->GetInputArrayToProcess(0, inputVector); + if ((association != vtkDataObject::FIELD_ASSOCIATION_POINTS && + association != vtkDataObject::FIELD_ASSOCIATION_CELLS) || + fieldArray == nullptr || fieldArray->GetName() == nullptr || fieldArray->GetName()[0] == '\0') + { + vtkErrorMacro(<< "Invalid field: Requires a point or cell field with a valid name."); + return 0; + } + + const char* fieldName = fieldArray->GetName(); + + try + { + vtkm::cont::DataSet in = tovtkm::Convert(input); + auto field = tovtkm::Convert(fieldArray, association); + in.AddField(field); + + vtkm::filter::Histogram filter; + + filter.SetNumberOfBins(static_cast(this->NumberOfBins)); + filter.SetActiveField(fieldName, field.GetAssociation()); + if (this->UseCustomBinRanges) + { + if (this->CustomBinRange[0] > this->CustomBinRange[1]) + { + vtkWarningMacro("Custom bin range adjusted to keep min <= max value"); + double min = this->CustomBinRange[1]; + double max = this->CustomBinRange[0]; + this->CustomBinRange[0] = min; + this->CustomBinRange[1] = max; + } + filter.SetRange(vtkm::Range(this->CustomBinRange[0], this->CustomBinRange[1])); + } + auto result = filter.Execute(in); + this->BinDelta = filter.GetBinDelta(); + this->ComputedRange[0] = filter.GetComputedRange().Min; + this->ComputedRange[1] = filter.GetComputedRange().Max; + + // Convert the result back + vtkDataArray* resultingArray = fromvtkm::Convert(result.GetField("histogram")); + resultingArray->SetName("bin_values"); + if (resultingArray == nullptr) + { + vtkErrorMacro(<< "Unable to convert result array from VTK-m to VTK"); + return 0; + } + this->FillBinExtents(binExtents); + output->GetRowData()->AddArray(binExtents); + output->GetRowData()->AddArray(resultingArray); + + resultingArray->FastDelete(); + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmHistogram::PrintSelf(std::ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); + + os << indent << "NumberOfBins: " << NumberOfBins << "\n"; + os << indent << "UseCustomBinRanges: " << UseCustomBinRanges << "\n"; + os << indent << "CenterBinsAroundMinAndMax: " << CenterBinsAroundMinAndMax << "\n"; + os << indent << "CustomBinRange: " << CustomBinRange[0] << ", " << CustomBinRange[1] << "\n"; +} + +//------------------------------------------------------------------------------ +void vtkmHistogram::FillBinExtents(vtkDoubleArray* binExtents) +{ + binExtents->SetNumberOfComponents(1); + binExtents->SetNumberOfTuples(static_cast(this->NumberOfBins)); + double binDelta = this->CenterBinsAroundMinAndMax + ? ((this->ComputedRange[1] - this->ComputedRange[0]) / (this->NumberOfBins - 1)) + : this->BinDelta; + double halfBinDelta = binDelta / 2.0; + for (vtkIdType i = 0; i < static_cast(this->NumberOfBins); i++) + { + binExtents->SetValue(i, + this->ComputedRange[0] + (i * binDelta) + + (this->CenterBinsAroundMinAndMax ? 0.0 : halfBinDelta)); + } +} diff --git a/Accelerators/Vtkm/Filters/vtkmHistogram.h b/Accelerators/Vtkm/Filters/vtkmHistogram.h new file mode 100644 index 000000000..ede2467cf --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmHistogram.h @@ -0,0 +1,114 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmHistogram + * @brief generate a histogram out of a scalar data + * + * vtkmHistogram is a filter that generates a histogram out of a scalar data. + * The histogram consists of a certain number of bins specified by the user, and + * the user can fetch the range and bin delta after completion. + * + */ + +#ifndef vtkmHistogram_h +#define vtkmHistogram_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct export +#include "vtkTableAlgorithm.h" + +class vtkDoubleArray; + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmHistogram : public vtkTableAlgorithm +{ +public: + vtkTypeMacro(vtkmHistogram, vtkTableAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmHistogram* New(); + + ///@{ + /** + * Specify number of bins. Default is 10. + */ + vtkSetMacro(NumberOfBins, size_t); + vtkGetMacro(NumberOfBins, size_t); + ///@} + + ///@{ + /** + * Specify the range to use to generate the histogram. They are only used when + * UseCustomBinRanges is set to true. + */ + vtkSetVector2Macro(CustomBinRange, double); + vtkGetVector2Macro(CustomBinRange, double); + ///@} + + ///@{ + /** + * When set to true, CustomBinRanges will be used instead of using the full + * range for the selected array. By default, set to false. + */ + vtkSetMacro(UseCustomBinRanges, bool); + vtkGetMacro(UseCustomBinRanges, bool); + vtkBooleanMacro(UseCustomBinRanges, bool); + ///@} + + ///@{ + /** + * Get/Set if first and last bins must be centered around the min and max + * data. This is only used when UseCustomBinRanges is set to false. + * Default is false. + */ + vtkSetMacro(CenterBinsAroundMinAndMax, bool); + vtkGetMacro(CenterBinsAroundMinAndMax, bool); + vtkBooleanMacro(CenterBinsAroundMinAndMax, bool); + ///@} + + ///@{ + /** + * Return the range used to generate the histogram. + */ + vtkGetVectorMacro(ComputedRange, double, 2); + ///@} + + ///@{ + /** + * Return the bin delta of the computed field. + */ + vtkGetMacro(BinDelta, double); + ///@} + +protected: + vtkmHistogram(); + ~vtkmHistogram() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + int FillInputPortInformation(int port, vtkInformation* info) override; + +private: + vtkmHistogram(const vtkmHistogram&) = delete; + void operator=(const vtkmHistogram&) = delete; + + void FillBinExtents(vtkDoubleArray* binExtents); + + size_t NumberOfBins; + double BinDelta; + double CustomBinRange[2]; + bool UseCustomBinRanges; + bool CenterBinsAroundMinAndMax; + double ComputedRange[2]; +}; + +#endif // vtkmHistogram_h diff --git a/Accelerators/Vtkm/Filters/vtkmImageConnectivity.cxx b/Accelerators/Vtkm/Filters/vtkmImageConnectivity.cxx new file mode 100644 index 000000000..29254a49b --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmImageConnectivity.cxx @@ -0,0 +1,101 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmImageConnectivity.h" + +#include "vtkImageData.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkNew.h" +#include "vtkObjectFactory.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" +#include "vtkmlib/PolyDataConverter.h" + +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmImageConnectivity); + +//------------------------------------------------------------------------------ +vtkmImageConnectivity::vtkmImageConnectivity() = default; + +//------------------------------------------------------------------------------ +vtkmImageConnectivity::~vtkmImageConnectivity() = default; + +//------------------------------------------------------------------------------ +void vtkmImageConnectivity::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} + +//------------------------------------------------------------------------------ +int vtkmImageConnectivity::RequestData( + vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + + vtkImageData* output = static_cast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + vtkImageData* input = static_cast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + // Find the scalar array: + int association = this->GetInputArrayAssociation(0, inputVector); + vtkDataArray* inputArray = this->GetInputArrayToProcess(0, inputVector); + if (association != vtkDataObject::FIELD_ASSOCIATION_POINTS || inputArray == nullptr || + inputArray->GetName() == nullptr || inputArray->GetName()[0] == '\0') + { + vtkErrorMacro("Invalid scalar array; array missing or not a point array."); + return 0; + } + + try + { + vtkm::filter::ImageConnectivity filter; + filter.SetActiveField(inputArray->GetName(), vtkm::cont::Field::Association::POINTS); + // the field should be named 'RegionId' + filter.SetOutputFieldName("RegionId"); + + // explicitly convert just the field we need + auto inData = tovtkm::Convert(input, tovtkm::FieldsFlag::None); + auto inField = tovtkm::Convert(inputArray, association); + inData.AddField(inField); + + // don't pass this field + filter.SetFieldsToPass(vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE)); + + vtkm::cont::DataSet result; + result = filter.Execute(inData); + + // Make sure the output has all the fields / etc that the input has + output->ShallowCopy(input); + + // convert back the regionId field to VTK + if (!fromvtkm::ConvertArrays(result, output)) + { + vtkWarningMacro(<< "Unable to convert VTKm DataSet back to VTK.\n" + << "Falling back to serial implementation."); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmImageConnectivity.h b/Accelerators/Vtkm/Filters/vtkmImageConnectivity.h new file mode 100644 index 000000000..58227e05e --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmImageConnectivity.h @@ -0,0 +1,61 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmImageConnectivity + * @brief Label regions inside an image by connectivity + * + * vtkmImageConnectivity will identify connected regions within an + * image and label them. + * The filter finds groups of points that have the same field value and are + * connected together through their topology. Any point is considered to be + * connected to its Moore neighborhood: + * - 8 neighboring points for 2D + * - 27 neighboring points for 3D + * + * The active field passed to the filter must be associated with the points. + * The result of the filter is a point field of type vtkIdType. + * Each entry in the point field will be a number that identifies to which + * region it belongs. By default, this output point field is named “component”. + * + * @sa + * vtkConnectivityFilter, vtkImageConnectivityFilter + */ + +#ifndef vtkmImageConnectivity_h +#define vtkmImageConnectivity_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkImageAlgorithm.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmImageConnectivity : public vtkImageAlgorithm +{ +public: + vtkTypeMacro(vtkmImageConnectivity, vtkImageAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmImageConnectivity* New(); + +protected: + vtkmImageConnectivity(); + ~vtkmImageConnectivity() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + +private: + vtkmImageConnectivity(const vtkmImageConnectivity&) = delete; + void operator=(const vtkmImageConnectivity&) = delete; +}; + +#endif // vtkmImageConnectivity_h diff --git a/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.cxx b/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.cxx new file mode 100644 index 000000000..db8d3f64b --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.cxx @@ -0,0 +1,167 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmLevelOfDetail.h" +#include "vtkmConfigFilters.h" + +#include "vtkDataSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkNew.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" +#include "vtkmlib/PolyDataConverter.h" + +#include "vtkmFilterPolicy.h" + +#include +// To handle computing custom coordinate sets bounds we need to include +// the following + +vtkStandardNewMacro(vtkmLevelOfDetail); + +//------------------------------------------------------------------------------ +vtkmLevelOfDetail::vtkmLevelOfDetail() +{ + this->NumberOfDivisions[0] = 512; + this->NumberOfDivisions[1] = 512; + this->NumberOfDivisions[2] = 512; +} + +//------------------------------------------------------------------------------ +vtkmLevelOfDetail::~vtkmLevelOfDetail() = default; + +//------------------------------------------------------------------------------ +void vtkmLevelOfDetail::SetNumberOfXDivisions(int num) +{ + this->Modified(); + this->NumberOfDivisions[0] = num; +} + +//------------------------------------------------------------------------------ +void vtkmLevelOfDetail::SetNumberOfYDivisions(int num) +{ + this->Modified(); + this->NumberOfDivisions[1] = num; +} + +//------------------------------------------------------------------------------ +void vtkmLevelOfDetail::SetNumberOfZDivisions(int num) +{ + this->Modified(); + this->NumberOfDivisions[2] = num; +} + +//------------------------------------------------------------------------------ +int vtkmLevelOfDetail::GetNumberOfXDivisions() +{ + return this->NumberOfDivisions[0]; +} + +//------------------------------------------------------------------------------ +int vtkmLevelOfDetail::GetNumberOfYDivisions() +{ + return this->NumberOfDivisions[1]; +} + +//------------------------------------------------------------------------------ +int vtkmLevelOfDetail::GetNumberOfZDivisions() +{ + return this->NumberOfDivisions[2]; +} + +//------------------------------------------------------------------------------ +void vtkmLevelOfDetail::SetNumberOfDivisions(int div0, int div1, int div2) +{ + this->Modified(); + this->NumberOfDivisions[0] = div0; + this->NumberOfDivisions[1] = div1; + this->NumberOfDivisions[2] = div2; +} + +//------------------------------------------------------------------------------ +const int* vtkmLevelOfDetail::GetNumberOfDivisions() +{ + return this->NumberOfDivisions; +} + +//------------------------------------------------------------------------------ +void vtkmLevelOfDetail::GetNumberOfDivisions(int div[3]) +{ + div[0] = this->NumberOfDivisions[0]; + div[1] = this->NumberOfDivisions[1]; + div[2] = this->NumberOfDivisions[1]; +} + +//------------------------------------------------------------------------------ +int vtkmLevelOfDetail::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + if (!input || input->GetNumberOfPoints() == 0) + { + // empty output for empty inputs + return 1; + } + + try + { + // convert the input dataset to a vtkm::cont::DataSet + auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + if (in.GetNumberOfCells() == 0 || in.GetNumberOfPoints() == 0) + { + return 0; + } + + vtkm::filter::VertexClustering filter; + filter.SetNumberOfDivisions(vtkm::make_Vec( + this->NumberOfDivisions[0], this->NumberOfDivisions[1], this->NumberOfDivisions[2])); + + auto result = filter.Execute(in); + + // convert back the dataset to VTK + if (!fromvtkm::Convert(result, output, input)) + { + vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmLevelOfDetail::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); + + os << indent << "Number of X Divisions: " << this->NumberOfDivisions[0] << "\n"; + os << indent << "Number of Y Divisions: " << this->NumberOfDivisions[1] << "\n"; + os << indent << "Number of Z Divisions: " << this->NumberOfDivisions[2] << "\n"; +} diff --git a/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.h b/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.h new file mode 100644 index 000000000..a18cd7926 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmLevelOfDetail.h @@ -0,0 +1,95 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmLevelOfDetail + * @brief reduce the number of triangles in a mesh + * + * vtkmLevelOfDetail is a filter to reduce the number of triangles in a + * triangle mesh, forming a good approximation to the original geometry. The + * input to vtkmLevelOfDetail is a vtkPolyData or vtkUnstrcutredGrid object, + * and only triangles are treated. If you desire to decimate polygonal meshes, + * first triangulate the polygons with vtkTriangleFilter object. + * + * The general approach of the algorithm is to cluster vertices in a uniform + * binning of space, accumulating to an average point within each bin. In + * more detail, the algorithm first gets the bounds of the input poly data. + * It then breaks this bounding volume into a user-specified number of + * spatial bins. It then reads each triangle from the input and hashes its + * vertices into these bins. Then, if 2 or more vertices of + * the triangle fall in the same bin, the triangle is dicarded. If the + * triangle is not discarded, it adds the triangle to the list of output + * triangles as a list of vertex identifiers. (There is one vertex id per + * bin.) After all the triangles have been read, the representative vertex + * for each bin is computed. This determines the spatial location of the + * vertices of each of the triangles in the output. + * + * To use this filter, specify the divisions defining the spatial subdivision + * in the x, y, and z directions. Compared to algorithms such as + * vtkQuadricClustering, a significantly higher bin count is recommended as it + * doesn't increase the computation or memory of the algorithm and will produce + * significantly better results. + * + */ + +#ifndef vtkmLevelOfDetail_h +#define vtkmLevelOfDetail_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkPolyDataAlgorithm.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmLevelOfDetail : public vtkPolyDataAlgorithm +{ +public: + vtkTypeMacro(vtkmLevelOfDetail, vtkPolyDataAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmLevelOfDetail* New(); + + // Description: + // Set/Get the number of divisions along an individual axis for the spatial + // bins. + // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* + // NumberOfZDivisions. + void SetNumberOfXDivisions(int num); + void SetNumberOfYDivisions(int num); + void SetNumberOfZDivisions(int num); + int GetNumberOfXDivisions(); + int GetNumberOfYDivisions(); + int GetNumberOfZDivisions(); + + // Description: + // Set/Get the number of divisions for each axis for the spatial bins. + // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* + // NumberOfZDivisions. + void SetNumberOfDivisions(int div[3]) { this->SetNumberOfDivisions(div[0], div[1], div[2]); } + void SetNumberOfDivisions(int div0, int div1, int div2); + + const int* GetNumberOfDivisions(); + void GetNumberOfDivisions(int div[3]); + +protected: + vtkmLevelOfDetail(); + ~vtkmLevelOfDetail() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + +private: + int NumberOfDivisions[3]; + + vtkmLevelOfDetail(const vtkmLevelOfDetail&) = delete; + void operator=(const vtkmLevelOfDetail&) = delete; +}; + +#endif // vtkmLevelOfDetail_h diff --git a/Accelerators/Vtkm/Filters/vtkmNDHistogram.cxx b/Accelerators/Vtkm/Filters/vtkmNDHistogram.cxx new file mode 100644 index 000000000..52384771b --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmNDHistogram.cxx @@ -0,0 +1,201 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmNDHistogram.h" +#include "vtkmConfigFilters.h" + +#include "vtkArrayData.h" +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkSparseArray.h" +#include "vtkTable.h" +#include "vtkmFilterPolicy.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include + +vtkStandardNewMacro(vtkmNDHistogram); + +//------------------------------------------------------------------------------ +void vtkmNDHistogram::PrintSelf(std::ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); + os << indent << "FieldNames: " + << "\n"; + for (const auto& fieldName : FieldNames) + { + os << indent << fieldName << " "; + } + os << indent << "\n"; + os << indent << "NumberOfBins: " + << "\n"; + for (const auto& nob : NumberOfBins) + { + os << indent << nob << " "; + } + os << indent << "\n"; + os << indent << "BinDeltas: " + << "\n"; + for (const auto& bd : BinDeltas) + { + os << indent << bd << " "; + } + os << indent << "\n"; + os << indent << "DataRanges: " + << "\n"; + for (const auto& dr : DataRanges) + { + os << indent << dr.first << " " << dr.second << " "; + } + os << indent << "\n"; +} + +//------------------------------------------------------------------------------ +vtkmNDHistogram::vtkmNDHistogram() = default; + +//------------------------------------------------------------------------------ +vtkmNDHistogram::~vtkmNDHistogram() = default; + +//------------------------------------------------------------------------------ +void vtkmNDHistogram::AddFieldAndBin(const std::string& fieldName, const vtkIdType& numberOfBins) +{ + this->FieldNames.push_back(fieldName); + this->NumberOfBins.push_back(numberOfBins); + this->SetInputArrayToProcess(static_cast(this->FieldNames.size()), 0, 0, + vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName.c_str()); +} + +//------------------------------------------------------------------------------ +double vtkmNDHistogram::GetBinDelta(size_t fieldIndex) +{ + return this->BinDeltas[fieldIndex]; +} + +//------------------------------------------------------------------------------ +std::pair vtkmNDHistogram::GetDataRange(size_t fieldIndex) +{ + return this->DataRanges[fieldIndex]; +} + +//------------------------------------------------------------------------------ +int vtkmNDHistogram::FillInputPortInformation(int port, vtkInformation* info) +{ + this->Superclass::FillInputPortInformation(port, info); + + info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataObject"); + return 1; +} + +//------------------------------------------------------------------------------ +int vtkmNDHistogram::GetFieldIndexFromFieldName(const std::string& fieldName) +{ + auto iter = std::find(this->FieldNames.begin(), this->FieldNames.end(), fieldName); + return (iter == std::end(this->FieldNames)) ? -1 + : static_cast(iter - this->FieldNames.begin()); +} + +//------------------------------------------------------------------------------ +int vtkmNDHistogram::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkArrayData* output = vtkArrayData::GetData(outputVector, 0); + output->ClearArrays(); + + try + { + vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + + vtkm::filter::NDHistogram filter; + for (size_t i = 0; i < this->FieldNames.size(); i++) + { + filter.AddFieldAndBin(this->FieldNames[i], this->NumberOfBins[i]); + } + vtkm::cont::DataSet out = filter.Execute(in); + + vtkm::Id numberOfFields = out.GetNumberOfFields(); + this->BinDeltas.clear(); + this->DataRanges.clear(); + this->BinDeltas.reserve(static_cast(numberOfFields)); + this->DataRanges.reserve(static_cast(numberOfFields)); + + // Fetch the field array out of the vtkm filter result + size_t index = 0; + std::vector fArrays; + for (auto& fn : this->FieldNames) + { + vtkDataArray* fnArray = fromvtkm::Convert(out.GetField(fn)); + fnArray->SetName(fn.c_str()); + fArrays.push_back(fnArray); + this->BinDeltas.push_back(filter.GetBinDelta(index)); + this->DataRanges.emplace_back(filter.GetDataRange(index).Min, filter.GetDataRange(index).Max); + index++; + } + vtkDataArray* frequencyArray = fromvtkm::Convert(out.GetField("Frequency")); + frequencyArray->SetName("Frequency"); + + // Create the sparse array + vtkSparseArray* sparseArray = vtkSparseArray::New(); + vtkArrayExtents sae; // sparse array extent + size_t ndims(fArrays.size()); + sae.SetDimensions(static_cast(ndims)); + for (size_t i = 0; i < ndims; i++) + { + sae[static_cast(i)] = + vtkArrayRange(0, fArrays[i]->GetNumberOfValues()); + } + sparseArray->Resize(sae); + + // Set the dimension label + for (size_t i = 0; i < ndims; i++) + { + sparseArray->SetDimensionLabel(static_cast(i), fArrays[i]->GetName()); + } + // Fill in the sparse array + for (vtkIdType i = 0; i < frequencyArray->GetNumberOfValues(); i++) + { + vtkArrayCoordinates coords; + coords.SetDimensions(static_cast(ndims)); + for (size_t j = 0; j < ndims; j++) + { + coords[static_cast(j)] = fArrays[j]->GetComponent(i, 0); + } + sparseArray->SetValue(coords, frequencyArray->GetComponent(i, 0)); + } + output->AddArray(sparseArray); + + // Clean up the memory + for (auto& fArray : fArrays) + { + fArray->FastDelete(); + } + frequencyArray->FastDelete(); + sparseArray->FastDelete(); + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmNDHistogram.h b/Accelerators/Vtkm/Filters/vtkmNDHistogram.h new file mode 100644 index 000000000..56e48ee96 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmNDHistogram.h @@ -0,0 +1,80 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmNDHistogram + * @brief generate a n dimensional histogram field from input fields + * + * vtkmNDhistogram is a filter that generate a n dimensional histogram field from + * some input fields. + * This filter takes a data set and with target fields and bins defined, + * it would generate a N-Dims histogram from input fields. The input fields should + * have the same number of values. + * The result is stored in a field named as "Frequency". This field contains all + * the frequencies of the N-Dims histogram in sparse representation. + * That being said, the result field does not store 0 frequency bins. Meanwhile + * all input fields now would have the same length and store bin ids instead. + * E.g. (FieldA[i], FieldB[i], FieldC[i], Frequency[i]) is a bin in the histogram. + * The first three numbers are binIDs for FieldA, FieldB and FieldC. Frequency[i] stores + * the frequency for this bin (FieldA[i], FieldB[i], FieldC[i]). + */ + +#ifndef vtkmNDHistogram_h +#define vtkmNDHistogram_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // required for correct export +#include "vtkArrayDataAlgorithm.h" +#include // for std::string +#include // for std::pair +#include // for std::vector + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmNDHistogram : public vtkArrayDataAlgorithm +{ +public: + vtkTypeMacro(vtkmNDHistogram, vtkArrayDataAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + + void AddFieldAndBin(const std::string& fieldName, const vtkIdType& numberOfBins); + + double GetBinDelta(size_t fieldIndex); + std::pair GetDataRange(size_t fieldIndex); + + /** + * @brief GetFieldIndexFromFieldName + * @param fieldName + * @return the index of the fieldName. If it's not in the FieldNames list, a -1 + * would be returned. + */ + int GetFieldIndexFromFieldName(const std::string& fieldName); + + static vtkmNDHistogram* New(); + +protected: + vtkmNDHistogram(); + ~vtkmNDHistogram() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + int FillInputPortInformation(int port, vtkInformation* info) override; + +private: + vtkmNDHistogram(const vtkmNDHistogram&) = delete; + void operator=(const vtkmNDHistogram&) = delete; + std::vector FieldNames; + std::vector NumberOfBins; + std::vector BinDeltas; + std::vector> DataRanges; +}; + +#endif // vtkmNDHistogram_h diff --git a/Accelerators/Vtkm/Filters/vtkmPointElevation.cxx b/Accelerators/Vtkm/Filters/vtkmPointElevation.cxx new file mode 100644 index 000000000..b52999331 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmPointElevation.cxx @@ -0,0 +1,107 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmPointElevation.h" +#include "vtkmConfigFilters.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkPointData.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmPointElevation); + +//------------------------------------------------------------------------------ +vtkmPointElevation::vtkmPointElevation() = default; + +//------------------------------------------------------------------------------ +vtkmPointElevation::~vtkmPointElevation() = default; + +//------------------------------------------------------------------------------ +int vtkmPointElevation::RequestData( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + // Get the input and output data objects. + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + output->ShallowCopy(input); + // Check the size of the input. + vtkIdType numPts = input->GetNumberOfPoints(); + if (numPts < 1) + { + vtkDebugMacro("No input!"); + return 1; + } + + try + { + // Convert the input dataset to a vtkm::cont::DataSet + auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::Points); + + // Setup input + vtkm::filter::PointElevation filter; + filter.SetLowPoint(this->LowPoint[0], this->LowPoint[1], this->LowPoint[2]); + filter.SetHighPoint(this->HighPoint[0], this->HighPoint[1], this->HighPoint[2]); + filter.SetRange(this->ScalarRange[0], this->ScalarRange[1]); + filter.SetOutputFieldName("elevation"); + filter.SetUseCoordinateSystemAsField(true); + auto result = filter.Execute(in); + + // Convert the result back + vtkDataArray* resultingArray = fromvtkm::Convert(result.GetField("elevation")); + if (resultingArray == nullptr) + { + vtkErrorMacro(<< "Unable to convert result array from VTK-m to VTK"); + return 0; + } + output->GetPointData()->AddArray(resultingArray); + output->GetPointData()->SetActiveScalars("elevation"); + resultingArray->FastDelete(); + } + catch (const vtkm::cont::Error& e) + { + if (this->ForceVTKm) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + else + { + vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() + << "Falling back to serial implementation"); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + } + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmPointElevation::PrintSelf(std::ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} diff --git a/Accelerators/Vtkm/Filters/vtkmPointElevation.h b/Accelerators/Vtkm/Filters/vtkmPointElevation.h new file mode 100644 index 000000000..38c948622 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmPointElevation.h @@ -0,0 +1,67 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmPointElevation + * @brief generate a scalar field along a specified direction + * + * vtkmPointElevation is a filter that generates a scalar field along a specified + * direction. The scalar field values lie within a user specified range, and are + * generated by computing a projection of each dataset point onto a line. The line + * can be oriented arbitrarily. A typical example is to generate scalars based + * on elevation or height above a plane. + * + */ + +#ifndef vtkmPointElevation_h +#define vtkmPointElevation_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // required for correct export +#include "vtkElevationFilter.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmPointElevation : public vtkElevationFilter +{ +public: + vtkTypeMacro(vtkmPointElevation, vtkElevationFilter); + void PrintSelf(ostream& os, vtkIndent indent) override; + + static vtkmPointElevation* New(); + + ///@{ + /** + * When this flag is off (the default), then the computation will fall back + * to the serial VTK version if VTK-m fails to run. When the flag is on, + * the filter will generate an error if VTK-m fails to run. This is mostly + * useful in testing to make sure the expected algorithm is run. + */ + vtkGetMacro(ForceVTKm, vtkTypeBool); + vtkSetMacro(ForceVTKm, vtkTypeBool); + vtkBooleanMacro(ForceVTKm, vtkTypeBool); + ///@} + +protected: + vtkmPointElevation(); + ~vtkmPointElevation() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + vtkTypeBool ForceVTKm = false; + +private: + vtkmPointElevation(const vtkmPointElevation&) = delete; + void operator=(const vtkmPointElevation&) = delete; +}; + +#endif // vtkmPointElevation_h diff --git a/Accelerators/Vtkm/Filters/vtkmPointTransform.cxx b/Accelerators/Vtkm/Filters/vtkmPointTransform.cxx new file mode 100644 index 000000000..685fb6187 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmPointTransform.cxx @@ -0,0 +1,170 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkTransformFilter.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "vtkmPointTransform.h" + +#include "vtkCellData.h" +#include "vtkHomogeneousTransform.h" +#include "vtkImageData.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkMatrix4x4.h" +#include "vtkNew.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkRectilinearGrid.h" +#include "vtkRectilinearGridToPointSet.h" +#include "vtkSmartPointer.h" +#include "vtkStructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkm/cont/Error.h" +#include "vtkm/filter/PointTransform.h" + +#include "vtkmFilterPolicy.h" + +vtkStandardNewMacro(vtkmPointTransform); +vtkCxxSetObjectMacro(vtkmPointTransform, Transform, vtkHomogeneousTransform); + +//------------------------------------------------------------------------------ +vtkmPointTransform::vtkmPointTransform() +{ + this->Transform = nullptr; +} + +//------------------------------------------------------------------------------ +vtkmPointTransform::~vtkmPointTransform() +{ + this->SetTransform(nullptr); +} + +//------------------------------------------------------------------------------ +int vtkmPointTransform::FillInputPortInformation(int vtkNotUsed(port), vtkInformation* info) +{ + info->Remove(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE()); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPointSet"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); + info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkRectilinearGrid"); + return 1; +} + +//------------------------------------------------------------------------------ +int vtkmPointTransform::RequestDataObject( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); + vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); + + if (inImage || inRect) + { + vtkStructuredGrid* output = vtkStructuredGrid::GetData(outputVector); + if (!output) + { + vtkNew newOutput; + outputVector->GetInformationObject(0)->Set(vtkDataObject::DATA_OBJECT(), newOutput); + } + return 1; + } + else + { + return this->Superclass::RequestDataObject(request, inputVector, outputVector); + } +} + +//------------------------------------------------------------------------------ +int vtkmPointTransform::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkSmartPointer input = vtkPointSet::GetData(inputVector[0]); + vtkSmartPointer output = vtkPointSet::GetData(outputVector); + + if (!input) + { + // Try converting rectilinear grid + vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); + if (inRect) + { + vtkNew rectToPoints; + rectToPoints->SetInputData(inRect); + rectToPoints->Update(); + input = rectToPoints->GetOutput(); + } + } + if (!input) + { + vtkErrorMacro(<< "Invalid or missing input"); + return 0; + } + + output->CopyStructure(input); + + vtkPoints* inPts = input->GetPoints(); + + if (!inPts || !this->Transform) + { + vtkDebugMacro(<< "Miss input points or transform matrix"); + return 0; + } + + try + { + vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + vtkMatrix4x4* matrix = this->Transform->GetMatrix(); + vtkm::Matrix vtkmMatrix; + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 4; j++) + { + vtkmMatrix[i][j] = static_cast(matrix->GetElement(i, j)); + } + } + + vtkm::filter::PointTransform pointTransform; + pointTransform.SetUseCoordinateSystemAsField(true); + pointTransform.SetTransform(vtkmMatrix); + + auto result = pointTransform.Execute(in); + vtkDataArray* pointTransformResult = + fromvtkm::Convert(result.GetField("transform", vtkm::cont::Field::Association::POINTS)); + vtkPoints* newPts = vtkPoints::New(); + // Update points + newPts->SetNumberOfPoints(pointTransformResult->GetNumberOfTuples()); + newPts->SetData(pointTransformResult); + output->SetPoints(newPts); + newPts->FastDelete(); + pointTransformResult->FastDelete(); + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + // Update ourselves and release memory + output->GetPointData()->CopyNormalsOff(); // distorted geometry + output->GetPointData()->PassData(input->GetPointData()); + output->GetCellData()->CopyNormalsOff(); // distorted geometry + output->GetCellData()->PassData(input->GetCellData()); + + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmPointTransform::PrintSelf(std::ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); + os << indent << "Transform: " << this->Transform << "\n"; +} diff --git a/Accelerators/Vtkm/Filters/vtkmPointTransform.h b/Accelerators/Vtkm/Filters/vtkmPointTransform.h new file mode 100644 index 000000000..7f41b13da --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmPointTransform.h @@ -0,0 +1,63 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkTransformFilter.h + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +/** + * @class vtkmPointTransform + * @brief transform points via vtkm PointTransform filter + * + * vtkmPointTransform is a filter to transform point coordinates. For now it + * does not support transforming associated point normals and vectors, as well + * as cell normals and vectors with the point coordinates. + */ + +#ifndef vtkmPointTransform_h +#define vtkmPointTransform_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // For export macro +#include "vtkPointSetAlgorithm.h" + +class vtkHomogeneousTransform; + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmPointTransform : public vtkPointSetAlgorithm +{ +public: + vtkTypeMacro(vtkmPointTransform, vtkPointSetAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + + static vtkmPointTransform* New(); + + ///@{ + /** + * Specify the transform object used to transform the points + */ + void SetTransform(vtkHomogeneousTransform* tf); + vtkGetObjectMacro(Transform, vtkHomogeneousTransform); + ///@} + + int FillInputPortInformation(int port, vtkInformation* info) override; + +protected: + vtkmPointTransform(); + ~vtkmPointTransform() override; + int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector, + vtkInformationVector* outputVector) override; + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + vtkHomogeneousTransform* Transform; + +private: + vtkmPointTransform(const vtkmPointTransform&) = delete; + void operator=(const vtkmPointTransform&) = delete; +}; + +#endif diff --git a/Accelerators/Vtkm/Filters/vtkmPolyDataNormals.cxx b/Accelerators/Vtkm/Filters/vtkmPolyDataNormals.cxx new file mode 100644 index 000000000..c5d7b870c --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmPolyDataNormals.cxx @@ -0,0 +1,132 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkmPolyDataNormals.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "vtkmPolyDataNormals.h" + +#include "vtkCellData.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" +#include "vtkSmartPointer.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/PolyDataConverter.h" + +#include "vtkmFilterPolicy.h" + +#include "vtkm/filter/SurfaceNormals.h" + +vtkStandardNewMacro(vtkmPolyDataNormals); + +//------------------------------------------------------------------------------ +void vtkmPolyDataNormals::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} + +//------------------------------------------------------------------------------ +vtkmPolyDataNormals::vtkmPolyDataNormals() +{ + // change defaults from parent + this->Splitting = 0; + this->Consistency = 0; + this->FlipNormals = 0; + this->ComputePointNormals = 1; + this->ComputeCellNormals = 0; + this->AutoOrientNormals = 0; +} + +//------------------------------------------------------------------------------ +vtkmPolyDataNormals::~vtkmPolyDataNormals() = default; + +//------------------------------------------------------------------------------ +int vtkmPolyDataNormals::RequestData( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + // get the info objects + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + + // get the input and output + vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + try + { + // convert the input dataset to a vtkm::cont::DataSet + auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::None); + + vtkm::cont::DataSet result; + + // check for flags that vtkm filter cannot handle + bool unsupported = this->Splitting != 0; + if (!unsupported) + { + vtkm::filter::SurfaceNormals filter; + filter.SetGenerateCellNormals((this->ComputeCellNormals != 0)); + filter.SetCellNormalsName("Normals"); + filter.SetGeneratePointNormals((this->ComputePointNormals != 0)); + filter.SetPointNormalsName("Normals"); + filter.SetAutoOrientNormals(this->AutoOrientNormals != 0); + filter.SetFlipNormals(this->FlipNormals != 0); + filter.SetConsistency(this->Consistency != 0); + result = filter.Execute(in); + } + else + { + vtkWarningMacro(<< "Unsupported options\n" + << "Falling back to vtkPolyDataNormals."); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + + if (!fromvtkm::Convert(result, output, input)) + { + vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + if (this->ForceVTKm) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + else + { + vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() << "Falling back to vtkPolyDataNormals"); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + } + + vtkSmartPointer pointNormals = output->GetPointData()->GetArray("Normals"); + vtkSmartPointer cellNormals = output->GetCellData()->GetArray("Normals"); + + output->GetPointData()->CopyNormalsOff(); + output->GetPointData()->PassData(input->GetPointData()); + output->GetCellData()->CopyNormalsOff(); + output->GetCellData()->PassData(input->GetPointData()); + + if (pointNormals) + { + output->GetPointData()->SetNormals(pointNormals); + } + if (cellNormals) + { + output->GetCellData()->SetNormals(cellNormals); + } + + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmPolyDataNormals.h b/Accelerators/Vtkm/Filters/vtkmPolyDataNormals.h new file mode 100644 index 000000000..94059a9c5 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmPolyDataNormals.h @@ -0,0 +1,80 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkmPolyDataNormals.h + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +/** + * @class vtkmPolyDataNormals + * @brief compute normals for polygonal mesh + * + * vtkmPolyDataNormals is a filter that computes point and/or cell normals + * for a polygonal mesh. The user specifies if they would like the point + * and/or cell normals to be computed by setting the ComputeCellNormals + * and ComputePointNormals flags. + * + * The computed normals (a vtkFloatArray) are set to be the active normals + * (using SetNormals()) of the PointData and/or the CellData (respectively) + * of the output PolyData. The name of these arrays is "Normals". + * + * The algorithm works by determining normals for each polygon and then + * averaging them at shared points. + * + * @warning + * Normals are computed only for polygons and triangles. Normals are + * not computed for lines, vertices, or triangle strips. + * + * @sa + * For high-performance rendering, you could use vtkmTriangleMeshPointNormals + * if you know that you have a triangle mesh which does not require splitting + * nor consistency check on the cell orientations. + * + */ + +#ifndef vtkmPolyDataNormals_h +#define vtkmPolyDataNormals_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // for export macro +#include "vtkPolyDataNormals.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmPolyDataNormals : public vtkPolyDataNormals +{ +public: + vtkTypeMacro(vtkmPolyDataNormals, vtkPolyDataNormals); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmPolyDataNormals* New(); + + ///@{ + /** + * When this flag is off (the default), then the computation will fall back + * to the serial VTK version if VTK-m fails to run. When the flag is on, + * the filter will generate an error if VTK-m fails to run. This is mostly + * useful in testing to make sure the expected algorithm is run. + */ + vtkGetMacro(ForceVTKm, vtkTypeBool); + vtkSetMacro(ForceVTKm, vtkTypeBool); + vtkBooleanMacro(ForceVTKm, vtkTypeBool); + ///@} + +protected: + vtkmPolyDataNormals(); + ~vtkmPolyDataNormals() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + vtkTypeBool ForceVTKm = false; + +private: + vtkmPolyDataNormals(const vtkmPolyDataNormals&) = delete; + void operator=(const vtkmPolyDataNormals&) = delete; +}; + +#endif // vtkmPolyDataNormals_h diff --git a/Accelerators/Vtkm/Filters/vtkmProbe.cxx b/Accelerators/Vtkm/Filters/vtkmProbe.cxx new file mode 100644 index 000000000..32adf50ad --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmProbe.cxx @@ -0,0 +1,265 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmProbe.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkExecutive.h" +#include "vtkImageData.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkStreamingDemandDrivenPipeline.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkmFilterPolicy.h" + +#include "vtkm/filter/Probe.h" + +vtkStandardNewMacro(vtkmProbe); + +//------------------------------------------------------------------------------ +vtkmProbe::vtkmProbe() +{ + this->SetNumberOfInputPorts(2); + this->PassCellArrays = false; + this->PassPointArrays = false; + this->PassFieldArrays = true; + this->ValidPointMaskArrayName = "vtkValidPointMask"; + this->ValidCellMaskArrayName = "vtkValidCellMask"; +} + +//------------------------------------------------------------------------------ +void vtkmProbe::SetSourceData(vtkDataObject* input) +{ + this->SetInputData(1, input); +} + +//------------------------------------------------------------------------------ +vtkDataObject* vtkmProbe::GetSource() +{ + if (this->GetNumberOfInputConnections(1) < 1) + { + return nullptr; + } + return this->GetExecutive()->GetInputData(1, 0); +} + +//------------------------------------------------------------------------------ +void vtkmProbe::SetSourceConnection(vtkAlgorithmOutput* algOutput) +{ + this->SetInputConnection(1, algOutput); +} + +//------------------------------------------------------------------------------ +int vtkmProbe::RequestData(vtkInformation* vtkNotUsed(request), vtkInformationVector** inputVector, + vtkInformationVector* outputVector) +{ + // Get the info objects + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* sourceInfo = inputVector[1]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + + // Get the input and output + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataSet::DATA_OBJECT())); + vtkDataSet* source = vtkDataSet::SafeDownCast(sourceInfo->Get(vtkDataSet::DATA_OBJECT())); + vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataSet::DATA_OBJECT())); + + // Copy the input to the output as a starting point + output->CopyStructure(input); + + try + { + // Convert the input dataset to a vtkm::cont::DataSet + vtkm::cont::DataSet in = tovtkm::Convert(input); + // VTK-m's probe filter requires the source to have at least a cellSet. + vtkm::cont::DataSet so = tovtkm::Convert(source, tovtkm::FieldsFlag::PointsAndCells); + if (so.GetNumberOfCells() <= 0) + { + vtkErrorMacro(<< "The source geometry does not have any cell set," + "aborting vtkmProbe filter"); + return 0; + } + + vtkm::filter::Probe probe; + // The input in VTK is the geometry in VTKM and the source in VTK is the input + // in VTKM. + probe.SetGeometry(in); + probe.SetInvalidValue(0.0); + + auto result = probe.Execute(so); + for (vtkm::Id i = 0; i < result.GetNumberOfFields(); i++) + { + const vtkm::cont::Field& field = result.GetField(i); + vtkDataArray* fieldArray = fromvtkm::Convert(field); + if (field.GetAssociation() == vtkm::cont::Field::Association::POINTS) + { + if (strcmp(fieldArray->GetName(), "HIDDEN") == 0) + { + fieldArray->SetName(this->ValidPointMaskArrayName.c_str()); + } + output->GetPointData()->AddArray(fieldArray); + } + else if (field.GetAssociation() == vtkm::cont::Field::Association::CELL_SET) + { + if (strcmp(fieldArray->GetName(), "HIDDEN") == 0) + { + fieldArray->SetName(this->ValidCellMaskArrayName.c_str()); + } + output->GetCellData()->AddArray(fieldArray); + } + fieldArray->FastDelete(); + } + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + this->PassAttributeData(input, source, output); + + return 1; +} + +//------------------------------------------------------------------------------ +int vtkmProbe::RequestInformation(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + // Update the whole extent in the output + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* sourceInfo = inputVector[1]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + int wholeExtent[6]; + if (inInfo && outInfo) + { + outInfo->CopyEntry(sourceInfo, vtkStreamingDemandDrivenPipeline::TIME_STEPS()); + outInfo->CopyEntry(sourceInfo, vtkStreamingDemandDrivenPipeline::TIME_RANGE()); + inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExtent); + outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExtent, 6); + + // Make sure that the scalar type and number of components + // are propagated from the source not the input. + if (vtkImageData::HasScalarType(sourceInfo)) + { + vtkImageData::SetScalarType(vtkImageData::GetScalarType(sourceInfo), outInfo); + } + if (vtkImageData::HasNumberOfScalarComponents(sourceInfo)) + { + vtkImageData::SetNumberOfScalarComponents( + vtkImageData::GetNumberOfScalarComponents(sourceInfo), outInfo); + } + return 1; + } + vtkErrorMacro("Missing input or output info!"); + return 0; +} + +//------------------------------------------------------------------------------ +int vtkmProbe::RequestUpdateExtent(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* sourceInfo = inputVector[1]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + + if (inInfo && outInfo) + { // Source's update exetent should be independent of the resampling extent + inInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); + sourceInfo->Remove(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); + if (sourceInfo->Has(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())) + { + sourceInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), + sourceInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()), 6); + } + return 1; + } + vtkErrorMacro("Missing input or output info!"); + return 0; +} + +//------------------------------------------------------------------------------ +void vtkmProbe::PassAttributeData( + vtkDataSet* input, vtkDataObject* vtkNotUsed(source), vtkDataSet* output) +{ + if (this->PassPointArrays) + { // Copy point data arrays + int numPtArrays = input->GetPointData()->GetNumberOfArrays(); + for (int i = 0; i < numPtArrays; i++) + { + vtkDataArray* da = input->GetPointData()->GetArray(i); + if (da && !output->GetPointData()->HasArray(da->GetName())) + { + output->GetPointData()->AddArray(da); + } + } + + // Set active attributes in the output to the active attributes in the input + for (int i = 0; i < vtkDataSetAttributes::NUM_ATTRIBUTES; ++i) + { + vtkAbstractArray* da = input->GetPointData()->GetAttribute(i); + if (da && da->GetName() && !output->GetPointData()->GetAttribute(i)) + { + output->GetPointData()->SetAttribute(da, i); + } + } + } + + // copy cell data arrays + if (this->PassCellArrays) + { + int numCellArrays = input->GetCellData()->GetNumberOfArrays(); + for (int i = 0; i < numCellArrays; ++i) + { + vtkDataArray* da = input->GetCellData()->GetArray(i); + if (!output->GetCellData()->HasArray(da->GetName())) + { + output->GetCellData()->AddArray(da); + } + } + + // Set active attributes in the output to the active attributes in the input + for (int i = 0; i < vtkDataSetAttributes::NUM_ATTRIBUTES; ++i) + { + vtkAbstractArray* da = input->GetCellData()->GetAttribute(i); + if (da && da->GetName() && !output->GetCellData()->GetAttribute(i)) + { + output->GetCellData()->SetAttribute(da, i); + } + } + } + + if (this->PassFieldArrays) + { + // nothing to do, vtkDemandDrivenPipeline takes care of that. + } + else + { + output->GetFieldData()->Initialize(); + } +} + +//------------------------------------------------------------------------------ +void vtkmProbe::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); + os << indent << "PassPointArrays: " << this->PassPointArrays << "\n"; + os << indent << "PassCellArrays: " << this->PassCellArrays << "\n"; + os << indent << "PassFieldArray: " << this->PassFieldArrays << "\n"; +} diff --git a/Accelerators/Vtkm/Filters/vtkmProbe.h b/Accelerators/Vtkm/Filters/vtkmProbe.h new file mode 100644 index 000000000..d2be61ab4 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmProbe.h @@ -0,0 +1,156 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmProbe + * @brief Sample data at specified point locations + * + * vtkmProbe is a filter that computes point attributes(e.g., scalars, vectors, + * etc.) at specific point positions using the probe filter in VTK-m. The + * filter has two inputs: the Input and Source. + * The Input geometric structure is passed through the filter. The point + * attributes are computed at the Input point positions by interpolating into + * the source data. For example, we can compute data values on a plane(plane + * specified as Input from a volume(Source). The source geometry must have cellSet + * defined otherwise the vtkm filter won't work. The cell data of the source data + * is copied to the output based on in which source cell each input point is. If + * an array of the same name exists both in source's point and cell data, only + * the one from the point data is probed. The valid point result is stored as + * a field array whose default name is "vtkValidPointMask" in the point data and + * the valid cell result(Invalid cells are the cells with at least one invalid + * point) is stored as a field array whose default name is "vtkValidCellMask" in + * the cell data. + * + * This filter can be used to resample data, or convert one dataset form into + * another. For example, an unstructured grid (vtkUnstructuredGrid) can be + * probed with a volume (three-dimensional vtkImageData), and then volume + * rendering techniques can be used to visualize the results. Another example: + * a line or curve can be used to probe data to produce x-y plots along + * that line or curve. + */ + +#ifndef vtkmProbe_h +#define vtkmProbe_h + +#include // for std::string + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for export +#include "vtkDataSetAlgorithm.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmProbe : public vtkDataSetAlgorithm +{ +public: + vtkTypeMacro(vtkmProbe, vtkDataSetAlgorithm); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmProbe* New(); + + ///@{ + /** + * Specify the data set that will be probed at the input points. + * The Input gives the geometry (the points and cells) for the output, + * while the Source is probed (interpolated) to generate the scalars, + * vectors, etc. for the output points based on the point locations. + */ + void SetSourceData(vtkDataObject* source); + vtkDataObject* GetSource(); + ///@} + + ///@{ + /** + * Specify the data set that will be probed at the input points. + * The Input gives the geometry (the points and cells) for the output, + * while the Source is probed (interpolated) to generate the scalars, + * vectors, etc. for the output points based on the point locations. + */ + void SetSourceConnection(vtkAlgorithmOutput* algOutput); + ///@} + + ///@{ + /** + * Shallow copy the input cell data arrays to the output. + * Off by default. + */ + vtkSetMacro(PassCellArrays, vtkTypeBool); + vtkBooleanMacro(PassCellArrays, vtkTypeBool); + vtkGetMacro(PassCellArrays, vtkTypeBool); + ///@} + ///@{ + /** + * Shallow copy the input point data arrays to the output. + * Off by default. + */ + vtkSetMacro(PassPointArrays, vtkTypeBool); + vtkBooleanMacro(PassPointArrays, vtkTypeBool); + vtkGetMacro(PassPointArrays, vtkTypeBool); + ///@} + + ///@{ + /** + * Set whether to pass the field-data arrays from the Input i.e. the input + * providing the geometry to the output. On by default. + */ + vtkSetMacro(PassFieldArrays, vtkTypeBool); + vtkBooleanMacro(PassFieldArrays, vtkTypeBool); + vtkGetMacro(PassFieldArrays, vtkTypeBool); + ///@} + + ///@{ + /** + * Returns the name of the valid point array added to the output with values 2 for + * hidden points and 0 for valid points. + * Set to "vtkValidPointMask" by default. + */ + vtkSetMacro(ValidPointMaskArrayName, std::string); + vtkGetMacro(ValidPointMaskArrayName, std::string); + ///@} + + ///@{ + /** + * Returns the name of the valid cell array added to the output with values 2 for + * hidden points and 0 for valid points. + * Set to "vtkValidCellMask" by default. + */ + vtkSetMacro(ValidCellMaskArrayName, std::string); + vtkGetMacro(ValidCellMaskArrayName, std::string); + ///@} + +protected: + vtkmProbe(); + ~vtkmProbe() override = default; + + vtkTypeBool PassCellArrays; + vtkTypeBool PassPointArrays; + vtkTypeBool PassFieldArrays; + std::string ValidPointMaskArrayName; + std::string ValidCellMaskArrayName; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + /** + * Call at the end of RequestData() to pass attribute dat a respecting the + * PassCellArrays, PassPointArrays and PassFieldArrays flag + */ + void PassAttributeData(vtkDataSet* input, vtkDataObject* source, vtkDataSet* output); + +private: + vtkmProbe(const vtkmProbe&) = delete; + void operator=(const vtkmProbe&) = delete; +}; + +#endif // vtkmProbe_h diff --git a/Accelerators/Vtkm/Filters/vtkmThreshold.cxx b/Accelerators/Vtkm/Filters/vtkmThreshold.cxx new file mode 100644 index 000000000..647514050 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmThreshold.cxx @@ -0,0 +1,102 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmThreshold.h" +#include "vtkmConfigFilters.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkObjectFactory.h" +#include "vtkPointData.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" +#include "vtkmlib/UnstructuredGridConverter.h" + +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmThreshold); + +//------------------------------------------------------------------------------ +vtkmThreshold::vtkmThreshold() = default; + +//------------------------------------------------------------------------------ +vtkmThreshold::~vtkmThreshold() = default; + +//------------------------------------------------------------------------------ +int vtkmThreshold::RequestData( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkUnstructuredGrid* output = + vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkDataArray* inputArray = this->GetInputArrayToProcess(0, inputVector); + if (inputArray == nullptr || inputArray->GetName() == nullptr || inputArray->GetName()[0] == '\0') + { + vtkErrorMacro("Invalid input array."); + return 0; + } + + try + { + // convert the input dataset to a vtkm::cont::DataSet + auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + + vtkm::filter::Threshold filter; + filter.SetActiveField(inputArray->GetName()); + filter.SetLowerThreshold(this->GetLowerThreshold()); + filter.SetUpperThreshold(this->GetUpperThreshold()); + auto result = filter.Execute(in); + + // now we are done the algorithm and conversion of arrays so + // convert back the dataset to VTK + if (!fromvtkm::Convert(result, output, input)) + { + vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + if (this->ForceVTKm) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + else + { + vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() + << "Falling back to serial implementation"); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + } + + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmThreshold::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} diff --git a/Accelerators/Vtkm/Filters/vtkmThreshold.h b/Accelerators/Vtkm/Filters/vtkmThreshold.h new file mode 100644 index 000000000..f57368587 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmThreshold.h @@ -0,0 +1,70 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmThreshold + * @brief extracts cells where scalar value in cell satisfies threshold criterion + * + * vtkmThreshold is a filter that extracts cells from any dataset type that + * satisfy a threshold criterion. A cell satisfies the criterion if the + * scalar value of every point or cell satisfies the criterion. The + * criterion takes the form of between two values. The output of this + * filter is an unstructured grid. + * + * Note that scalar values are available from the point and cell attribute + * data. By default, point data is used to obtain scalars, but you can + * control this behavior. See the AttributeMode ivar below. + * + */ +#ifndef vtkmThreshold_h +#define vtkmThreshold_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation +#include "vtkThreshold.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmThreshold : public vtkThreshold +{ +public: + vtkTypeMacro(vtkmThreshold, vtkThreshold); + void PrintSelf(ostream& os, vtkIndent indent) override; + + static vtkmThreshold* New(); + + ///@{ + /** + * When this flag is off (the default), then the computation will fall back + * to the serial VTK version if VTK-m fails to run. When the flag is on, + * the filter will generate an error if VTK-m fails to run. This is mostly + * useful in testing to make sure the expected algorithm is run. + */ + vtkGetMacro(ForceVTKm, vtkTypeBool); + vtkSetMacro(ForceVTKm, vtkTypeBool); + vtkBooleanMacro(ForceVTKm, vtkTypeBool); + ///@} + +protected: + vtkmThreshold(); + ~vtkmThreshold() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + vtkTypeBool ForceVTKm = false; + +private: + vtkmThreshold(const vtkmThreshold&) = delete; + void operator=(const vtkmThreshold&) = delete; +}; + +#endif // vtkmThreshold_h diff --git a/Accelerators/Vtkm/Filters/vtkmTriangleMeshPointNormals.cxx b/Accelerators/Vtkm/Filters/vtkmTriangleMeshPointNormals.cxx new file mode 100644 index 000000000..d46e436a3 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmTriangleMeshPointNormals.cxx @@ -0,0 +1,111 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkmTriangleMeshPointNormals.cxx + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +#include "vtkmTriangleMeshPointNormals.h" + +#include "vtkCellArray.h" +#include "vtkCellData.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkPointData.h" +#include "vtkPolyData.h" +#include "vtkSmartPointer.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/PolyDataConverter.h" + +#include "vtkmFilterPolicy.h" + +#include "vtkm/filter/SurfaceNormals.h" + +vtkStandardNewMacro(vtkmTriangleMeshPointNormals); + +//------------------------------------------------------------------------------ +void vtkmTriangleMeshPointNormals::PrintSelf(ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} + +//------------------------------------------------------------------------------ +vtkmTriangleMeshPointNormals::vtkmTriangleMeshPointNormals() = default; +vtkmTriangleMeshPointNormals::~vtkmTriangleMeshPointNormals() = default; + +//------------------------------------------------------------------------------ +int vtkmTriangleMeshPointNormals::RequestData( + vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + // get the info objects + vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation* outInfo = outputVector->GetInformationObject(0); + + // get the input and output + vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); + vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); + + // check if polydata is in supported format + if (input->GetVerts()->GetNumberOfCells() != 0 || input->GetLines()->GetNumberOfCells() != 0 || + input->GetStrips()->GetNumberOfCells() != 0 || + (input->GetPolys()->GetNumberOfConnectivityIds() % 3) != 0) + { + vtkErrorMacro(<< "This filter only works with polydata containing just triangles."); + return 0; + } + + try + { + // convert the input dataset to a vtkm::cont::DataSet + auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::None); + + vtkm::filter::SurfaceNormals filter; + filter.SetGenerateCellNormals(false); + filter.SetNormalizeCellNormals(false); + filter.SetGeneratePointNormals(true); + filter.SetPointNormalsName("Normals"); + auto result = filter.Execute(in); + + if (!fromvtkm::Convert(result, output, input)) + { + vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); + return 0; + } + } + catch (const vtkm::cont::Error& e) + { + if (this->ForceVTKm) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + else + { + vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() + << "Falling back to vtkTriangleMeshPointNormals"); + return this->Superclass::RequestData(request, inputVector, outputVector); + } + } + + vtkSmartPointer pointNormals = output->GetPointData()->GetArray("Normals"); + + output->GetPointData()->CopyNormalsOff(); + output->GetPointData()->PassData(input->GetPointData()); + output->GetCellData()->CopyNormalsOff(); + output->GetCellData()->PassData(input->GetPointData()); + + if (pointNormals) + { + output->GetPointData()->SetNormals(pointNormals); + } + + return 1; +} diff --git a/Accelerators/Vtkm/Filters/vtkmTriangleMeshPointNormals.h b/Accelerators/Vtkm/Filters/vtkmTriangleMeshPointNormals.h new file mode 100644 index 000000000..d2b694082 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmTriangleMeshPointNormals.h @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: Visualization Toolkit + Module: vtkmTriangleMeshPointNormals.h + + Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen + All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ +/** + * @class vtkmTriangleMeshPointNormals + * @brief compute point normals for triangle mesh + * + * vtkmTriangleMeshPointNormals is a filter that computes point normals for + * a triangle mesh to enable high-performance rendering. It is a fast-path + * version of the vtkmPolyDataNormals filter in order to be able to compute + * normals for triangle meshes deforming rapidly. + * + * The computed normals (a vtkFloatArray) are set to be the active normals + * (using SetNormals()) of the PointData. The array name is "Normals". + * + * The algorithm works by determining normals for each triangle and adding + * these vectors to the triangle points. The resulting vectors at each + * point are then normalized. + * + * @warning + * Normals are computed only for triangular polygons: the filter can not + * handle meshes with other types of cells (Verts, Lines, Strips) or Polys + * with the wrong number of components (not equal to 3). + * + * @warning + * Unlike the vtkPolyDataNormals filter, this filter does not apply any + * splitting nor checks for cell orientation consistency in order to speed + * up the computation. Moreover, normals are not calculated the exact same + * way as the vtkPolyDataNormals filter since the triangle normals are not + * normalized before being added to the point normals: those cell normals + * are therefore weighted by the triangle area. This is not more nor less + * correct than normalizing them before adding them, but it is much faster. + * + */ + +#ifndef vtkmTriangleMeshPointNormals_h +#define vtkmTriangleMeshPointNormals_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // for export macro +#include "vtkTriangleMeshPointNormals.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmTriangleMeshPointNormals + : public vtkTriangleMeshPointNormals +{ +public: + vtkTypeMacro(vtkmTriangleMeshPointNormals, vtkTriangleMeshPointNormals); + void PrintSelf(ostream& os, vtkIndent indent) override; + static vtkmTriangleMeshPointNormals* New(); + + ///@{ + /** + * When this flag is off (the default), then the computation will fall back + * to the serial VTK version if VTK-m fails to run. When the flag is on, + * the filter will generate an error if VTK-m fails to run. This is mostly + * useful in testing to make sure the expected algorithm is run. + */ + vtkGetMacro(ForceVTKm, vtkTypeBool); + vtkSetMacro(ForceVTKm, vtkTypeBool); + vtkBooleanMacro(ForceVTKm, vtkTypeBool); + ///@} + +protected: + vtkmTriangleMeshPointNormals(); + ~vtkmTriangleMeshPointNormals() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + + vtkTypeBool ForceVTKm = false; + +private: + vtkmTriangleMeshPointNormals(const vtkmTriangleMeshPointNormals&) = delete; + void operator=(const vtkmTriangleMeshPointNormals&) = delete; +}; + +#endif // vtkmTriangleMeshPointNormals_h diff --git a/Accelerators/Vtkm/Filters/vtkmWarpScalar.cxx b/Accelerators/Vtkm/Filters/vtkmWarpScalar.cxx new file mode 100644 index 000000000..6ccf703e5 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmWarpScalar.cxx @@ -0,0 +1,187 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmWarpScalar.h" +#include "vtkmConfigFilters.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkImageData.h" +#include "vtkImageDataToPointSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkPointData.h" +#include "vtkRectilinearGrid.h" +#include "vtkRectilinearGridToPointSet.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkm/cont/DataSetFieldAdd.h" +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmWarpScalar); + +//------------------------------------------------------------------------------ +vtkmWarpScalar::vtkmWarpScalar() = default; + +//------------------------------------------------------------------------------ +vtkmWarpScalar::~vtkmWarpScalar() = default; + +//------------------------------------------------------------------------------ +int vtkmWarpScalar::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkSmartPointer input = vtkPointSet::GetData(inputVector[0]); + vtkSmartPointer output = vtkPointSet::GetData(outputVector); + + if (!input) + { + // Try converting image data. + vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); + if (inImage) + { + vtkNew image2points; + image2points->SetInputData(inImage); + image2points->Update(); + input = image2points->GetOutput(); + } + } + + if (!input) + { + // Try converting rectilinear grid. + vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); + if (inRect) + { + vtkNew rect2points; + rect2points->SetInputData(inRect); + rect2points->Update(); + input = rect2points->GetOutput(); + } + } + if (!input) + { + vtkErrorMacro(<< "Invalid or missing input"); + return 0; + } + + output->CopyStructure(input); + + // Get the scalar field info + vtkDataArray* inScalars = this->GetInputArrayToProcess(0, inputVector); + int inScalarsAssociation = this->GetInputArrayAssociation(0, inputVector); + // Get the normal field info + vtkDataArray* inNormals = input->GetPointData()->GetNormals(); + vtkPoints* inPts = input->GetPoints(); + + // InScalars is not used when XYPlane is on + if (!inPts || (!inScalars && !this->XYPlane)) + { + vtkDebugMacro(<< "No data to warp"); + return 1; + } + + try + { + vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + if (inScalars) + { + auto scalarFactor = tovtkm::Convert(inScalars, inScalarsAssociation); + in.AddField(scalarFactor); + } + vtkm::Id numberOfPoints = in.GetCoordinateSystem().GetData().GetNumberOfValues(); + + // ScaleFactor in vtk is the scalarAmount in vtk-m. + vtkm::filter::WarpScalar warpScalar(this->ScaleFactor); + warpScalar.SetUseCoordinateSystemAsField(true); + + // Get/generate the normal field + if (inNormals && !this->UseNormal) + { // DataNormal + auto inNormalsField = tovtkm::Convert(inNormals, vtkDataObject::FIELD_ASSOCIATION_POINTS); + in.AddField(inNormalsField); + warpScalar.SetNormalField(inNormals->GetName()); + } + else if (this->XYPlane) + { + using vecType = vtkm::Vec; + vecType normal = vtkm::make_Vec(0.0, 0.0, 1.0); + vtkm::cont::ArrayHandleConstant vectorAH = + vtkm::cont::make_ArrayHandleConstant(normal, numberOfPoints); + in.AddPointField("zNormal", vectorAH); + warpScalar.SetNormalField("zNormal"); + } + else + { + using vecType = vtkm::Vec; + vecType normal = + vtkm::make_Vec(this->Normal[0], this->Normal[1], this->Normal[2]); + vtkm::cont::ArrayHandleConstant vectorAH = + vtkm::cont::make_ArrayHandleConstant(normal, numberOfPoints); + in.AddPointField("instanceNormal", vectorAH); + warpScalar.SetNormalField("instanceNormal"); + } + + if (this->XYPlane) + { // Just use the z value to warp the surface. Ignore the input scalars. + std::vector zValues; + zValues.reserve(static_cast(input->GetNumberOfPoints())); + for (vtkIdType i = 0; i < input->GetNumberOfPoints(); i++) + { + zValues.push_back(input->GetPoints()->GetPoint(i)[2]); + } + in.AddPointField("scalarfactor", zValues); + warpScalar.SetScalarFactorField("scalarfactor"); + } + else + { + warpScalar.SetScalarFactorField(std::string(inScalars->GetName())); + } + + auto result = warpScalar.Execute(in); + vtkDataArray* warpScalarResult = + fromvtkm::Convert(result.GetField("warpscalar", vtkm::cont::Field::Association::POINTS)); + vtkPoints* newPts = vtkPoints::New(); + // Update points + newPts->SetNumberOfPoints(warpScalarResult->GetNumberOfTuples()); + newPts->SetData(warpScalarResult); + output->SetPoints(newPts); + newPts->Delete(); + warpScalarResult->FastDelete(); + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + // Update ourselves and release memory + output->GetPointData()->CopyNormalsOff(); // distorted geometry + output->GetPointData()->PassData(input->GetPointData()); + output->GetCellData()->CopyNormalsOff(); // distorted geometry + output->GetCellData()->PassData(input->GetCellData()); + + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmWarpScalar::PrintSelf(std::ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} diff --git a/Accelerators/Vtkm/Filters/vtkmWarpScalar.h b/Accelerators/Vtkm/Filters/vtkmWarpScalar.h new file mode 100644 index 000000000..30493aac5 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmWarpScalar.h @@ -0,0 +1,65 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmWarpScalar + * @brief deform geometry with scalar data + * + * vtkmWarpScalar is a filter that modifies point coordinates by moving points + * along point normals by the scalar amount times the scalar factor with vtkm + * as its backend. + * Useful for creating carpet or x-y-z plots. + * + * If normals are not present in data, the Normal instance variable will + * be used as the direction along which to warp the geometry. If normals are + * present but you would like to use the Normal instance variable, set the + * UseNormal boolean to true. + * + * If XYPlane boolean is set true, then the z-value is considered to be + * a scalar value (still scaled by scale factor), and the displacement is + * along the z-axis. If scalars are also present, these are copied through + * and can be used to color the surface. + * + * Note that the filter passes both its point data and cell data to + * its output, except for normals, since these are distorted by the + * warping. + */ + +#ifndef vtkmWarpScalar_h +#define vtkmWarpScalar_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // required for correct export +#include "vtkWarpScalar.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmWarpScalar : public vtkWarpScalar +{ +public: + vtkTypeMacro(vtkmWarpScalar, vtkWarpScalar); + void PrintSelf(ostream& os, vtkIndent indent) override; + + static vtkmWarpScalar* New(); + +protected: + vtkmWarpScalar(); + ~vtkmWarpScalar() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + +private: + vtkmWarpScalar(const vtkmWarpScalar&) = delete; + void operator=(const vtkmWarpScalar&) = delete; +}; + +#endif // vtkmWarpScalar_h diff --git a/Accelerators/Vtkm/Filters/vtkmWarpVector.cxx b/Accelerators/Vtkm/Filters/vtkmWarpVector.cxx new file mode 100644 index 000000000..9b94ba5da --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmWarpVector.cxx @@ -0,0 +1,134 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +#include "vtkmWarpVector.h" +#include "vtkmConfigFilters.h" + +#include "vtkCellData.h" +#include "vtkDataSet.h" +#include "vtkImageData.h" +#include "vtkImageDataToPointSet.h" +#include "vtkInformation.h" +#include "vtkInformationVector.h" +#include "vtkPointData.h" +#include "vtkRectilinearGrid.h" +#include "vtkRectilinearGridToPointSet.h" +#include "vtkUnstructuredGrid.h" + +#include "vtkmlib/ArrayConverters.h" +#include "vtkmlib/DataSetConverters.h" + +#include "vtkm/cont/DataSetFieldAdd.h" +#include "vtkmFilterPolicy.h" + +#include + +vtkStandardNewMacro(vtkmWarpVector); + +//------------------------------------------------------------------------------ +vtkmWarpVector::vtkmWarpVector() = default; + +//------------------------------------------------------------------------------ +vtkmWarpVector::~vtkmWarpVector() = default; + +//------------------------------------------------------------------------------ +int vtkmWarpVector::RequestData(vtkInformation* vtkNotUsed(request), + vtkInformationVector** inputVector, vtkInformationVector* outputVector) +{ + vtkSmartPointer input = vtkPointSet::GetData(inputVector[0]); + vtkSmartPointer output = vtkPointSet::GetData(outputVector); + + if (!input) + { + // Try converting image data. + vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); + if (inImage) + { + vtkNew image2points; + image2points->SetInputData(inImage); + image2points->Update(); + input = image2points->GetOutput(); + } + } + + if (!input) + { + // Try converting rectilinear grid. + vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); + if (inRect) + { + vtkNew rect2points; + rect2points->SetInputData(inRect); + rect2points->Update(); + input = rect2points->GetOutput(); + } + } + if (!input) + { + vtkErrorMacro(<< "Invalid or missing input"); + return 0; + } + vtkIdType numPts = input->GetPoints()->GetNumberOfPoints(); + + vtkDataArray* vectors = this->GetInputArrayToProcess(0, inputVector); + int vectorsAssociation = this->GetInputArrayAssociation(0, inputVector); + + if (!vectors || !numPts) + { + vtkDebugMacro(<< "no input data"); + return 1; + } + + output->CopyStructure(input); + + try + { + vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); + vtkm::cont::Field vectorField = tovtkm::Convert(vectors, vectorsAssociation); + in.AddField(vectorField); + + vtkm::filter::WarpVector warpVector(this->ScaleFactor); + warpVector.SetUseCoordinateSystemAsField(true); + warpVector.SetVectorField(vectorField.GetName(), vectorField.GetAssociation()); + auto result = warpVector.Execute(in); + + vtkDataArray* warpVectorResult = + fromvtkm::Convert(result.GetField("warpvector", vtkm::cont::Field::Association::POINTS)); + vtkNew newPts; + + newPts->SetNumberOfPoints(warpVectorResult->GetNumberOfTuples()); + newPts->SetData(warpVectorResult); + output->SetPoints(newPts); + warpVectorResult->FastDelete(); + } + catch (const vtkm::cont::Error& e) + { + vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); + return 0; + } + + // Update ourselves and release memory + output->GetPointData()->CopyNormalsOff(); // distorted geometry + output->GetPointData()->PassData(input->GetPointData()); + output->GetCellData()->CopyNormalsOff(); // distorted geometry + output->GetCellData()->PassData(input->GetCellData()); + return 1; +} + +//------------------------------------------------------------------------------ +void vtkmWarpVector::PrintSelf(std::ostream& os, vtkIndent indent) +{ + this->Superclass::PrintSelf(os, indent); +} diff --git a/Accelerators/Vtkm/Filters/vtkmWarpVector.h b/Accelerators/Vtkm/Filters/vtkmWarpVector.h new file mode 100644 index 000000000..bfbef22d7 --- /dev/null +++ b/Accelerators/Vtkm/Filters/vtkmWarpVector.h @@ -0,0 +1,52 @@ +//============================================================================= +// +// Copyright (c) Kitware, Inc. +// All rights reserved. +// See LICENSE.txt for details. +// +// This software is distributed WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the above copyright notice for more information. +// +// Copyright 2012 Sandia Corporation. +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +//============================================================================= +/** + * @class vtkmWarpVector + * @brief deform geometry with vector data + * + * vtkWarpVector is a filter that modifies point coordinates by moving + * points along vector times the scale factor. Useful for showing flow + * profiles or mechanical deformation. + * + * The filter passes both its point data and cell data to its output. + */ + +#ifndef vtkmWarpVector_h +#define vtkmWarpVector_h + +#include "vtkAcceleratorsVTKmFiltersModule.h" // required for correct export +#include "vtkWarpVector.h" + +class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmWarpVector : public vtkWarpVector +{ +public: + vtkTypeMacro(vtkmWarpVector, vtkWarpVector); + void PrintSelf(ostream& os, vtkIndent indent) override; + + static vtkmWarpVector* New(); + +protected: + vtkmWarpVector(); + ~vtkmWarpVector() override; + + int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; + +private: + vtkmWarpVector(const vtkmWarpVector&) = delete; + void operator=(const vtkmWarpVector&) = delete; +}; + +#endif // vtkmWarpVector_h diff --git a/Accelerators/Vtkm/Testing/Cxx/CMakeLists.txt b/Accelerators/Vtkm/Testing/Cxx/CMakeLists.txt deleted file mode 100644 index 3b2b01edd..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/CMakeLists.txt +++ /dev/null @@ -1,71 +0,0 @@ - -vtk_add_test_cxx(vtkAcceleratorsVTKmCxxTests1 tests1 - TestVTKMCleanGrid.cxx - TestVTKMCoordinateSystemTransform.cxx,NO_VALID - TestVTKMClip.cxx - TestVTKMClipWithImplicitFunction.cxx - TestVTKMExternalFaces.cxx - TestVTKMExtractVOI.cxx - TestVTKMGradient.cxx,NO_VALID - TestVTKMGradientAndVorticity.cxx,NO_VALID - TestVTKMHistogram.cxx,NO_VALID - TestVTKMLevelOfDetail.cxx - TestVTKMMarchingCubes.cxx - TestVTKMMarchingCubes2.cxx - TestVTKMNDHistogram.cxx,NO_VALID - TestVTKMPointElevation.cxx - TestVTKMPointTransform.cxx - TestVTKMProbe.cxx,NO_VALID - TestVTKMPolyDataNormals.cxx - TestVTKMThreshold.cxx - TestVTKMThreshold2.cxx - TestVTKMTriangleMeshPointNormals.cxx - TestVTKMWarpScalar.cxx - TestVTKMWarpVector.cxx - ) - -# We are splitting the tests into two executables to workaround an issue in -# cuda. With all the tests in the same executable several tests are failing -# in cuda. We have not identified the root cause of the problem yet. -vtk_add_test_cxx(vtkAcceleratorsVTKmCxxTests2 tests2 - TestVTKMDataArray.cxx,NO_VALID - TestVTKMDataSet.cxx,NO_VALID - ) - -if (TARGET vtkm::cuda) - #the enable_language call is scoped! so we have to re-enable - #cuda in the test directory - enable_language(CUDA) - foreach(src IN LISTS tests1) - set_source_files_properties(${src}.cxx PROPERTIES LANGUAGE "CUDA") - endforeach() - foreach(src IN LISTS tests2) - set_source_files_properties(${src}.cxx PROPERTIES LANGUAGE "CUDA") - endforeach() - - #the tests aren't scoped as a child directory of vtkAcceleratorsVTKm - #so we need to redo this logic - vtkm_get_cuda_flags(CMAKE_CUDA_FLAGS) - - # Temporarily suppress "has address taken but no possible call to it" warnings, - # until we figure out its implications. - # We are disabling all warnings as nvlink has no known way to suppress - # individual warning types. - string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w") -endif() - - -vtk_test_cxx_executable(vtkAcceleratorsVTKmCxxTests1 tests1 - RENDERING_FACTORY - ) - -vtk_test_cxx_executable(vtkAcceleratorsVTKmCxxTests2 tests2 - RENDERING_FACTORY - ) - -if (TARGET vtkm::cuda) - # When cuda is enabled VTK::AcceleratorsVTKm is built statically but with fpic - # enabled so the tests are also built with fpic enabled - set_target_properties(vtkAcceleratorsVTKmCxxTests1 PROPERTIES POSITION_INDEPENDENT_CODE ON) - set_target_properties(vtkAcceleratorsVTKmCxxTests2 PROPERTIES POSITION_INDEPENDENT_CODE ON) -endif() diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMClip.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMClip.cxx deleted file mode 100644 index cb144ba85..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMClip.cxx +++ /dev/null @@ -1,172 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestVTKMClip.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ - -#include "vtkmClip.h" - -#include "vtkActor.h" -#include "vtkCamera.h" -#include "vtkDataSetSurfaceFilter.h" -#include "vtkDelaunay3D.h" -#include "vtkDoubleArray.h" -#include "vtkImageData.h" -#include "vtkImageToPoints.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPolyDataMapper.h" -#include "vtkRTAnalyticSource.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkSphereSource.h" -#include "vtkUnstructuredGrid.h" - -namespace -{ - -template -void GenerateScalars(DataSetT* dataset, bool negate) -{ - vtkIdType numPoints = dataset->GetNumberOfPoints(); - - vtkNew scalars; - scalars->SetName("x+y"); - scalars->SetNumberOfComponents(1); - scalars->SetNumberOfTuples(numPoints); - - double point[3]; - for (vtkIdType i = 0; i < numPoints; ++i) - { - dataset->GetPoint(i, point); - scalars->SetTypedComponent(i, 0, (negate ? -point[0] - point[1] : point[0] + point[1])); - } - dataset->GetPointData()->SetScalars(scalars); -} - -} // end anon namespace - -int TestVTKMClip(int, char*[]) -{ - vtkNew renderer; - - // First input is a polydata with 2D cells. This should produce a polydata - // output from vtkmClip. - vtkNew sphereSource; - sphereSource->SetThetaResolution(50); - sphereSource->SetPhiResolution(50); - sphereSource->Update(); - vtkPolyData* sphere = sphereSource->GetOutput(); - GenerateScalars(sphere, false); - - // Clip at zero: - vtkNew sphereClipper; - sphereClipper->SetInputData(sphere); - sphereClipper->SetComputeScalars(true); - sphereClipper->SetClipValue(0.); - - vtkNew sphSurface; - sphSurface->SetInputConnection(sphereClipper->GetOutputPort()); - - vtkNew sphereMapper; - sphereMapper->SetInputConnection(sphSurface->GetOutputPort()); - sphereMapper->SetScalarVisibility(1); - sphereMapper->SetScalarModeToUsePointFieldData(); - sphereMapper->SelectColorArray("x+y"); - sphereMapper->SetScalarRange(0, 1); - - vtkNew sphereActor; - sphereActor->SetMapper(sphereMapper); - sphereActor->SetPosition(0.5, 0.5, 0.); - sphereActor->RotateWXYZ(90., 0., 0., 1.); - renderer->AddActor(sphereActor); - - // Second input is an unstructured grid with 3D cells. This should produce an - // unstructured grid output from vtkmClip. - vtkNew imageSource; - imageSource->SetWholeExtent(-5, 5, -5, 5, -5, 5); - - // Convert image to pointset - vtkNew imageToPoints; - imageToPoints->SetInputConnection(imageSource->GetOutputPort()); - - // Convert point set to tets: - vtkNew tetrahedralizer; - tetrahedralizer->SetInputConnection(imageToPoints->GetOutputPort()); - tetrahedralizer->Update(); - vtkUnstructuredGrid* tets = tetrahedralizer->GetOutput(); - GenerateScalars(tets, true); - - // Clip at zero: - vtkNew tetClipper; - tetClipper->SetInputData(tets); - tetClipper->SetComputeScalars(true); - tetClipper->SetClipValue(0.); - - vtkNew tetSurface; - tetSurface->SetInputConnection(tetClipper->GetOutputPort()); - - vtkNew tetMapper; - tetMapper->SetInputConnection(tetSurface->GetOutputPort()); - tetMapper->SetScalarVisibility(1); - tetMapper->SetScalarModeToUsePointFieldData(); - tetMapper->SelectColorArray("x+y"); - tetMapper->SetScalarRange(0, 10); - - vtkNew tetActor; - tetActor->SetMapper(tetMapper); - tetActor->SetScale(1. / 5.); - renderer->AddActor(tetActor); - - // Third dataset tests imagedata. This should produce an unstructured grid: - vtkImageData* image = imageSource->GetOutput(); - GenerateScalars(image, false); - - vtkNew imageClipper; - imageClipper->SetInputData(image); - imageClipper->SetComputeScalars(true); - imageClipper->SetClipValue(0.); - - vtkNew imageSurface; - imageSurface->SetInputConnection(imageClipper->GetOutputPort()); - - vtkNew imageMapper; - imageMapper->SetInputConnection(imageSurface->GetOutputPort()); - imageMapper->SetScalarVisibility(1); - imageMapper->SetScalarModeToUsePointFieldData(); - imageMapper->SelectColorArray("x+y"); - imageMapper->SetScalarRange(0, 10); - - vtkNew imageActor; - imageActor->SetMapper(imageMapper); - imageActor->SetScale(1. / 5.); - imageActor->SetPosition(1.0, 1.0, 0.); - renderer->AddActor(imageActor); - - vtkNew iren; - vtkNew renWin; - renWin->SetMultiSamples(0); - iren->SetRenderWindow(renWin); - renWin->AddRenderer(renderer); - - renWin->SetSize(500, 500); - renderer->GetActiveCamera()->SetPosition(0, 0, 1); - renderer->GetActiveCamera()->SetFocalPoint(0, 0, 0); - renderer->GetActiveCamera()->SetViewUp(0, 1, 0); - renderer->ResetCamera(); - - renWin->Render(); - iren->Start(); - - return EXIT_SUCCESS; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMClipWithImplicitFunction.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMClipWithImplicitFunction.cxx deleted file mode 100644 index ff4900e6a..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMClipWithImplicitFunction.cxx +++ /dev/null @@ -1,73 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestVTKMClipWithImplicitFunction.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkmClip.h" - -#include "vtkActor.h" -#include "vtkDataArray.h" -#include "vtkDataSetSurfaceFilter.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" -#include "vtkPolyDataMapper.h" -#include "vtkRTAnalyticSource.h" -#include "vtkRegressionTestImage.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkSphere.h" - -int TestVTKMClipWithImplicitFunction(int argc, char* argv[]) -{ - vtkNew wavelet; - wavelet->SetWholeExtent(-8, 8, -8, 8, -8, 8); - wavelet->SetCenter(0, 0, 0); - - vtkNew sphere; - sphere->SetCenter(0, 0, 0); - sphere->SetRadius(10); - vtkNew clip; - clip->SetInputConnection(wavelet->GetOutputPort()); - clip->SetClipFunction(sphere); - - vtkNew surface; - surface->SetInputConnection(clip->GetOutputPort()); - - vtkNew mapper; - mapper->SetInputConnection(surface->GetOutputPort()); - mapper->SetScalarRange(37, 150); - - vtkNew actor; - actor->SetMapper(mapper); - - vtkNew renderer; - renderer->AddActor(actor); - renderer->ResetCamera(); - - vtkNew renWin; - renWin->AddRenderer(renderer); - - vtkNew iren; - iren->SetRenderWindow(renWin); - iren->Initialize(); - - renWin->Render(); - int retVal = vtkRegressionTestImage(renWin); - if (retVal == vtkRegressionTester::DO_INTERACTOR) - { - iren->Start(); - } - - return !retVal; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMDataArray.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMDataArray.cxx deleted file mode 100644 index 8c7a911c2..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMDataArray.cxx +++ /dev/null @@ -1,106 +0,0 @@ -#include "vtkSmartPointer.h" -#include "vtkmDataArray.h" - -#include -#include -#include - -#include - -namespace -{ - -//----------------------------------------------------------------------------- -class TestError -{ -public: - TestError(const std::string& message, int line) - : Message(message) - , Line(line) - { - } - - void PrintMessage(std::ostream& out) const - { - out << "Error at line " << this->Line << ": " << this->Message << "\n"; - } - -private: - std::string Message; - int Line; -}; - -#define RAISE_TEST_ERROR(msg) throw TestError((msg), __LINE__) - -#define TEST_VERIFY(cond, msg) \ - if (!(cond)) \ - RAISE_TEST_ERROR((msg)) - -inline bool IsEqualFloat(double a, double b, double e = 1e-6f) -{ - return (std::abs(a - b) <= e); -} - -//----------------------------------------------------------------------------- -template -void TestWithArrayHandle(const ArrayHandleType& vtkmArray) -{ - vtkSmartPointer vtkArray; - vtkArray.TakeReference(make_vtkmDataArray(vtkmArray)); - - auto vtkmPortal = vtkmArray.GetPortalConstControl(); - - vtkIdType length = vtkArray->GetNumberOfTuples(); - std::cout << "Length: " << length << "\n"; - TEST_VERIFY(length == vtkmArray.GetNumberOfValues(), "Array lengths don't match"); - - int numberOfComponents = vtkArray->GetNumberOfComponents(); - std::cout << "Number of components: " << numberOfComponents << "\n"; - TEST_VERIFY(numberOfComponents == - internal::FlattenVec::GetNumberOfComponents( - vtkmPortal.Get(0)), - "Number of components don't match"); - - for (vtkIdType i = 0; i < length; ++i) - { - double tuple[9]; - vtkArray->GetTuple(i, tuple); - auto val = vtkmPortal.Get(i); - for (int j = 0; j < numberOfComponents; ++j) - { - auto comp = internal::FlattenVec::GetComponent(val, j); - TEST_VERIFY(IsEqualFloat(tuple[j], static_cast(comp)), "values don't match"); - TEST_VERIFY(IsEqualFloat(vtkArray->GetComponent(i, j), static_cast(comp)), - "values don't match"); - } - } -} - -} // anonymous namespace - -//----------------------------------------------------------------------------- -int TestVTKMDataArray(int, char*[]) -try -{ - static const std::vector testData = { 3.0, 6.0, 2.0, 5.0, 1.0, 0.0, 4.0 }; - - std::cout << "Testing with Basic ArrayHandle\n"; - TestWithArrayHandle(vtkm::cont::make_ArrayHandle(testData)); - std::cout << "Passed\n"; - - std::cout << "Testing with ArrayHandleConstant\n"; - TestWithArrayHandle(vtkm::cont::make_ArrayHandleConstant( - vtkm::Vec, 3>{ { 1.0f, 2.0f, 3.0f } }, 10)); - std::cout << "Passed\n"; - - std::cout << "Testing with ArrayHandleUniformPointCoordinates\n"; - TestWithArrayHandle(vtkm::cont::ArrayHandleUniformPointCoordinates(vtkm::Id3{ 3 })); - std::cout << "Passed\n"; - - return EXIT_SUCCESS; -} -catch (const TestError& e) -{ - e.PrintMessage(std::cout); - return 1; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMDataSet.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMDataSet.cxx deleted file mode 100644 index 950cf6eb3..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMDataSet.cxx +++ /dev/null @@ -1,400 +0,0 @@ -#include "vtkmDataSet.h" - -#include "vtkCell.h" -#include "vtkCellArray.h" -#include "vtkCellData.h" -#include "vtkFloatArray.h" -#include "vtkGenericCell.h" -#include "vtkIdList.h" -#include "vtkIdTypeArray.h" -#include "vtkImageData.h" -#include "vtkImageDataToPointSet.h" -#include "vtkMath.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPoints.h" -#include "vtkStructuredGrid.h" -#include "vtkUnsignedCharArray.h" -#include "vtkUnstructuredGrid.h" -#include "vtkmDataArray.h" - -#include -#include - -#include -#include - -namespace -{ - -//----------------------------------------------------------------------------- -class TestError -{ -public: - TestError(const std::string& message, int line) - : Message(message) - , Line(line) - { - } - - void PrintMessage(std::ostream& out) const - { - out << "Error at line " << this->Line << ": " << this->Message << "\n"; - } - -private: - std::string Message; - int Line; -}; - -#define RAISE_TEST_ERROR(msg) throw TestError((msg), __LINE__) - -#define TEST_VERIFY(cond, msg) \ - if (!(cond)) \ - RAISE_TEST_ERROR((msg)) - -inline bool IsEqualFloat(double a, double b, double e = 1e-6f) -{ - return (std::abs(a - b) <= e); -} - -//----------------------------------------------------------------------------- -inline void TestEqualCells(vtkCell* c1, vtkCell* c2) -{ - TEST_VERIFY(c1->GetCellType() == c2->GetCellType(), "Cell types don't match"); - TEST_VERIFY(c1->GetNumberOfPoints() == c2->GetNumberOfPoints(), "Cell sizes don't match"); - for (vtkIdType i = 0; i < c1->GetNumberOfPoints(); ++i) - { - TEST_VERIFY(c1->GetPointId(i) == c2->GetPointId(i), "Cell point-ids don't match"); - } -} - -inline void TestEqualVtkArrays(vtkAbstractArray* a1, vtkAbstractArray* a2) -{ - TEST_VERIFY(std::string(a1->GetName()) == std::string(a2->GetName()), "Array names don't match"); - TEST_VERIFY(a1->GetDataType() == a2->GetDataType(), "Array data-types don't match"); - TEST_VERIFY( - a1->GetNumberOfTuples() == a2->GetNumberOfTuples(), "Array number of tuples don't match"); - TEST_VERIFY(a1->GetNumberOfComponents() == a2->GetNumberOfComponents(), - "Array number of components don't match"); - - auto da1 = vtkDataArray::SafeDownCast(a1); - auto da2 = vtkDataArray::SafeDownCast(a2); - double range1[2], range2[2]; - int numComps = da1->GetNumberOfComponents(); - for (int i = 0; i < numComps; ++i) - { - da1->GetRange(range1, i); - da2->GetRange(range2, i); - TEST_VERIFY(IsEqualFloat(range1[0], range2[0]) && IsEqualFloat(range1[1], range2[1]), - "Array ranges don't match"); - } -} - -void TestDataSets(vtkDataSet* dsVtk, vtkDataSet* dsVtkm) -{ - TEST_VERIFY( - dsVtk->GetNumberOfPoints() == dsVtkm->GetNumberOfPoints(), "Number of points don't match"); - TEST_VERIFY( - dsVtk->GetNumberOfCells() == dsVtkm->GetNumberOfCells(), "Number of cells don't match"); - double bounds1[6], bounds2[6]; - dsVtk->GetBounds(bounds1); - dsVtkm->GetBounds(bounds2); - TEST_VERIFY(IsEqualFloat(bounds1[0], bounds2[0]) && IsEqualFloat(bounds1[1], bounds2[1]) && - IsEqualFloat(bounds1[2], bounds2[2]) && IsEqualFloat(bounds1[3], bounds2[3]) && - IsEqualFloat(bounds1[4], bounds2[4]) && IsEqualFloat(bounds1[5], bounds2[5]), - "Bounds don't match"); - - vtkIdType numPoints = dsVtk->GetNumberOfPoints(); - for (vtkIdType i = 0; i < numPoints; ++i) - { - double x1[3], x2[3]; - dsVtk->GetPoint(i, x1); - dsVtkm->GetPoint(i, x2); - TEST_VERIFY( - IsEqualFloat(x1[0], x2[0]) && IsEqualFloat(x1[1], x2[1]) && IsEqualFloat(x1[2], x2[2]), - "'GetPoint` results don't match"); - - vtkNew cellIds1, cellIds2; - dsVtk->GetPointCells(i, cellIds1); - dsVtkm->GetPointCells(i, cellIds2); - cellIds1->Sort(); - cellIds2->Sort(); - TEST_VERIFY(cellIds1->GetNumberOfIds() == cellIds2->GetNumberOfIds(), - "`GetPointCells` results don't match"); - for (vtkIdType j = 0; j < cellIds1->GetNumberOfIds(); ++j) - { - TEST_VERIFY(cellIds1->GetId(j) == cellIds2->GetId(j), "`GetPointCells` results don't match"); - } - } - - vtkIdType numCells = dsVtk->GetNumberOfCells(); - for (vtkIdType i = 0; i < numCells; ++i) - { - TestEqualCells(dsVtk->GetCell(i), dsVtkm->GetCell(i)); - - vtkNew gc1, gc2; - dsVtk->GetCell(i, gc1); - dsVtkm->GetCell(i, gc2); - TestEqualCells(gc1, gc2); - - double bds1[6], bds2[6]; - dsVtk->GetCellBounds(i, bds1); - dsVtkm->GetCellBounds(i, bds2); - TEST_VERIFY(IsEqualFloat(bds1[0], bds2[0]) && IsEqualFloat(bds1[1], bds2[1]) && - IsEqualFloat(bds1[2], bds2[2]) && IsEqualFloat(bds1[3], bds2[3]) && - IsEqualFloat(bds1[4], bds2[4]) && IsEqualFloat(bds1[5], bds2[5]), - "Cell bounds don't match"); - - TEST_VERIFY(dsVtk->GetCellType(i) == dsVtkm->GetCellType(i), "Cell types don't match"); - - vtkNew ptIds1, ptIds2; - dsVtk->GetCellPoints(i, ptIds1); - dsVtkm->GetCellPoints(i, ptIds2); - for (vtkIdType j = 0; j < ptIds1->GetNumberOfIds(); ++j) - { - TEST_VERIFY(ptIds1->GetId(j) == ptIds2->GetId(j), "`GetCellPoints` results don't match"); - } - } - - std::default_random_engine engine; - std::uniform_real_distribution d1(bounds1[0], bounds1[1]), d2(bounds1[2], bounds1[3]), - d3(bounds1[4], bounds1[5]); - static constexpr int numSamples = 100; - for (int i = 0; i < numSamples; ++i) - { - double x[3] = { d1(engine), d2(engine), d3(engine) }; - - auto pid1 = dsVtk->FindPoint(x); - auto pid2 = dsVtkm->FindPoint(x); - if (pid1 != pid2) - { - TEST_VERIFY(pid1 != -1 && pid2 != -1, "`FindPoint` results don't match"); - double x1[3], x2[3]; - dsVtk->GetPoint(pid1, x1); - dsVtkm->GetPoint(pid1, x2); - TEST_VERIFY(IsEqualFloat( - vtkMath::Distance2BetweenPoints(x, x1), vtkMath::Distance2BetweenPoints(x, x2)), - "`FindPoint` results don't match"); - } - - int subId = 0; - double pcoords1[3], pcoords2[3]; - double weights1[8], weights2[8]; - auto cid1 = dsVtk->FindCell(x, nullptr, -1, 1e-6, subId, pcoords1, weights1); - auto cid2 = dsVtkm->FindCell(x, nullptr, -1, 1e-6, subId, pcoords2, weights2); - - // vtkDataSet and vtkmDataSet may find different cells if the point is too close to - // the boundary of those cells - if (cid1 != cid2) - { - if (cid2 >= 0) - { - // check if the point is inside or close to the vtkmDataSet found cell - vtkCell* cell = dsVtk->GetCell(cid2); - double dist2 = 0, pcoords[3], weights[8]; - if (cell->EvaluatePosition(x, nullptr, subId, pcoords, dist2, weights) == 0) // outside? - { - TEST_VERIFY(IsEqualFloat(cell->GetParametricDistance(pcoords), 0.0, 1e-3), - "`FindCell` incorrect result by vtkmDataSet"); - } - } - } - else if (cid1 == -1) - { - continue; - } - else - { - TEST_VERIFY(IsEqualFloat(pcoords1[0], pcoords2[0]) && - IsEqualFloat(pcoords1[1], pcoords2[1]) && IsEqualFloat(pcoords1[2], pcoords2[2]), - "`FindCell` pcoords don't match"); - int count = dsVtk->GetCell(cid1)->GetNumberOfPoints(); - for (int j = 0; j < count; ++j) - { - TEST_VERIFY(IsEqualFloat(weights1[j], weights2[j]), "`FindCell` weights don't match"); - } - } - } - - // test fields - int numPointFields = dsVtk->GetPointData()->GetNumberOfArrays(); - TEST_VERIFY(numPointFields == dsVtkm->GetPointData()->GetNumberOfArrays(), - "Number of point-fields don't match"); - for (int i = 0; i < numPointFields; ++i) - { - TestEqualVtkArrays(dsVtk->GetPointData()->GetArray(i), dsVtkm->GetPointData()->GetArray(i)); - } - - int numCellFields = dsVtk->GetCellData()->GetNumberOfArrays(); - TEST_VERIFY(numCellFields == dsVtkm->GetCellData()->GetNumberOfArrays(), - "Number of cell-fields don't match"); - for (int i = 0; i < numCellFields; ++i) - { - TestEqualVtkArrays(dsVtk->GetCellData()->GetArray(i), dsVtkm->GetCellData()->GetArray(i)); - } -} - -//----------------------------------------------------------------------------- -inline void CoordsCopy(const vtkm::cont::CoordinateSystem& coords, vtkPoints* points) -{ - auto ptsPortal = coords.GetData().GetPortalConstControl(); - auto numPoints = coords.GetNumberOfPoints(); - - points->SetDataTypeToFloat(); - points->SetNumberOfPoints(numPoints); - auto ptsArray = vtkFloatArray::SafeDownCast(points->GetData()); - for (vtkIdType i = 0; i < numPoints; ++i) - { - auto pt = ptsPortal.Get(i); - float tuple[3] = { pt[0], pt[1], pt[2] }; - ptsArray->SetTypedTuple(i, tuple); - } -} - -inline void FieldCopy( - const vtkm::cont::ArrayHandle& src, const char* name, vtkFloatArray* dst) -{ - auto portal = src.GetPortalConstControl(); - vtkm::Id length = portal.GetNumberOfValues(); - - dst->SetName(name); - dst->SetNumberOfComponents(1); - dst->SetNumberOfTuples(length); - for (vtkm::Id i = 0; i < length; ++i) - { - dst->SetValue(i, portal.Get(i)); - } -} - -//----------------------------------------------------------------------------- -vtkm::cont::testing::MakeTestDataSet Maker; - -void TestUniformDataSet() -{ - auto dataset = Maker.Make3DUniformDataSet0(); - auto coords = - dataset.GetCoordinateSystem().GetData().Cast(); - auto portal = coords.GetPortalConstControl(); - auto dims = portal.GetDimensions(); - auto origin = portal.GetOrigin(); - auto spacing = portal.GetSpacing(); - - vtkNew pointField, cellField; - FieldCopy(dataset.GetField("pointvar").GetData().Cast >(), - "pointvar", pointField); - FieldCopy(dataset.GetField("cellvar").GetData().Cast >(), - "cellvar", cellField); - - vtkNew imageData; - imageData->SetDimensions(dims[0], dims[1], dims[2]); - imageData->SetOrigin(origin[0], origin[1], origin[2]); - imageData->SetSpacing(spacing[0], spacing[1], spacing[2]); - imageData->GetPointData()->AddArray(pointField); - imageData->GetCellData()->AddArray(cellField); - - vtkNew voxToHex; - voxToHex->SetInputData(imageData); - voxToHex->Update(); - - auto dsVtk = voxToHex->GetOutput(); - - vtkNew dsVtkm; - dsVtkm->SetVtkmDataSet(dataset); - - TestDataSets(dsVtk, dsVtkm); -} - -void TestCurvilinearDataSet() -{ - auto dataset = Maker.Make3DRegularDataSet0(); - auto dims = dataset.GetCellSet().Cast >().GetPointDimensions(); - - vtkNew points; - CoordsCopy(dataset.GetCoordinateSystem(), points); - - vtkNew pointField, cellField; - FieldCopy(dataset.GetField("pointvar").GetData().Cast >(), - "pointvar", pointField); - FieldCopy(dataset.GetField("cellvar").GetData().Cast >(), - "cellvar", cellField); - - vtkNew dsVtk; - dsVtk->SetDimensions(dims[0], dims[1], dims[2]); - dsVtk->SetPoints(points); - dsVtk->GetPointData()->AddArray(pointField); - dsVtk->GetCellData()->AddArray(cellField); - - vtkNew dsVtkm; - dsVtkm->SetVtkmDataSet(dataset); - - TestDataSets(dsVtk, dsVtkm); -} - -void TestExplicitDataSet() -{ - auto dataset = Maker.Make3DExplicitDataSetZoo(); - - vtkNew points; - CoordsCopy(dataset.GetCoordinateSystem(), points); - - auto& cellset = *dataset.GetCellSet().GetCellSetBase(); - vtkm::Id numCells = cellset.GetNumberOfCells(); - - vtkNew shapes; - vtkNew connectivity; - shapes->SetNumberOfComponents(1); - shapes->SetNumberOfTuples(numCells); - for (vtkm::Id i = 0; i < numCells; ++i) - { - shapes->SetValue(i, cellset.GetCellShape(i)); - - vtkIdType ptIds[8]; - int count = cellset.GetNumberOfPointsInCell(i); - cellset.GetCellPointIds(i, ptIds); - connectivity->InsertNextCell(count, ptIds); - } - - vtkNew pointField, cellField; - FieldCopy(dataset.GetField("pointvar").GetData().Cast >(), - "pointvar", pointField); - FieldCopy(dataset.GetField("cellvar").GetData().Cast >(), - "cellvar", cellField); - - vtkNew dsVtk; - dsVtk->SetPoints(points); - dsVtk->SetCells(shapes, connectivity); - dsVtk->GetPointData()->AddArray(pointField); - dsVtk->GetCellData()->AddArray(cellField); - - vtkNew dsVtkm; - dsVtkm->SetVtkmDataSet(dataset); - - TestDataSets(dsVtk, dsVtkm); -} - -} // anonymous namespace - -//----------------------------------------------------------------------------- -int TestVTKMDataSet(int, char*[]) -try -{ - std::cout << "Testing Uniform DataSet\n"; - TestUniformDataSet(); - std::cout << "Passed\n"; - - std::cout << "Testing Curvilinear DataSet\n"; - TestCurvilinearDataSet(); - std::cout << "Passed\n"; - - std::cout << "Testing Explicit DataSet\n"; - TestExplicitDataSet(); - std::cout << "Passed\n"; - - return EXIT_SUCCESS; -} -catch (const TestError& e) -{ - e.PrintMessage(std::cout); - return 1; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMExtractVOI.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMExtractVOI.cxx deleted file mode 100644 index b465ba343..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMExtractVOI.cxx +++ /dev/null @@ -1,84 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestVTKMExtractVOI.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkmExtractVOI.h" - -#include "vtkActor.h" -#include "vtkDataSetSurfaceFilter.h" -#include "vtkNew.h" -#include "vtkPolyDataMapper.h" -#include "vtkRTAnalyticSource.h" -#include "vtkRegressionTestImage.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkSphereSource.h" -#include "vtkTriangleFilter.h" - -#include "vtkImageData.h" - -int TestVTKMExtractVOI(int argc, char* argv[]) -{ - vtkNew sphere; - sphere->SetRadius(2.0); - - vtkNew sphereMapper; - sphereMapper->SetInputConnection(sphere->GetOutputPort()); - - vtkNew sphereActor; - sphereActor->SetMapper(sphereMapper); - - vtkNew rt; - rt->SetWholeExtent(-50, 50, -50, 50, 0, 0); - - vtkNew voi; - voi->SetInputConnection(rt->GetOutputPort()); - voi->SetVOI(-11, 39, 5, 45, 0, 0); - voi->SetSampleRate(5, 5, 1); - - // Get rid of ambiguous triagulation issues. - vtkNew surf; - surf->SetInputConnection(voi->GetOutputPort()); - - vtkNew tris; - tris->SetInputConnection(surf->GetOutputPort()); - - vtkNew mapper; - mapper->SetInputConnection(tris->GetOutputPort()); - mapper->SetScalarRange(130, 280); - - vtkNew actor; - actor->SetMapper(mapper); - - vtkNew renderer; - renderer->AddActor(actor); - renderer->AddActor(sphereActor); - renderer->ResetCamera(); - - vtkNew renWin; - renWin->AddRenderer(renderer); - - vtkNew iren; - iren->SetRenderWindow(renWin); - iren->Initialize(); - - renWin->Render(); - int retVal = vtkRegressionTestImage(renWin); - if (retVal == vtkRegressionTester::DO_INTERACTOR) - { - iren->Start(); - } - - return !retVal; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMGradient.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMGradient.cxx deleted file mode 100644 index 832e8fa8c..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMGradient.cxx +++ /dev/null @@ -1,322 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestGradientAndVorticity.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*---------------------------------------------------------------------------- - Copyright (c) Sandia Corporation - See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. -----------------------------------------------------------------------------*/ - -#include "vtkArrayCalculator.h" -#include "vtkCell.h" -#include "vtkCellData.h" -#include "vtkDoubleArray.h" -#include "vtkImageData.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkRTAnalyticSource.h" -#include "vtkUnstructuredGrid.h" -#include "vtkmCleanGrid.h" -#include "vtkmGradient.h" - -#include - -#include - -namespace -{ -double Tolerance = 0.00001; - -//----------------------------------------------------------------------------- -int IsGradientCorrect(vtkDoubleArray* gradients, vtkDoubleArray* correct) -{ - int numberOfComponents = gradients->GetNumberOfComponents(); - for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) - { - bool invalid = false; - for (int j = 0; j < numberOfComponents; j++) - { - double value = gradients->GetTypedComponent(i, j); - double expected = correct->GetTypedComponent(i, j); - - if ((value - expected) > Tolerance) - { - invalid = true; - } - } - - if (invalid) - { - std::vector values; - values.resize(numberOfComponents); - std::vector expected; - expected.resize(numberOfComponents); - - gradients->GetTypedTuple(i, values.data()); - correct->GetTypedTuple(i, expected.data()); - - std::cout << "Gradient[ " << i << " ] should look like: " << std::endl; - std::cout << expected[0] << ", " << expected[1] << ", " << expected[2] << std::endl; - if (numberOfComponents > 3) - { - std::cout << expected[3] << ", " << expected[4] << ", " << expected[5] << std::endl; - std::cout << expected[6] << ", " << expected[7] << ", " << expected[8] << std::endl; - } - - std::cout << "Gradient[ " << i << " ] actually looks like: " << std::endl; - std::cout << values[0] << ", " << values[1] << ", " << values[2] << std::endl; - if (numberOfComponents > 3) - { - std::cout << values[3] << ", " << values[4] << ", " << values[5] << std::endl; - std::cout << values[6] << ", " << values[7] << ", " << values[8] << std::endl; - } - std::cout << std::endl; - } - - if (i > 10 && invalid) - { - return 0; - } - } - return 1; -} - -//----------------------------------------------------------------------------- -// we assume that the gradients are correct and so we can compute the "real" -// vorticity from it -int IsVorticityCorrect(vtkDoubleArray* gradients, vtkDoubleArray* vorticity) -{ - if (gradients->GetNumberOfComponents() != 9 || vorticity->GetNumberOfComponents() != 3) - { - vtkGenericWarningMacro("Bad number of components."); - return 0; - } - for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) - { - double* g = gradients->GetTuple(i); - double* v = vorticity->GetTuple(i); - if (!test_equal(v[0], g[7] - g[5])) - { - vtkGenericWarningMacro("Bad vorticity[0] value " - << v[0] << " " << g[7] - g[5] << " difference is " << (v[0] - g[7] + g[5])); - return 0; - } - else if (!test_equal(v[1], g[2] - g[6])) - { - vtkGenericWarningMacro("Bad vorticity[1] value " - << v[1] << " " << g[2] - g[6] << " difference is " << (v[1] - g[2] + g[6])); - return 0; - } - else if (!test_equal(v[2], g[3] - g[1])) - { - vtkGenericWarningMacro("Bad vorticity[2] value " - << v[2] << " " << g[3] - g[1] << " difference is " << (v[2] - g[3] + g[1])); - return 0; - } - } - - return 1; -} - -//----------------------------------------------------------------------------- -// we assume that the gradients are correct and so we can compute the "real" -// Q criterion from it -int IsQCriterionCorrect(vtkDoubleArray* gradients, vtkDoubleArray* qCriterion) -{ - if (gradients->GetNumberOfComponents() != 9 || qCriterion->GetNumberOfComponents() != 1) - { - vtkGenericWarningMacro("Bad number of components."); - return 0; - } - for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) - { - double* g = gradients->GetTuple(i); - double qc = qCriterion->GetValue(i); - - double t1 = .25 * - ((g[7] - g[5]) * (g[7] - g[5]) + (g[3] - g[1]) * (g[3] - g[1]) + - (g[2] - g[6]) * (g[2] - g[6])); - double t2 = .5 * - (g[0] * g[0] + g[4] * g[4] + g[8] * g[8] + - .5 * - ((g[3] + g[1]) * (g[3] + g[1]) + (g[6] + g[2]) * (g[6] + g[2]) + - (g[7] + g[5]) * (g[7] + g[5]))); - - if (!test_equal(qc, t1 - t2)) - { - vtkGenericWarningMacro( - "Bad Q-criterion value " << qc << " " << t1 - t2 << " difference is " << (qc - t1 + t2)); - return 0; - } - } - - return 1; -} - -//----------------------------------------------------------------------------- -// we assume that the gradients are correct and so we can compute the "real" -// divergence from it -int IsDivergenceCorrect(vtkDoubleArray* gradients, vtkDoubleArray* divergence) -{ - if (gradients->GetNumberOfComponents() != 9 || divergence->GetNumberOfComponents() != 1) - { - vtkGenericWarningMacro("Bad number of components."); - return 0; - } - for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) - { - double* g = gradients->GetTuple(i); - double div = divergence->GetValue(i); - double gValue = g[0] + g[4] + g[8]; - - if (!test_equal(div, gValue)) - { - vtkGenericWarningMacro( - "Bad divergence value " << div << " " << gValue << " difference is " << (div - gValue)); - return 0; - } - } - - return 1; -} - -//----------------------------------------------------------------------------- -int PerformTest(vtkDataSet* grid) -{ - // Cleaning out the existing field data so that I can replace it with - // an analytic function that I know the gradient of - grid->GetPointData()->Initialize(); - const char fieldName[] = "LinearField"; - - vtkNew calculator; - calculator->SetInputData(grid); - calculator->SetResultArrayName(fieldName); - calculator->SetFunction("coordsY*iHat+coordsX*jHat+coordsZ*kHat"); - calculator->SetAttributeTypeToPointData(); - calculator->AddCoordinateScalarVariable("coordsX", 0); - calculator->AddCoordinateScalarVariable("coordsY", 1); - calculator->AddCoordinateScalarVariable("coordsZ", 2); - - const char resultName[] = "Result"; - - vtkNew pointGradients; - pointGradients->SetInputConnection(calculator->GetOutputPort()); - pointGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); - pointGradients->SetResultArrayName(resultName); - - vtkNew correctPointGradients; - correctPointGradients->SetInputConnection(calculator->GetOutputPort()); - correctPointGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); - correctPointGradients->SetResultArrayName(resultName); - - pointGradients->Update(); - correctPointGradients->Update(); - - vtkDoubleArray* gradPointArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(pointGradients->GetOutput())->GetPointData()->GetArray(resultName)); - - vtkDoubleArray* correctPointArray = - vtkArrayDownCast(vtkDataSet::SafeDownCast(correctPointGradients->GetOutput()) - ->GetPointData() - ->GetArray(resultName)); - - if (!IsGradientCorrect(gradPointArray, correctPointArray)) - { - return EXIT_FAILURE; - } - - vtkNew pointVorticity; - pointVorticity->SetInputConnection(calculator->GetOutputPort()); - pointVorticity->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); - pointVorticity->SetResultArrayName(resultName); - pointVorticity->SetComputeVorticity(1); - pointVorticity->SetComputeQCriterion(1); - pointVorticity->SetComputeDivergence(1); - pointVorticity->Update(); - - // point stuff - vtkDoubleArray* vorticityPointArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Vorticity")); - if (!IsVorticityCorrect(gradPointArray, vorticityPointArray)) - { - return EXIT_FAILURE; - } - - vtkDoubleArray* divergencePointArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Divergence")); - if (!IsDivergenceCorrect(gradPointArray, divergencePointArray)) - { - return EXIT_FAILURE; - } - - vtkDoubleArray* qCriterionPointArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Q-criterion")); - if (!IsQCriterionCorrect(gradPointArray, qCriterionPointArray)) - { - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} -} // end local namespace - -//----------------------------------------------------------------------------- -int TestVTKMGradient(int /* argc */, char* /* argv */[]) -{ - vtkDataSet* grid = nullptr; - - vtkNew wavelet; - wavelet->SetWholeExtent(-10, 10, -10, 10, -10, 10); - wavelet->SetCenter(0, 0, 0); - wavelet->Update(); - - grid = vtkDataSet::SafeDownCast(wavelet->GetOutput()); - - if (PerformTest(grid)) - { - return EXIT_FAILURE; - } - - // convert the structured grid to an unstructured grid - vtkNew ug; - ug->SetInputConnection(wavelet->GetOutputPort()); - ug->Update(); - - grid = vtkDataSet::SafeDownCast(ug->GetOutput()); - if (PerformTest(grid)) - { - return EXIT_FAILURE; - } - - // now try with 2D wavelets - wavelet->SetWholeExtent(-10, 10, -10, 10, 0, 0); - wavelet->SetCenter(0, 0, 0); - wavelet->Update(); - - grid = vtkDataSet::SafeDownCast(wavelet->GetOutput()); - if (PerformTest(grid)) - { - return EXIT_FAILURE; - } - - // convert the 2D structured grid to an unstructured grid - ug->Update(); - - grid = vtkDataSet::SafeDownCast(ug->GetOutput()); - if (PerformTest(grid)) - { - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMGradientAndVorticity.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMGradientAndVorticity.cxx deleted file mode 100644 index 69c1626dc..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMGradientAndVorticity.cxx +++ /dev/null @@ -1,412 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestGradientAndVorticity.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*---------------------------------------------------------------------------- - Copyright (c) Sandia Corporation - See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. -----------------------------------------------------------------------------*/ - -#include "vtkArrayCalculator.h" -#include "vtkCell.h" -#include "vtkCellData.h" -#include "vtkDoubleArray.h" -#include "vtkPointData.h" -#include "vtkSmartPointer.h" -#include "vtkStdString.h" -#include "vtkStructuredGrid.h" -#include "vtkStructuredGridReader.h" -#include "vtkUnstructuredGrid.h" -#include "vtkUnstructuredGridReader.h" -#include "vtkmGradient.h" - -#include -#include - -#define VTK_CREATE(type, var) vtkSmartPointer var = vtkSmartPointer::New() - -// The 3D cell with the maximum number of points is VTK_LAGRANGE_HEXAHEDRON. -// We support up to 6th order hexahedra. -#define VTK_MAXIMUM_NUMBER_OF_POINTS 216 - -namespace -{ -double Tolerance = 0.00001; - -//----------------------------------------------------------------------------- -void CreateCellData(vtkDataSet* grid, int numberOfComponents, int offset, const char* arrayName) -{ - vtkIdType numberOfCells = grid->GetNumberOfCells(); - VTK_CREATE(vtkDoubleArray, array); - array->SetNumberOfComponents(numberOfComponents); - array->SetNumberOfTuples(numberOfCells); - std::vector tupleValues(numberOfComponents); - double point[3], parametricCenter[3], weights[VTK_MAXIMUM_NUMBER_OF_POINTS]; - for (vtkIdType i = 0; i < numberOfCells; i++) - { - vtkCell* cell = grid->GetCell(i); - cell->GetParametricCenter(parametricCenter); - int subId = 0; - cell->EvaluateLocation(subId, parametricCenter, point, weights); - for (int j = 0; j < numberOfComponents; j++) - { // +offset makes the curl/vorticity nonzero - tupleValues[j] = point[(j + offset) % 3]; - } - array->SetTypedTuple(i, &tupleValues[0]); - } - array->SetName(arrayName); - grid->GetCellData()->AddArray(array); -} - -//----------------------------------------------------------------------------- -void CreatePointData(vtkDataSet* grid, int numberOfComponents, int offset, const char* arrayName) -{ - vtkIdType numberOfPoints = grid->GetNumberOfPoints(); - VTK_CREATE(vtkDoubleArray, array); - array->SetNumberOfComponents(numberOfComponents); - array->SetNumberOfTuples(numberOfPoints); - std::vector tupleValues(numberOfComponents); - double point[3]; - for (vtkIdType i = 0; i < numberOfPoints; i++) - { - grid->GetPoint(i, point); - for (int j = 0; j < numberOfComponents; j++) - { // +offset makes the curl/vorticity nonzero - tupleValues[j] = point[(j + offset) % 3]; - } - array->SetTypedTuple(i, &tupleValues[0]); - } - array->SetName(arrayName); - grid->GetPointData()->AddArray(array); -} - -//----------------------------------------------------------------------------- -int IsGradientCorrect(vtkDoubleArray* gradients, vtkDoubleArray* correct) -{ - int numberOfComponents = gradients->GetNumberOfComponents(); - for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) - { - bool invalid = false; - for (int j = 0; j < numberOfComponents; j++) - { - double value = gradients->GetTypedComponent(i, j); - double expected = correct->GetTypedComponent(i, j); - - if ((value - expected) > Tolerance) - { - invalid = true; - } - } - - if (invalid) - { - std::vector values; - values.resize(numberOfComponents); - std::vector expected; - expected.resize(numberOfComponents); - - gradients->GetTypedTuple(i, values.data()); - correct->GetTypedTuple(i, expected.data()); - - std::cout << "Gradient[ i ] should look like: " << std::endl; - std::cout << expected[0] << ", " << expected[1] << ", " << expected[2] << std::endl; - if (numberOfComponents > 3) - { - std::cout << expected[3] << ", " << expected[4] << ", " << expected[5] << std::endl; - std::cout << expected[6] << ", " << expected[7] << ", " << expected[8] << std::endl; - } - - std::cout << "Gradient[ i ] actually looks like: " << std::endl; - std::cout << values[0] << ", " << values[1] << ", " << values[2] << std::endl; - if (numberOfComponents > 3) - { - std::cout << values[3] << ", " << values[4] << ", " << values[5] << std::endl; - std::cout << values[6] << ", " << values[7] << ", " << values[8] << std::endl; - } - std::cout << std::endl; - } - - if (i > 10 && invalid) - { - return 0; - } - } - return 1; -} - -//----------------------------------------------------------------------------- -// we assume that the gradients are correct and so we can compute the "real" -// vorticity from it -int IsVorticityCorrect(vtkDoubleArray* gradients, vtkDoubleArray* vorticity) -{ - if (gradients->GetNumberOfComponents() != 9 || vorticity->GetNumberOfComponents() != 3) - { - vtkGenericWarningMacro("Bad number of components."); - return 0; - } - for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) - { - double* g = gradients->GetTuple(i); - double* v = vorticity->GetTuple(i); - if (!test_equal(v[0], g[7] - g[5])) - { - vtkGenericWarningMacro("Bad vorticity[0] value " - << v[0] << " " << g[7] - g[5] << " difference is " << (v[0] - g[7] + g[5])); - return 0; - } - else if (!test_equal(v[1], g[2] - g[6])) - { - vtkGenericWarningMacro("Bad vorticity[1] value " - << v[1] << " " << g[2] - g[6] << " difference is " << (v[1] - g[2] + g[6])); - return 0; - } - else if (!test_equal(v[2], g[3] - g[1])) - { - vtkGenericWarningMacro("Bad vorticity[2] value " - << v[2] << " " << g[3] - g[1] << " difference is " << (v[2] - g[3] + g[1])); - return 0; - } - } - - return 1; -} - -//----------------------------------------------------------------------------- -// we assume that the gradients are correct and so we can compute the "real" -// Q criterion from it -int IsQCriterionCorrect(vtkDoubleArray* gradients, vtkDoubleArray* qCriterion) -{ - if (gradients->GetNumberOfComponents() != 9 || qCriterion->GetNumberOfComponents() != 1) - { - vtkGenericWarningMacro("Bad number of components."); - return 0; - } - for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) - { - double* g = gradients->GetTuple(i); - double qc = qCriterion->GetValue(i); - - double t1 = .25 * - ((g[7] - g[5]) * (g[7] - g[5]) + (g[3] - g[1]) * (g[3] - g[1]) + - (g[2] - g[6]) * (g[2] - g[6])); - double t2 = .5 * - (g[0] * g[0] + g[4] * g[4] + g[8] * g[8] + - .5 * - ((g[3] + g[1]) * (g[3] + g[1]) + (g[6] + g[2]) * (g[6] + g[2]) + - (g[7] + g[5]) * (g[7] + g[5]))); - - if (!test_equal(qc, t1 - t2)) - { - vtkGenericWarningMacro( - "Bad Q-criterion value " << qc << " " << t1 - t2 << " difference is " << (qc - t1 + t2)); - return 0; - } - } - - return 1; -} - -//----------------------------------------------------------------------------- -// we assume that the gradients are correct and so we can compute the "real" -// divergence from it -int IsDivergenceCorrect(vtkDoubleArray* gradients, vtkDoubleArray* divergence) -{ - if (gradients->GetNumberOfComponents() != 9 || divergence->GetNumberOfComponents() != 1) - { - vtkGenericWarningMacro("Bad number of components."); - return 0; - } - for (vtkIdType i = 0; i < gradients->GetNumberOfTuples(); i++) - { - double* g = gradients->GetTuple(i); - double div = divergence->GetValue(i); - double gValue = g[0] + g[4] + g[8]; - - if (!test_equal(div, gValue)) - { - vtkGenericWarningMacro( - "Bad divergence value " << div << " " << gValue << " difference is " << (div - gValue)); - return 0; - } - } - - return 1; -} - -//----------------------------------------------------------------------------- -int PerformTest(vtkDataSet* grid) -{ - // Cleaning out the existing field data so that I can replace it with - // an analytic function that I know the gradient of - grid->GetPointData()->Initialize(); - grid->GetCellData()->Initialize(); - const char fieldName[] = "LinearField"; - int offset = 1; - const int numberOfComponents = 3; - CreateCellData(grid, numberOfComponents, offset, fieldName); - CreatePointData(grid, numberOfComponents, offset, fieldName); - - const char resultName[] = "Result"; - - VTK_CREATE(vtkmGradient, cellGradients); - cellGradients->SetInputData(grid); - cellGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_CELLS, fieldName); - cellGradients->SetResultArrayName(resultName); - - VTK_CREATE(vtkGradientFilter, correctCellGradients); - correctCellGradients->SetInputData(grid); - correctCellGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_CELLS, fieldName); - correctCellGradients->SetResultArrayName(resultName); - - VTK_CREATE(vtkmGradient, pointGradients); - pointGradients->SetInputData(grid); - pointGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); - pointGradients->SetResultArrayName(resultName); - - VTK_CREATE(vtkGradientFilter, correctPointGradients); - correctPointGradients->SetInputData(grid); - correctPointGradients->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); - correctPointGradients->SetResultArrayName(resultName); - - cellGradients->Update(); - pointGradients->Update(); - - correctCellGradients->Update(); - correctPointGradients->Update(); - - vtkDoubleArray* gradCellArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(cellGradients->GetOutput())->GetCellData()->GetArray(resultName)); - - vtkDoubleArray* correctCellArray = - vtkArrayDownCast(vtkDataSet::SafeDownCast(correctCellGradients->GetOutput()) - ->GetCellData() - ->GetArray(resultName)); - - if (!grid->IsA("vtkStructuredGrid")) - { - // ignore cell gradients on structured grids as the version for - // VTK-m differs from VTK. Once VTK-m is able to do stencil based - // gradients for point and cells, we can enable this check. - if (!IsGradientCorrect(gradCellArray, correctCellArray)) - { - return EXIT_FAILURE; - } - } - - vtkDoubleArray* gradPointArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(pointGradients->GetOutput())->GetPointData()->GetArray(resultName)); - - vtkDoubleArray* correctPointArray = - vtkArrayDownCast(vtkDataSet::SafeDownCast(correctPointGradients->GetOutput()) - ->GetPointData() - ->GetArray(resultName)); - - if (!IsGradientCorrect(gradPointArray, correctPointArray)) - { - return EXIT_FAILURE; - } - - // now check on the vorticity calculations - VTK_CREATE(vtkmGradient, cellVorticity); - cellVorticity->SetInputData(grid); - cellVorticity->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_CELLS, fieldName); - cellVorticity->SetResultArrayName(resultName); - cellVorticity->SetComputeVorticity(1); - cellVorticity->Update(); - - VTK_CREATE(vtkmGradient, pointVorticity); - pointVorticity->SetInputData(grid); - pointVorticity->SetInputScalars(vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName); - pointVorticity->SetResultArrayName(resultName); - pointVorticity->SetComputeVorticity(1); - pointVorticity->SetComputeQCriterion(1); - pointVorticity->SetComputeDivergence(1); - pointVorticity->Update(); - - // cell stuff - vtkDoubleArray* vorticityCellArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(cellVorticity->GetOutput())->GetCellData()->GetArray("Vorticity")); - if (!IsVorticityCorrect(gradCellArray, vorticityCellArray)) - { - return EXIT_FAILURE; - } - - // point stuff - vtkDoubleArray* vorticityPointArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Vorticity")); - if (!IsVorticityCorrect(gradPointArray, vorticityPointArray)) - { - return EXIT_FAILURE; - } - - vtkDoubleArray* divergencePointArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Divergence")); - if (!IsDivergenceCorrect(gradPointArray, divergencePointArray)) - { - return EXIT_FAILURE; - } - - vtkDoubleArray* qCriterionPointArray = vtkArrayDownCast( - vtkDataSet::SafeDownCast(pointVorticity->GetOutput())->GetPointData()->GetArray("Q-criterion")); - if (!IsQCriterionCorrect(gradPointArray, qCriterionPointArray)) - { - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} -} // end local namespace - -//----------------------------------------------------------------------------- -int TestVTKMGradientAndVorticity(int argc, char* argv[]) -{ - int i; - // Need to get the data root. - const char* data_root = nullptr; - for (i = 0; i < argc - 1; i++) - { - if (strcmp("-D", argv[i]) == 0) - { - data_root = argv[i + 1]; - break; - } - } - if (!data_root) - { - vtkGenericWarningMacro("Need to specify the directory to VTK_DATA_ROOT with -D ."); - return EXIT_FAILURE; - } - - vtkStdString filename(std::string(data_root) + "/Data/SampleStructGrid.vtk"); - VTK_CREATE(vtkStructuredGridReader, structuredGridReader); - structuredGridReader->SetFileName(filename.c_str()); - structuredGridReader->Update(); - vtkDataSet* grid = vtkDataSet::SafeDownCast(structuredGridReader->GetOutput()); - - if (PerformTest(grid)) - { - return EXIT_FAILURE; - } - - // convert the structured grid to an unstructured grid - VTK_CREATE(vtkUnstructuredGrid, ug); - ug->SetPoints(vtkStructuredGrid::SafeDownCast(grid)->GetPoints()); - ug->Allocate(grid->GetNumberOfCells()); - for (vtkIdType id = 0; id < grid->GetNumberOfCells(); id++) - { - vtkCell* cell = grid->GetCell(id); - ug->InsertNextCell(cell->GetCellType(), cell->GetPointIds()); - } - - return PerformTest(ug); -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMLevelOfDetail.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMLevelOfDetail.cxx deleted file mode 100644 index 71752d176..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMLevelOfDetail.cxx +++ /dev/null @@ -1,507 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestThreshold.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ - -// Uncomment this to directly compare serial and TBB versions -// #define FORCE_VTKM_DEVICE - -// TODO: Make a way to force the VTK-m device without actually loading VTK-m -// headers (and all subsequent dependent headers). - -#include "vtkActor.h" -#include "vtkCamera.h" -#include "vtkCellArray.h" -#include "vtkCellData.h" -#include "vtkContourFilter.h" -#include "vtkDataSetMapper.h" -#include "vtkDataSetSurfaceFilter.h" -#include "vtkMaskPoints.h" -#include "vtkNew.h" -#include "vtkPLYReader.h" -#include "vtkPNGWriter.h" -#include "vtkPointData.h" -#include "vtkPoints.h" -#include "vtkPolyData.h" -#include "vtkPolyDataMapper.h" -#include "vtkProperty.h" -#include "vtkQuadricClustering.h" -#include "vtkRTAnalyticSource.h" -#include "vtkRegressionTestImage.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkSmartPointer.h" -#include "vtkTestUtilities.h" -#include "vtkTextActor.h" -#include "vtkTextProperty.h" -#include "vtkTimerLog.h" -#include "vtkTriangleFilter.h" -#include "vtkWindowToImageFilter.h" -#include "vtkXMLPolyDataReader.h" -#include "vtkmLevelOfDetail.h" - -#ifdef FORCE_VTKM_DEVICE - -#include - -#include -#include - -#endif // FORCE_VTKM_DEVICE - -#include -#include - -/* - * This test has benchmarking code as well as a unit test. - * - * To run the benchmarks, add a "Benchmark" argument when invoking this test. - * - * By default, a wavelet is generated and used to time the filter's execution. - * By setting the LUCY_PATH define below to the path to lucy.ply (or any other - * ply file), other datasets can be used during benchmarking. - * - * The benchmark will print out timing information comparing vtkmLevelOfDetail - * to vtkQuadricClustering, and also generate side-by-side renderings of each - * algorithm for various grid dimensions. These images are written to the - * working directory can be combined into a summary image by running - * imagemagick's convert utility: - * - * convert LOD_0* -append summary.png - */ - -//#define LUCY_PATH "/prm/lucy.ply" - -namespace -{ - -const static int NUM_SAMPLES = 1; -const static int FONT_SIZE = 30; - -struct VTKmFilterGenerator -{ - using FilterType = vtkmLevelOfDetail; - - int GridSize; - - VTKmFilterGenerator(int gridSize) - : GridSize(gridSize) - { - } - - FilterType* operator()() const - { - FilterType* filter = FilterType::New(); - filter->SetNumberOfDivisions(this->GridSize, this->GridSize, this->GridSize); - return filter; - } - - vtkSmartPointer Result; -}; - -struct VTKFilterGenerator -{ - using FilterType = vtkQuadricClustering; - - int GridSize; - bool UseInputPoints; - vtkSmartPointer Result; - - VTKFilterGenerator(int gridSize, bool useInputPoints) - : GridSize(gridSize) - , UseInputPoints(useInputPoints) - { - } - - FilterType* operator()() const - { - FilterType* filter = FilterType::New(); - filter->SetNumberOfDivisions(this->GridSize, this->GridSize, this->GridSize); - - // Mimic PV's GeometeryRepresentation decimator settings: - filter->SetAutoAdjustNumberOfDivisions(0); - filter->SetUseInternalTriangles(0); - filter->SetCopyCellData(1); - filter->SetUseInputPoints(this->UseInputPoints ? 1 : 0); - - return filter; - } -}; - -template -double BenchmarkFilter(FilterGenerator& filterGen, vtkPolyData* input) -{ - using FilterType = typename FilterGenerator::FilterType; - - vtkNew timer; - double result = 0.f; - - for (int i = 0; i < NUM_SAMPLES; ++i) - { - FilterType* filter = filterGen(); - filter->SetInputData(input); - - timer->StartTimer(); - filter->Update(); - timer->StopTimer(); - - result += timer->GetElapsedTime(); - filterGen.Result = filter->GetOutput(); - filter->Delete(); - } - - return result / static_cast(NUM_SAMPLES); -} - -void RenderResults(int gridSize, vtkPolyData* input, double vtkmTime, vtkPolyData* vtkmData, - double vtkTime, vtkPolyData* vtkData) -{ - double modelColor[3] = { 1., 1., 1. }; - double bgColor[3] = { .75, .75, .75 }; - double textColor[3] = { 0., 0., 0. }; - - vtkNew vtkRen; - { - vtkRen->SetViewport(0., 0., 0.5, 1.); - vtkRen->SetBackground(bgColor); - - vtkNew mapper; - mapper->SetInputData(vtkData); - vtkNew actor; - actor->SetMapper(mapper); - actor->GetProperty()->SetRepresentationToSurface(); - actor->GetProperty()->SetColor(modelColor); - vtkRen->AddActor(actor); - - std::ostringstream tmp; - tmp << "VTK: " << std::setprecision(3) << vtkTime << "s\n" - << "NumPts: " << vtkData->GetNumberOfPoints() << "\n" - << "NumTri: " << vtkData->GetNumberOfCells() << "\n"; - - vtkNew timeText; - timeText->SetInput(tmp.str().c_str()); - timeText->GetTextProperty()->SetJustificationToCentered(); - timeText->GetTextProperty()->SetColor(textColor); - timeText->GetTextProperty()->SetFontSize(FONT_SIZE); - timeText->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); - timeText->GetPositionCoordinate()->SetValue(0.5, 0.01); - vtkRen->AddActor(timeText); - } - - vtkNew vtkmRen; - { - vtkmRen->SetViewport(0.5, 0., 1., 1.); - vtkmRen->SetBackground(bgColor); - - vtkNew mapper; - mapper->SetInputData(vtkmData); - vtkNew actor; - actor->SetMapper(mapper); - actor->GetProperty()->SetRepresentationToSurface(); - actor->GetProperty()->SetColor(modelColor); - vtkmRen->AddActor(actor); - - std::ostringstream tmp; - tmp << "VTK-m: " << std::setprecision(3) << vtkmTime << "s\n" - << "NumPts: " << vtkmData->GetNumberOfPoints() << "\n" - << "NumTri: " << vtkmData->GetNumberOfCells() << "\n"; - - vtkNew timeText; - timeText->SetInput(tmp.str().c_str()); - timeText->GetTextProperty()->SetJustificationToCentered(); - timeText->GetTextProperty()->SetColor(textColor); - timeText->GetTextProperty()->SetFontSize(FONT_SIZE); - timeText->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); - timeText->GetPositionCoordinate()->SetValue(0.5, 0.01); - vtkmRen->AddActor(timeText); - } - - vtkNew metaRen; - { - metaRen->SetPreserveColorBuffer(1); - - std::ostringstream tmp; - tmp << gridSize << "x" << gridSize << "x" << gridSize << "\n" - << "InPts: " << input->GetNumberOfPoints() << "\n" - << "InTri: " << input->GetNumberOfCells() << "\n"; - - vtkNew gridText; - gridText->SetInput(tmp.str().c_str()); - gridText->GetTextProperty()->SetJustificationToCentered(); - gridText->GetTextProperty()->SetVerticalJustificationToTop(); - gridText->GetTextProperty()->SetColor(textColor); - gridText->GetTextProperty()->SetFontSize(FONT_SIZE); - gridText->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); - gridText->GetPositionCoordinate()->SetValue(0.5, 0.95); - metaRen->AddActor(gridText); - } - - vtkNew renWin; - renWin->SetSize(800, 400); - renWin->AddRenderer(vtkRen); - renWin->AddRenderer(vtkmRen); - renWin->AddRenderer(metaRen); - - renWin->Render(); - -#ifdef LUCY_PATH - vtkRen->GetActiveCamera()->SetPosition(0, 1, 0); - vtkRen->GetActiveCamera()->SetViewUp(0, 0, 1); - vtkRen->GetActiveCamera()->SetFocalPoint(0, 0, 0); -#endif - - vtkRen->ResetCamera(); - vtkRen->GetActiveCamera()->Zoom(2.0); - vtkmRen->SetActiveCamera(vtkRen->GetActiveCamera()); - renWin->Render(); - - vtkNew w2i; - w2i->SetInput(renWin); - - std::ostringstream tmp; - tmp << "LOD_" << std::setw(4) << std::setfill('0') << std::right << gridSize << ".png"; - - vtkNew png; - png->SetInputConnection(w2i->GetOutputPort()); - png->SetFileName(tmp.str().c_str()); - png->Write(); -} - -void RunBenchmark(int gridSize) -{ - // Prepare input dataset: - static vtkSmartPointer input; - if (!input) - { -#ifndef LUCY_PATH - vtkNew wavelet; - wavelet->SetXFreq(60); - wavelet->SetYFreq(30); - wavelet->SetZFreq(40); - wavelet->SetXMag(10); - wavelet->SetYMag(18); - wavelet->SetZMag(5); - wavelet->SetWholeExtent(-255, 256, -255, 256, -127, 128); - vtkNew contour; - contour->SetInputConnection(wavelet->GetOutputPort()); - contour->SetNumberOfContours(1); - contour->SetValue(0, 157.); - contour->Update(); - input = contour->GetOutput(); -#else - vtkNew reader; - reader->SetFileName(LUCY_PATH); - reader->Update(); - input = reader->GetOutput(); -#endif - } - -#ifdef FORCE_VTKM_DEVICE - - vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetRuntimeDeviceTracker(); - - // Run VTKm - vtkSmartPointer vtkmResultSerial; - double vtkmTimeSerial = 0.; - { - tracker.ForceDevice(vtkm::cont::DeviceAdapterTagSerial()); - VTKmFilterGenerator generator(gridSize); - vtkmTimeSerial = BenchmarkFilter(generator, input); - vtkmResultSerial = generator.Result; - tracker.Reset(); - } - -#ifdef VTKM_ENABLE_TBB - vtkSmartPointer vtkmResultTBB; - double vtkmTimeTBB = 0.; - bool tbbDeviceValid = tracker.CanRunOn(vtkm::cont::DeviceAdapterTagTBB()); - if (tbbDeviceValid) - { - tracker.ForceDevice(vtkm::cont::DeviceAdapterTagTBB()); - VTKmFilterGenerator generator(gridSize); - vtkmTimeTBB = BenchmarkFilter(generator, input); - vtkmResultTBB = generator.Result; - tracker.Reset(); - } -#endif // VTKM_ENABLE_TBB - -#else // !FORCE_VTKM_DEVICE - - // Run VTKm - vtkSmartPointer vtkmResult; - double vtkmTime = 0.; - { - VTKmFilterGenerator generator(gridSize); - vtkmTime = BenchmarkFilter(generator, input); - vtkmResult = generator.Result; - } - -#endif - - // Run VTK -- average clustered points - vtkSmartPointer vtkResultAvePts; - double vtkTimeAvePts = 0.; - { - VTKFilterGenerator generator(gridSize, false); - vtkTimeAvePts = BenchmarkFilter(generator, input); - vtkResultAvePts = generator.Result; - } - - // Run VTK -- reuse input points - vtkSmartPointer vtkResult; - double vtkTime = 0.; - { - VTKFilterGenerator generator(gridSize, true); - vtkTime = BenchmarkFilter(generator, input); - vtkResult = generator.Result; - } - - std::cerr << "Results for a " << gridSize << "x" << gridSize << "x" << gridSize << " grid.\n" - << "Input dataset has " << input->GetNumberOfPoints() - << " points " - "and " - << input->GetNumberOfCells() << " cells.\n"; - -#ifdef FORCE_VTKM_DEVICE - - std::cerr << "vtkmLevelOfDetail (serial, average clustered points): " << vtkmTimeSerial - << " seconds, " << vtkmResultSerial->GetNumberOfPoints() << " points, " - << vtkmResultSerial->GetNumberOfCells() << " cells.\n"; - -#ifdef VTKM_ENABLE_TBB - if (tbbDeviceValid) - { - std::cerr << "vtkmLevelOfDetail (tbb, average clustered points): " << vtkmTimeTBB - << " seconds, " << vtkmResultTBB->GetNumberOfPoints() << " points, " - << vtkmResultTBB->GetNumberOfCells() << " cells.\n"; - } -#endif // VTKM_ENABLE_TBB - -#else // !FORCE_VTKM_DEVICE - - std::cerr << "vtkmLevelOfDetail (average clustered points): " << vtkmTime << " seconds, " - << vtkmResult->GetNumberOfPoints() << " points, " << vtkmResult->GetNumberOfCells() - << " cells.\n"; - -#endif // !FORCE_VTKM_DEVICE - - std::cerr << "vtkQuadricClustering (average clustered points): " << vtkTimeAvePts << " seconds, " - << vtkResultAvePts->GetNumberOfPoints() << " points, " - << vtkResultAvePts->GetNumberOfCells() << " cells.\n" - << "vtkQuadricClustering (reuse input points): " << vtkTime << " seconds, " - << vtkResult->GetNumberOfPoints() << " points, " << vtkResult->GetNumberOfCells() - << " cells.\n"; - -#ifdef FORCE_VTKM_DEVICE -#ifdef VTKM_ENABLE_TBB - RenderResults(gridSize, input, vtkmTimeTBB, vtkmResultTBB, vtkTime, vtkResult); -#endif // VTKM_ENABLE_TBB -#else // !FORCE_VTKM_DEVICE - RenderResults(gridSize, input, vtkmTime, vtkmResult, vtkTime, vtkResult); -#endif // !FORCE_VTKM_DEVICE -} - -void RunBenchmarks() -{ - RunBenchmark(32); - RunBenchmark(64); - RunBenchmark(128); - RunBenchmark(256); - RunBenchmark(512); -} - -} // end anon namespace - -int TestVTKMLevelOfDetail(int argc, char* argv[]) -{ - bool doBenchmarks = false; - - for (int i = 1; i < argc; ++i) - { - if (std::string("Benchmark") == argv[i]) - { - doBenchmarks = true; - break; - } - } - - if (doBenchmarks) - { - RunBenchmarks(); - return 0; - } - - vtkNew ren; - vtkNew renWin; - vtkNew iren; - - renWin->AddRenderer(ren); - iren->SetRenderWindow(renWin); - - //--------------------------------------------------- - // Load file and make only triangles - //--------------------------------------------------- - char* fname = vtkTestUtilities::ExpandDataFileName(argc, argv, "Data/cow.vtp"); - vtkNew reader; - reader->SetFileName(fname); - delete[] fname; - - vtkNew clean; - clean->SetInputConnection(reader->GetOutputPort()); - clean->Update(); - - //--------------------------------------------------- - // Test LOD filter 4 times - // We will setup 4 instances of the filter at different - // levels of subdivision to make sure it is working properly - //--------------------------------------------------- - - std::vector > levelOfDetails(4); - std::vector > surfaces(4); - std::vector > mappers(4); - std::vector > actors(4); - - for (int i = 0; i < 4; ++i) - { - levelOfDetails[i]->SetInputConnection(clean->GetOutputPort()); - // subdivision levels of 16, 32, 48, 64 - levelOfDetails[i]->SetNumberOfXDivisions(((i + 1) * 16)); - levelOfDetails[i]->SetNumberOfYDivisions(((i + 1) * 16)); - levelOfDetails[i]->SetNumberOfZDivisions(((i + 1) * 16)); - - surfaces[i]->SetInputConnection(levelOfDetails[i]->GetOutputPort()); - - mappers[i]->SetInputConnection(surfaces[i]->GetOutputPort()); - - actors[i]->SetMapper(mappers[i]); - actors[i]->SetPosition((i % 2) * 10, -(i / 2) * 10, 0); - - ren->AddActor(actors[i]); - } - - ren->SetBackground(0.1, 0.2, 0.4); - ren->ResetCamera(); - ren->GetActiveCamera()->Zoom(1.3); - renWin->SetSize(600, 600); - - renWin->Render(); - - int retVal = vtkRegressionTestImage(renWin); - if (retVal == vtkRegressionTester::DO_INTERACTOR) - { - iren->Start(); - retVal = vtkRegressionTester::PASSED; - } - return (!retVal); -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMNDHistogram.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMNDHistogram.cxx deleted file mode 100644 index 3ea4c777f..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMNDHistogram.cxx +++ /dev/null @@ -1,124 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestVTKMClip.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ - -#include "vtkmNDHistogram.h" - -#include "vtkActor.h" -#include "vtkArrayData.h" -#include "vtkCamera.h" -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkDelaunay3D.h" -#include "vtkDoubleArray.h" -#include "vtkImageData.h" -#include "vtkImageToPoints.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkSparseArray.h" -#include "vtkTable.h" - -namespace -{ -static const std::vector arrayNames = { "temperature0", "temperature1", "temperature2", - "temperature3" }; -static const std::vector > resultBins = { - { 0, 0, 1, 1, 2, 2, 3, 3 }, - { 0, 1, 1, 2, 2, 3, 3, 4 }, - { 0, 1, 2, 2, 3, 4, 4, 5 }, - { 0, 1, 2, 3, 3, 4, 5, 6 }, -}; -static const std::vector resultFrequency = { 2, 1, 1, 1, 1, 1, 1, 2 }; -static const int nData = 10; -static const std::vector bins = { 4, 5, 6, 7 }; -void AddArrayToVTKData( - std::string scalarName, vtkDataSetAttributes* pd, double* data, vtkIdType size) -{ - vtkNew scalars; - scalars->SetArray(data, size, 1); - scalars->SetName(scalarName.c_str()); - pd->AddArray(scalars); -} - -void MakeTestDataset(vtkDataSet* dataset) -{ - static double T0[nData], T1[nData], T2[nData], T3[nData]; - for (int i = 0; i < nData; i++) - { - T0[i] = i * 1.0; - T1[i] = i * 2.0; - T2[i] = i * 3.0; - T3[i] = i * 4.0; - } - - vtkPointData* pd = dataset->GetPointData(); - AddArrayToVTKData(arrayNames[0], pd, T0, static_cast(nData)); - AddArrayToVTKData(arrayNames[1], pd, T1, static_cast(nData)); - AddArrayToVTKData(arrayNames[2], pd, T2, static_cast(nData)); - AddArrayToVTKData(arrayNames[3], pd, T3, static_cast(nData)); -} -} - -int TestVTKMNDHistogram(int, char*[]) -{ - vtkNew ds; - MakeTestDataset(ds); - - vtkNew filter; - filter->SetInputData(ds); - size_t index = 0; - for (const auto& an : arrayNames) - { - filter->AddFieldAndBin(an, bins[index++]); - } - filter->Update(); - vtkArrayData* arrayData = filter->GetOutput(); - - assert(arrayData != nullptr); - // Valid the data range and bin delta - for (vtkIdType i = 0; i < 4; i++) - { - // Validate the delta and range - auto range = filter->GetDataRange(i); - double delta = filter->GetBinDelta(i); - if (range.first != 0.0 || range.second != (i + 1) * 9) - { - std::cout << "array index=" << i << " does not have right range" << std::endl; - return 1; - } - if (delta != ((range.second - range.first) / bins[i])) - { - std::cout << "array index" << i << " does not have right delta" << std::endl; - return 1; - } - } - vtkSparseArray* sa = static_cast*>(arrayData->GetArray(0)); - vtkArrayCoordinates coordinates; - const vtkIdType dimensions = sa->GetDimensions(); // 4 - const vtkIdType non_null_size = sa->GetNonNullSize(); // 8 - for (vtkIdType n = 0; n != non_null_size; ++n) - { - sa->GetCoordinatesN(n, coordinates); - for (vtkIdType d = 0; d != dimensions; ++d) - { - assert(coordinates[d] == static_cast(resultBins[d][n])); - if (coordinates[d] != static_cast(resultBins[d][n])) - { - std::cout << "value does not match at index " << n << " dimension " << d << std::endl; - } - } - assert(resultFrequency[n] == sa->GetValue(coordinates)); - } - return 0; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMPointElevation.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMPointElevation.cxx deleted file mode 100644 index 62aa3cc68..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMPointElevation.cxx +++ /dev/null @@ -1,113 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#include "vtkActor.h" -#include "vtkCamera.h" -#include "vtkDataSetSurfaceFilter.h" -#include "vtkFloatArray.h" -#include "vtkImageData.h" -#include "vtkMath.h" -#include "vtkNew.h" -#include "vtkPlaneSource.h" -#include "vtkPointData.h" -#include "vtkPoints.h" -#include "vtkPolyData.h" -#include "vtkPolyDataMapper.h" -#include "vtkProperty.h" -#include "vtkRegressionTestImage.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkTriangleFilter.h" -#include "vtkmPointElevation.h" - -namespace -{ -int RunVTKPipeline(vtkPlaneSource* plane, int argc, char* argv[]) -{ - vtkNew ren; - vtkNew renWin; - vtkNew iren; - - renWin->AddRenderer(ren); - iren->SetRenderWindow(renWin); - - vtkNew tf; - tf->SetInputConnection(plane->GetOutputPort()); - tf->Update(); - - vtkNew pd; - pd->CopyStructure(tf->GetOutput()); - vtkIdType numPts = pd->GetNumberOfPoints(); - vtkPoints* oldPts = tf->GetOutput()->GetPoints(); - vtkNew newPts; - newPts->SetNumberOfPoints(numPts); - for (vtkIdType i = 0; i < numPts; i++) - { - auto pt = oldPts->GetPoint(i); - auto r = sqrt(pow(pt[0], 2) + pow(pt[1], 2)); - auto z = 1.5 * cos(2 * r); - newPts->SetPoint(i, pt[0], pt[1], z); - } - pd->SetPoints(newPts); - - vtkNew pe; - pe->SetInputData(pd); - pe->SetLowPoint(0, 0, -1.5); - pe->SetHighPoint(0, 0, 1.5); - pe->SetScalarRange(-1.5, 1.5); - - vtkNew mapper; - mapper->SetInputConnection(pe->GetOutputPort()); - mapper->ScalarVisibilityOn(); - mapper->SelectColorArray("elevation"); - - vtkNew actor; - actor->SetMapper(mapper); - - // Add the actor to the renderer, set the background and size - ren->AddActor(actor); - - ren->SetBackground(0, 0, 0); - vtkNew camera; - camera->SetPosition(1, 50, 50); - ren->SetActiveCamera(camera); - renWin->Render(); - - int retVal = vtkRegressionTestImage(renWin); - if (retVal == vtkRegressionTester::DO_INTERACTOR) - { - iren->Start(); - retVal = vtkRegressionTester::PASSED; - } - return (!retVal); -} -} // Anonymous namespace - -int TestVTKMPointElevation(int argc, char* argv[]) -{ - // Create a plane source - vtkNew plane; - int res = 200; - plane->SetXResolution(res); - plane->SetYResolution(res); - plane->SetOrigin(-10, -10, 0); - plane->SetPoint1(10, -10, 0); - plane->SetPoint2(-10, 10, 0); - - // Run the pipeline - return RunVTKPipeline(plane, argc, argv); -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMPolyDataNormals.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMPolyDataNormals.cxx deleted file mode 100644 index a8c7ee367..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMPolyDataNormals.cxx +++ /dev/null @@ -1,153 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestVTKMExtractVOI.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkmPolyDataNormals.h" - -#include "vtkActor.h" -#include "vtkArrowSource.h" -#include "vtkCamera.h" -#include "vtkCellCenters.h" -#include "vtkCellData.h" -#include "vtkCleanPolyData.h" -#include "vtkCylinderSource.h" -#include "vtkGlyph3D.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPolyDataMapper.h" -#include "vtkProperty.h" -#include "vtkRegressionTestImage.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkSmartPointer.h" -#include "vtkTriangleFilter.h" - -namespace -{ - -void MakeInputDataSet(vtkPolyData* ds) -{ - vtkNew cylinder; - cylinder->SetRadius(1.0); - cylinder->SetResolution(8); - cylinder->CappingOn(); - - vtkNew triangle; - triangle->SetInputConnection(cylinder->GetOutputPort()); - - vtkNew clean; - clean->SetInputConnection(triangle->GetOutputPort()); - - clean->Update(); - - ds->ShallowCopy(clean->GetOutput()); - ds->GetPointData()->Initialize(); - ds->GetCellData()->Initialize(); -} - -} - -int TestVTKMPolyDataNormals(int argc, char* argv[]) -{ - vtkNew input; - MakeInputDataSet(input); - - vtkNew normals; - normals->SetInputData(input); - normals->ComputePointNormalsOn(); - normals->ComputeCellNormalsOn(); - normals->AutoOrientNormalsOn(); - normals->FlipNormalsOn(); - normals->ConsistencyOn(); - - // cylinder mapper and actor - vtkNew cylinderMapper; - cylinderMapper->SetInputData(input); - - vtkNew cylinderActor; - cylinderActor->SetMapper(cylinderMapper); - vtkSmartPointer cylinderProperty; - cylinderProperty.TakeReference(cylinderActor->MakeProperty()); - cylinderProperty->SetRepresentationToWireframe(); - cylinderProperty->SetColor(0.3, 0.3, 0.3); - cylinderActor->SetProperty(cylinderProperty); - - vtkNew arrow; - - // point normals - vtkNew pnGlyphs; - pnGlyphs->SetInputConnection(normals->GetOutputPort()); - pnGlyphs->SetSourceConnection(arrow->GetOutputPort()); - pnGlyphs->SetScaleFactor(0.5); - pnGlyphs->OrientOn(); - pnGlyphs->SetVectorModeToUseNormal(); - - vtkNew pnMapper; - pnMapper->SetInputConnection(pnGlyphs->GetOutputPort()); - - vtkNew pnActor; - pnActor->SetMapper(pnMapper); - - vtkNew pnRenderer; - pnRenderer->AddActor(cylinderActor); - pnRenderer->AddActor(pnActor); - pnRenderer->ResetCamera(); - pnRenderer->GetActiveCamera()->SetPosition(0.0, 4.5, 7.5); - pnRenderer->ResetCameraClippingRange(); - - // cell normals - vtkNew cells; - cells->SetInputConnection(normals->GetOutputPort()); - - vtkNew cnGlyphs; - cnGlyphs->SetInputConnection(cells->GetOutputPort()); - cnGlyphs->SetSourceConnection(arrow->GetOutputPort()); - cnGlyphs->SetScaleFactor(0.5); - cnGlyphs->OrientOn(); - cnGlyphs->SetVectorModeToUseNormal(); - - vtkNew cnMapper; - cnMapper->SetInputConnection(cnGlyphs->GetOutputPort()); - - vtkNew cnActor; - cnActor->SetMapper(cnMapper); - - vtkNew cnRenderer; - cnRenderer->AddActor(cylinderActor); - cnRenderer->AddActor(cnActor); - cnRenderer->ResetCamera(); - cnRenderer->GetActiveCamera()->SetPosition(0.0, 8.0, 0.1); - cnRenderer->ResetCameraClippingRange(); - - // render - vtkNew renWin; - renWin->SetSize(600, 300); - pnRenderer->SetViewport(0.0, 0.0, 0.5, 1.0); - renWin->AddRenderer(pnRenderer); - cnRenderer->SetViewport(0.5, 0.0, 1.0, 1.0); - renWin->AddRenderer(cnRenderer); - - vtkNew iren; - iren->SetRenderWindow(renWin); - iren->Initialize(); - - renWin->Render(); - int retVal = vtkRegressionTestImage(renWin); - if (retVal == vtkRegressionTester::DO_INTERACTOR) - { - iren->Start(); - } - - return !retVal; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMProbe.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMProbe.cxx deleted file mode 100644 index 494d8860b..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMProbe.cxx +++ /dev/null @@ -1,149 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#include "vtkCellData.h" -#include "vtkDataArray.h" -#include "vtkDataSet.h" -#include "vtkFloatArray.h" -#include "vtkImageData.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkmProbe.h" - -namespace -{ -static int inputDim = 9; -static int sourceDim = 4; -void populatePointAndCellArray(vtkFloatArray* pointArray, vtkFloatArray* cellArray) -{ - pointArray->SetNumberOfValues(sourceDim * sourceDim); - pointArray->SetName("pointdata"); - for (vtkIdType i = 0; i < static_cast(sourceDim * sourceDim); i++) - { - pointArray->SetValue(i, 0.3f * i); - } - cellArray->SetName("celldata"); - cellArray->SetNumberOfValues((sourceDim - 1) * (sourceDim - 1)); - for (vtkIdType i = 0; i < static_cast((sourceDim - 1) * (sourceDim - 1)); i++) - { - cellArray->SetValue(i, 0.7f * i); - } -} - -const std::vector& GetExpectedPointData() -{ - static std::vector expected = { - 1.05f, 1.155f, 1.26f, 1.365f, 1.47f, 1.575f, 1.68f, 0.0f, 0.0f, 1.47f, 1.575f, 1.68f, // - 1.785f, 1.89f, 1.995f, 2.1f, 0.0f, 0.0f, 1.89f, 1.995f, 2.1f, 2.205f, 2.31f, 2.415f, // - 2.52f, 0.0f, 0.0f, 2.31f, 2.415f, 2.52f, 2.625f, 2.73f, 2.835f, 2.94f, 0.0f, 0.0f, // - 2.73f, 2.835f, 2.94f, 3.045f, 3.15f, 3.255f, 3.36f, 0.0f, 0.0f, 3.15f, 3.255f, 3.36f, // - 3.465f, 3.57f, 3.675f, 3.78f, 0.0f, 0.0f, 3.57f, 3.675f, 3.78f, 3.885f, 3.99f, 4.095f, // - 4.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, // - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // - }; - return expected; -} - -const std::vector& GetExpectedCellData() -{ - static std::vector expected = { - 0.0f, 0.7f, 0.7f, 0.7f, 1.4f, 1.4f, 1.4f, 0.0f, 0.0f, 2.1f, 2.8f, 2.8f, 2.8f, 3.5f, // - 3.5f, 3.5f, 0.0f, 0.0f, 2.1f, 2.8f, 2.8f, 2.8f, 3.5f, 3.5f, 3.5f, 0.0f, 0.0f, 2.1f, // - 2.8f, 2.8f, 2.8f, 3.5f, 3.5f, 3.5f, 0.0f, 0.0f, 4.2f, 4.9f, 4.9f, 4.9f, 5.6f, 5.6f, // - 5.6f, 0.0f, 0.0f, 4.2f, 4.9f, 4.9f, 4.9f, 5.6f, 5.6f, 5.6f, 0.0f, 0.0f, 4.2f, 4.9f, // - 4.9f, 4.9f, 5.6f, 5.6f, 5.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, // - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // - }; - return expected; -} - -const std::vector& GetExpectedHiddenPoints() -{ - static std::vector expected = { - 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, // - 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, // - 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, // - 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, // - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 // - }; - return expected; -} - -const std::vector& GetExpectedHiddenCells() -{ - static std::vector expected = { - 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, // - 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, // - 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, // - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 // - }; - return expected; -} - -template -void TestResultArray(vtkDataArray* result, const std::vector& expected) -{ - if (result->GetNumberOfValues() != static_cast(expected.size())) - { - std::cout << "Array " << result->GetName() << " has wrong size" << std::endl; - } - assert(result->GetNumberOfValues() == static_cast(expected.size())); - - for (vtkIdType i = 0; i < result->GetNumberOfValues(); ++i) - { - if ((result->GetComponent(0, i) - expected[static_cast(i)]) > 1e-5) - { - std::cout << "Array " << result->GetName() << " has wrong value" - << " at index " << i << ". result value=" << result->GetComponent(0, i) - << " expected value=" << expected[static_cast(i)] << std::endl; - } - assert((result->GetComponent(0, i) - expected[static_cast(i)]) < 1e-5); - } -} - -} // Anonymous namespace - -int TestVTKMProbe(int, char*[]) -{ - vtkNew input; - input->SetOrigin(0.7, 0.7, 0.0); - input->SetSpacing(0.35, 0.35, 1.0); - input->SetExtent(0, inputDim - 1, 0, inputDim - 1, 0, 0); - - vtkNew source; - source->SetOrigin(0.0, 0.0, 0.0); - source->SetSpacing(1.0, 1.0, 1.0); - source->SetExtent(0, sourceDim - 1, 0, sourceDim - 1, 0, 0); - - vtkNew pointArray, cellArray; - populatePointAndCellArray(pointArray, cellArray); - source->GetPointData()->AddArray(pointArray); - source->GetCellData()->AddArray(cellArray); - - vtkNew probe; - probe->SetValidPointMaskArrayName("validPoint"); - probe->SetValidCellMaskArrayName("validCell"); - probe->SetInputData(input); - probe->SetSourceData(source); - probe->Update(); - - vtkDataSet* result = probe->GetOutput(); - TestResultArray(result->GetPointData()->GetArray(pointArray->GetName()), GetExpectedPointData()); - TestResultArray(result->GetCellData()->GetArray(cellArray->GetName()), GetExpectedCellData()); - TestResultArray(result->GetPointData()->GetArray("validPoint"), GetExpectedHiddenPoints()); - TestResultArray(result->GetCellData()->GetArray("validCell"), GetExpectedHiddenCells()); - return 0; -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMThreshold.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMThreshold.cxx deleted file mode 100644 index aea670a37..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMThreshold.cxx +++ /dev/null @@ -1,114 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#include "vtkActor.h" -#include "vtkDataSetSurfaceFilter.h" -#include "vtkFloatArray.h" -#include "vtkImageData.h" -#include "vtkMath.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPolyDataMapper.h" -#include "vtkProperty.h" -#include "vtkRegressionTestImage.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkThreshold.h" -#include "vtkTrivialProducer.h" -#include "vtkmThreshold.h" - -namespace -{ -void fillElevationArray(vtkFloatArray* elven, vtkImageData* grid) -{ - elven->SetName("Elevation"); - const vtkIdType size = grid->GetNumberOfPoints(); - elven->SetNumberOfValues(size); - double pos[3] = { 0, 0, 0 }; - for (vtkIdType i = 0; i < size; ++i) - { - grid->GetPoint(i, pos); - elven->SetValue(i, sqrt(vtkMath::Dot(pos, pos))); - } -} - -int RunVTKPipeline(vtkImageData* grid, int argc, char* argv[]) -{ - vtkNew ren; - vtkNew renWin; - vtkNew iren; - - renWin->AddRenderer(ren); - iren->SetRenderWindow(renWin); - - // compute an elevation array - vtkNew elevationPoints; - fillElevationArray(elevationPoints, grid); - grid->GetPointData()->AddArray(elevationPoints); - - vtkNew producer; - producer->SetOutput(grid); - - vtkNew threshold; - threshold->SetInputConnection(producer->GetOutputPort()); - threshold->SetPointsDataTypeToFloat(); - threshold->AllScalarsOn(); - threshold->ThresholdBetween(0, 100); - threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "Elevation"); - - vtkNew surface; - surface->SetInputConnection(threshold->GetOutputPort()); - - vtkNew mapper; - mapper->SetInputConnection(surface->GetOutputPort()); - mapper->ScalarVisibilityOn(); - mapper->SetScalarModeToUsePointFieldData(); - mapper->SelectColorArray("Elevation"); - mapper->SetScalarRange(0.0, 100.0); - - vtkNew actor; - actor->SetMapper(mapper); - actor->GetProperty()->SetAmbient(1.0); - actor->GetProperty()->SetDiffuse(0.0); - - ren->AddActor(actor); - ren->ResetCamera(); - renWin->Render(); - - int retVal = vtkRegressionTestImage(renWin); - if (retVal == vtkRegressionTester::DO_INTERACTOR) - { - iren->Start(); - retVal = vtkRegressionTester::PASSED; - } - return (!retVal); -} - -} // Anonymous namespace - -int TestVTKMThreshold(int argc, char* argv[]) -{ - // create the sample grid - vtkNew grid; - int dim = 128; - grid->SetOrigin(0.0, 0.0, 0.0); - grid->SetSpacing(1.0, 1.0, 1.0); - grid->SetExtent(0, dim - 1, 0, dim - 1, 0, dim - 1); - - // run the pipeline - return RunVTKPipeline(grid, argc, argv); -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMThreshold2.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMThreshold2.cxx deleted file mode 100644 index 6848a67ff..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMThreshold2.cxx +++ /dev/null @@ -1,88 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestThreshold.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ - -#include "vtkActor.h" -#include "vtkDataSetSurfaceFilter.h" -#include "vtkElevationFilter.h" -#include "vtkFloatArray.h" -#include "vtkImageData.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPolyDataMapper.h" -#include "vtkRTAnalyticSource.h" -#include "vtkRegressionTestImage.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkmThreshold.h" - -int TestVTKMThreshold2(int argc, char* argv[]) -{ - vtkNew ren; - vtkNew renWin; - vtkNew iren; - - renWin->AddRenderer(ren); - iren->SetRenderWindow(renWin); - - //--------------------------------------------------- - // Test using different thresholding methods - //--------------------------------------------------- - vtkNew source; - - vtkNew elevation; - elevation->SetInputConnection(source->GetOutputPort()); - elevation->SetScalarRange(0.0, 1.0); - elevation->SetLowPoint(-10.0, -10.0, -10.0); - elevation->SetHighPoint(10.0, 10.0, 10.0); - - vtkNew threshold; - threshold->SetInputConnection(elevation->GetOutputPort()); - threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "RTData"); - - double L = 100; - double U = 200; - threshold->ThresholdBetween(L, U); - threshold->SetAllScalars(0); - threshold->Update(); - - threshold->UseContinuousCellRangeOn(); - threshold->Update(); - - vtkNew surface; - surface->SetInputConnection(threshold->GetOutputPort()); - - vtkNew mapper; - mapper->SetInputConnection(surface->GetOutputPort()); - mapper->ScalarVisibilityOn(); - mapper->SetScalarModeToUsePointFieldData(); - mapper->SelectColorArray("Elevation"); - mapper->SetScalarRange(0.0, 1.0); - - vtkNew actor; - actor->SetMapper(mapper); - - ren->AddActor(actor); - ren->ResetCamera(); - renWin->Render(); - - int retVal = vtkRegressionTestImage(renWin); - if (retVal == vtkRegressionTester::DO_INTERACTOR) - { - iren->Start(); - retVal = vtkRegressionTester::PASSED; - } - return (!retVal); -} diff --git a/Accelerators/Vtkm/Testing/Cxx/TestVTKMTriangleMeshPointNormals.cxx b/Accelerators/Vtkm/Testing/Cxx/TestVTKMTriangleMeshPointNormals.cxx deleted file mode 100644 index 2a8cd3968..000000000 --- a/Accelerators/Vtkm/Testing/Cxx/TestVTKMTriangleMeshPointNormals.cxx +++ /dev/null @@ -1,109 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: TestVTKMTriangleMeshPointNormals.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. -=========================================================================*/ -#include "vtkActor.h" -#include "vtkArrowSource.h" -#include "vtkCamera.h" -#include "vtkCleanPolyData.h" -#include "vtkGlyph3D.h" -#include "vtkInteractorStyleTrackballCamera.h" -#include "vtkNew.h" -#include "vtkPolyDataMapper.h" -#include "vtkRegressionTestImage.h" -#include "vtkRenderWindow.h" -#include "vtkRenderWindowInteractor.h" -#include "vtkRenderer.h" -#include "vtkTesting.h" -#include "vtkTriangleFilter.h" -#include "vtkXMLPolyDataReader.h" -#include "vtkmTriangleMeshPointNormals.h" - -int TestVTKMTriangleMeshPointNormals(int argc, char* argv[]) -{ - vtkSmartPointer testHelper = vtkSmartPointer::New(); - testHelper->AddArguments(argc, argv); - if (!testHelper->IsFlagSpecified("-D")) - { - std::cerr << "Error: -D /path/to/data was not specified."; - return EXIT_FAILURE; - } - - std::string dataRoot = testHelper->GetDataRoot(); - std::string fileName = dataRoot + "/Data/cow.vtp"; - std::cout << fileName << std::endl; - - // reader - vtkNew reader; - reader->SetFileName(fileName.c_str()); - - // triangle filter - vtkNew triFilter; - triFilter->SetInputConnection(reader->GetOutputPort()); - - // cleaning filter - vtkNew cleanFilter; - cleanFilter->SetInputConnection(triFilter->GetOutputPort()); - - // normals - vtkNew normFilter; - normFilter->SetInputConnection(cleanFilter->GetOutputPort()); - - // mapper, actor - vtkNew mapper; - mapper->SetInputConnection(normFilter->GetOutputPort()); - vtkNew actor; - actor->SetMapper(mapper); - - // glyphs - vtkNew glyphsource; - vtkNew glyph; - glyph->SetInputConnection(normFilter->GetOutputPort()); - glyph->SetSourceConnection(glyphsource->GetOutputPort()); - glyph->SetVectorModeToUseNormal(); - glyph->SetColorModeToColorByVector(); - glyph->SetScaleModeToScaleByVector(); - glyph->SetScaleFactor(0.5); - vtkNew glyphmapper; - glyphmapper->SetInputConnection(glyph->GetOutputPort()); - vtkNew glyphactor; - glyphactor->SetMapper(glyphmapper); - - // renderer - vtkNew renderer; - renderer->AddActor(actor); - renderer->AddActor(glyphactor); - renderer->SetBackground(0.0, 0.0, 0.0); - renderer->ResetCamera(); - - // renderwindow, interactor - vtkNew renWin; - renWin->AddRenderer(renderer); - renWin->SetSize(300, 300); - renWin->SetMultiSamples(0); - vtkNew iren; - iren->SetRenderWindow(renWin); - - iren->Initialize(); - renWin->Render(); - - int retVal = vtkRegressionTestImage(renWin); - if (retVal == vtkRegressionTester::DO_INTERACTOR) - { - vtkNew iStyle; - iren->SetInteractorStyle(iStyle); - renWin->SetSize(1000, 1000); - iren->Start(); - } - - return !retVal; -} diff --git a/Accelerators/Vtkm/vtk.module b/Accelerators/Vtkm/vtk.module deleted file mode 100644 index 009bc87ef..000000000 --- a/Accelerators/Vtkm/vtk.module +++ /dev/null @@ -1,31 +0,0 @@ -NAME - VTK::AcceleratorsVTKm -LIBRARY_NAME - vtkAcceleratorsVTKm -DESCRIPTION - VTKm filters and algorithms -CONDITION - NOT CMAKE_VERSION VERSION_LESS "3.9.0" -DEPENDS - VTK::CommonCore - VTK::CommonDataModel - VTK::CommonExecutionModel - VTK::FiltersGeneral - VTK::FiltersGeometry - VTK::ImagingCore - VTK::vtkm -TEST_DEPENDS - VTK::CommonSystem - VTK::FiltersSources - VTK::IOImage - VTK::IOLegacy - VTK::IOPLY - VTK::IOXML - VTK::ImagingHybrid - VTK::ImagingSources - VTK::InteractionStyle - VTK::RenderingFreeType - VTK::RenderingOpenGL2 - VTK::RenderingVolumeOpenGL2 - VTK::TestingCore - VTK::TestingRendering diff --git a/Accelerators/Vtkm/vtkmAverageToCells.cxx b/Accelerators/Vtkm/vtkmAverageToCells.cxx deleted file mode 100644 index fb3c81037..000000000 --- a/Accelerators/Vtkm/vtkmAverageToCells.cxx +++ /dev/null @@ -1,102 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmAverageToCells.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkObjectFactory.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkmFilterPolicy.h" - -#include -#include - -vtkStandardNewMacro(vtkmAverageToCells); - -//------------------------------------------------------------------------------ -vtkmAverageToCells::vtkmAverageToCells() {} - -//------------------------------------------------------------------------------ -vtkmAverageToCells::~vtkmAverageToCells() {} - -//------------------------------------------------------------------------------ -int vtkmAverageToCells::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - output->ShallowCopy(input); - - // grab the input array to process to determine the field we want to average - int association = this->GetInputArrayAssociation(0, inputVector); - auto fieldArray = this->GetInputArrayToProcess(0, inputVector); - if (association != vtkDataObject::FIELD_ASSOCIATION_POINTS || fieldArray == nullptr || - fieldArray->GetName() == nullptr || fieldArray->GetName()[0] == '\0') - { - vtkErrorMacro(<< "Invalid field: Requires a point field with a valid name."); - return 0; - } - - const char* fieldName = fieldArray->GetName(); - - try - { - // convert the input dataset to a vtkm::cont::DataSet - vtkm::cont::DataSet in = tovtkm::Convert(input); - auto field = tovtkm::Convert(fieldArray, association); - in.AddField(field); - - vtkmInputFilterPolicy policy; - vtkm::filter::CellAverage filter; - filter.SetActiveField(fieldName, vtkm::cont::Field::Association::POINTS); - filter.SetOutputFieldName(fieldName); // should we expose this control? - - auto result = filter.Execute(in, policy); - - // convert back the dataset to VTK, and add the field as a cell field - vtkDataArray* resultingArray = fromvtkm::Convert(result.GetCellField(fieldName)); - if (resultingArray == nullptr) - { - vtkErrorMacro(<< "Unable to convert result array from VTK-m to VTK"); - return 0; - } - - output->GetCellData()->AddArray(resultingArray); - resultingArray->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmAverageToCells::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} diff --git a/Accelerators/Vtkm/vtkmAverageToCells.h b/Accelerators/Vtkm/vtkmAverageToCells.h deleted file mode 100644 index 7e922d849..000000000 --- a/Accelerators/Vtkm/vtkmAverageToCells.h +++ /dev/null @@ -1,53 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmAverageToPoints - * @brief Accelerated point to cell interpolation filter. - * - * vtkmAverageToPoints is a filter that transforms point data (i.e., data - * specified at cell points) into cell data (i.e., data specified per cell). - * The method of transformation is based on averaging the data - * values of all points used by particular cell. This filter will also - * pass through any existing point and cell arrays. - * - */ - -#ifndef vtkmAverageToCells_h -#define vtkmAverageToCells_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkDataSetAlgorithm.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmAverageToCells : public vtkDataSetAlgorithm -{ -public: - vtkTypeMacro(vtkmAverageToCells, vtkDataSetAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmAverageToCells* New(); - -protected: - vtkmAverageToCells(); - ~vtkmAverageToCells() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmAverageToCells(const vtkmAverageToCells&) = delete; - void operator=(const vtkmAverageToCells&) = delete; -}; - -#endif // vtkmAverageToCells_h -// VTK-HeaderTest-Exclude: vtkmAverageToCells.h diff --git a/Accelerators/Vtkm/vtkmAverageToPoints.cxx b/Accelerators/Vtkm/vtkmAverageToPoints.cxx deleted file mode 100644 index 10aa41bb2..000000000 --- a/Accelerators/Vtkm/vtkmAverageToPoints.cxx +++ /dev/null @@ -1,103 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmAverageToPoints.h" - -#include "vtkDataSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkNew.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkmFilterPolicy.h" - -#include -#include - -vtkStandardNewMacro(vtkmAverageToPoints); - -//------------------------------------------------------------------------------ -vtkmAverageToPoints::vtkmAverageToPoints() {} - -//------------------------------------------------------------------------------ -vtkmAverageToPoints::~vtkmAverageToPoints() {} - -//------------------------------------------------------------------------------ -int vtkmAverageToPoints::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - output->ShallowCopy(input); - - // grab the input array to process to determine the field we want to average - int association = this->GetInputArrayAssociation(0, inputVector); - auto fieldArray = this->GetInputArrayToProcess(0, inputVector); - if (association != vtkDataObject::FIELD_ASSOCIATION_CELLS || fieldArray == nullptr || - fieldArray->GetName() == nullptr || fieldArray->GetName()[0] == '\0') - { - vtkErrorMacro(<< "Invalid field: Requires a cell field with a valid name."); - return 0; - } - - const char* fieldName = fieldArray->GetName(); - - try - { - // convert the input dataset to a vtkm::cont::DataSet - vtkm::cont::DataSet in = tovtkm::Convert(input); - auto field = tovtkm::Convert(fieldArray, association); - in.AddField(field); - - vtkmInputFilterPolicy policy; - vtkm::filter::PointAverage filter; - filter.SetActiveField(fieldName, vtkm::cont::Field::Association::CELL_SET); - filter.SetOutputFieldName(fieldName); // should we expose this control? - - auto result = filter.Execute(in, policy); - - // convert back the dataset to VTK, and add the field as a point field - vtkDataArray* resultingArray = fromvtkm::Convert(result.GetPointField(fieldName)); - if (resultingArray == nullptr) - { - vtkErrorMacro(<< "Unable to convert result array from VTK-m to VTK"); - return 0; - } - - output->GetPointData()->AddArray(resultingArray); - resultingArray->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmAverageToPoints::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} diff --git a/Accelerators/Vtkm/vtkmAverageToPoints.h b/Accelerators/Vtkm/vtkmAverageToPoints.h deleted file mode 100644 index b3d9c7fbc..000000000 --- a/Accelerators/Vtkm/vtkmAverageToPoints.h +++ /dev/null @@ -1,52 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmAverageToPoints - * @brief Accelerated cell to point interpolation filter. - * - * vtkmAverageToPoints is a filter that transforms cell data (i.e., data - * specified per cell) into point data (i.e., data specified at cell - * points). The method of transformation is based on averaging the data - * values of all cells using a particular point. This filter will also - * pass through any existing point and cell arrays. - * - */ -#ifndef vtkmAverageToPoints_h -#define vtkmAverageToPoints_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkDataSetAlgorithm.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmAverageToPoints : public vtkDataSetAlgorithm -{ -public: - vtkTypeMacro(vtkmAverageToPoints, vtkDataSetAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmAverageToPoints* New(); - -protected: - vtkmAverageToPoints(); - ~vtkmAverageToPoints() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmAverageToPoints(const vtkmAverageToPoints&) = delete; - void operator=(const vtkmAverageToPoints&) = delete; -}; - -#endif // vtkmAverageToPoints_h -// VTK-HeaderTest-Exclude: vtkmAverageToPoints.h diff --git a/Accelerators/Vtkm/vtkmCleanGrid.cxx b/Accelerators/Vtkm/vtkmCleanGrid.cxx deleted file mode 100644 index 5bd85e3ed..000000000 --- a/Accelerators/Vtkm/vtkmCleanGrid.cxx +++ /dev/null @@ -1,104 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmCleanGrid.h" - -#include "vtkCellData.h" -#include "vtkDemandDrivenPipeline.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" -#include "vtkmlib/UnstructuredGridConverter.h" - -#include "vtkmFilterPolicy.h" - -#include -#include - -vtkStandardNewMacro(vtkmCleanGrid); - -//------------------------------------------------------------------------------ -vtkmCleanGrid::vtkmCleanGrid() - : CompactPoints(false) -{ -} - -//------------------------------------------------------------------------------ -vtkmCleanGrid::~vtkmCleanGrid() {} - -//------------------------------------------------------------------------------ -void vtkmCleanGrid::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - os << indent << "CompactPoints: " << (this->CompactPoints ? "On" : "Off") << "\n"; -} - -//------------------------------------------------------------------------------ -int vtkmCleanGrid::FillInputPortInformation(int, vtkInformation* info) -{ - info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet"); - return 1; -} - -//------------------------------------------------------------------------------ -int vtkmCleanGrid::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkUnstructuredGrid* output = - vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - try - { - // convert the input dataset to a vtkm::cont::DataSet - auto fieldsFlag = this->CompactPoints ? tovtkm::FieldsFlag::Points : tovtkm::FieldsFlag::None; - vtkm::cont::DataSet in = tovtkm::Convert(input, fieldsFlag); - - // apply the filter - vtkmInputFilterPolicy policy; - vtkm::filter::CleanGrid filter; - filter.SetCompactPointFields(this->CompactPoints); - auto result = filter.Execute(in, policy); - - // convert back to vtkDataSet (vtkUnstructuredGrid) - if (!fromvtkm::Convert(result, output, input)) - { - vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - // pass cell data - if (!this->CompactPoints) - { - output->GetPointData()->PassData(input->GetPointData()); - } - output->GetCellData()->PassData(input->GetCellData()); - - return 1; -} diff --git a/Accelerators/Vtkm/vtkmCleanGrid.h b/Accelerators/Vtkm/vtkmCleanGrid.h deleted file mode 100644 index a856b3272..000000000 --- a/Accelerators/Vtkm/vtkmCleanGrid.h +++ /dev/null @@ -1,69 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmCleanGrid - * @brief removes redundant or unused cells and/or points - * - * vtkmCleanGrid is a filter that takes vtkDataSet data as input and - * generates vtkUnstructuredGrid as output. vtkmCleanGrid will convert all cells - * to an explicit representation, and if enabled, will remove unused points. - * - */ - -#ifndef vtkmCleanGrid_h -#define vtkmCleanGrid_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkUnstructuredGridAlgorithm.h" - -class vtkDataSet; -class vtkUnstructuredGrid; - -class VTKACCELERATORSVTKM_EXPORT vtkmCleanGrid : public vtkUnstructuredGridAlgorithm -{ -public: - vtkTypeMacro(vtkmCleanGrid, vtkUnstructuredGridAlgorithm); - - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmCleanGrid* New(); - - //@{ - /** - * Get/Set if the points from the input that are unused in the output should - * be removed. This will take extra time but the result dataset may use - * less memory. Off by default. - */ - vtkSetMacro(CompactPoints, bool); - vtkGetMacro(CompactPoints, bool); - vtkBooleanMacro(CompactPoints, bool); - //@} - -protected: - vtkmCleanGrid(); - ~vtkmCleanGrid() override; - - int FillInputPortInformation(int, vtkInformation*) override; - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - - bool CompactPoints; - -private: - vtkmCleanGrid(const vtkmCleanGrid&) = delete; - void operator=(const vtkmCleanGrid&) = delete; -}; - -#endif // vtkmCleanGrid_h -// VTK-HeaderTest-Exclude: vtkmCleanGrid.h diff --git a/Accelerators/Vtkm/vtkmClip.cxx b/Accelerators/Vtkm/vtkmClip.cxx deleted file mode 100644 index 8b5cfa389..000000000 --- a/Accelerators/Vtkm/vtkmClip.cxx +++ /dev/null @@ -1,207 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkmClip.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ - -#include "vtkmClip.h" - -#include "vtkCellIterator.h" -#include "vtkDataArray.h" -#include "vtkDataSet.h" -#include "vtkDemandDrivenPipeline.h" -#include "vtkImplicitFunction.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" -#include "vtkTableBasedClipDataSet.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" -#include "vtkmlib/ImplicitFunctionConverter.h" -#include "vtkmlib/PolyDataConverter.h" -#include "vtkmlib/UnstructuredGridConverter.h" - -#include "vtkmFilterPolicy.h" - -#include - -#include -#include -#include -#include - -#include - -vtkStandardNewMacro(vtkmClip); - -//------------------------------------------------------------------------------ -void vtkmClip::PrintSelf(std::ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - - os << indent << "ClipValue: " << this->ClipValue << "\n"; - os << indent << "ClipFunction: \n"; - this->ClipFunction->PrintSelf(os, indent.GetNextIndent()); - os << indent << "ComputeScalars: " << this->ComputeScalars << "\n"; -} - -//------------------------------------------------------------------------------ -vtkmClip::vtkmClip() - : ClipValue(0.) - , ComputeScalars(true) - , ClipFunction(nullptr) - , ClipFunctionConverter(new tovtkm::ImplicitFunctionConverter) -{ - // Clip active point scalars by default - this->SetInputArrayToProcess( - 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, vtkDataSetAttributes::SCALARS); -} - -//------------------------------------------------------------------------------ -vtkmClip::~vtkmClip() {} - -//---------------------------------------------------------------------------- -vtkMTimeType vtkmClip::GetMTime() -{ - vtkMTimeType mTime = this->Superclass::GetMTime(); - if (this->ClipFunction) - { - mTime = std::max(mTime, this->ClipFunction->GetMTime()); - } - return mTime; -} - -//---------------------------------------------------------------------------- -void vtkmClip::SetClipFunction(vtkImplicitFunction* clipFunction) -{ - if (this->ClipFunction != clipFunction) - { - this->ClipFunction = clipFunction; - this->ClipFunctionConverter->Set(clipFunction); - this->Modified(); - } -} - -//------------------------------------------------------------------------------ -int vtkmClip::RequestData( - vtkInformation*, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) -{ - vtkm::cont::ScopedRuntimeDeviceTracker tracker( - vtkm::cont::DeviceAdapterTagCuda{}, vtkm::cont::RuntimeDeviceTrackerMode::Disable); - - vtkInformation* inInfo = inInfoVec[0]->GetInformationObject(0); - vtkInformation* outInfo = outInfoVec->GetInformationObject(0); - - // Extract data objects from info: - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkUnstructuredGrid* output = - vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - // Find the scalar array: - int assoc = this->GetInputArrayAssociation(0, inInfoVec); - vtkDataArray* scalars = this->GetInputArrayToProcess(0, inInfoVec); - if (!this->ClipFunction && - (assoc != vtkDataObject::FIELD_ASSOCIATION_POINTS || scalars == nullptr || - scalars->GetName() == nullptr || scalars->GetName()[0] == '\0')) - { - vtkErrorMacro("Invalid scalar array; array missing or not a point array."); - return 0; - } - - // Validate input objects: - if (input->GetNumberOfPoints() == 0 || input->GetNumberOfCells() == 0) - { - return 1; // nothing to do - } - - try - { - // Convert inputs to vtkm objects: - auto fieldsFlag = - this->ComputeScalars ? tovtkm::FieldsFlag::PointsAndCells : tovtkm::FieldsFlag::None; - auto in = tovtkm::Convert(input, fieldsFlag); - - // Run filter: - vtkm::cont::DataSet result; - vtkmInputFilterPolicy policy; - if (this->ClipFunction) - { - vtkm::filter::ClipWithImplicitFunction functionFilter; - auto function = this->ClipFunctionConverter->Get(); - if (function.GetValid()) - { - functionFilter.SetImplicitFunction(function); - result = functionFilter.Execute(in, policy); - } - } - else - { - vtkm::filter::ClipWithField fieldFilter; - if (!this->ComputeScalars) - { - // explicitly convert just the field we need - auto inField = tovtkm::Convert(scalars, assoc); - in.AddField(inField); - // don't pass this field - fieldFilter.SetFieldsToPass( - vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE)); - } - - fieldFilter.SetActiveField(scalars->GetName(), vtkm::cont::Field::Association::POINTS); - fieldFilter.SetClipValue(this->ClipValue); - result = fieldFilter.Execute(in, policy); - } - - // Convert result to output: - if (!fromvtkm::Convert(result, output, input)) - { - vtkErrorMacro("Error generating vtkUnstructuredGrid from vtkm's result."); - return 0; - } - - if (!this->ClipFunction && this->ComputeScalars) - { - output->GetPointData()->SetActiveScalars(scalars->GetName()); - } - - return 1; - } - catch (const vtkm::cont::Error& e) - { - vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() - << "Falling back to serial implementation."); - - vtkNew filter; - filter->SetClipFunction(this->ClipFunction); - filter->SetValue(this->ClipValue); - filter->SetInputData(input); - filter->Update(); - output->ShallowCopy(filter->GetOutput()); - return 1; - } -} - -//------------------------------------------------------------------------------ -int vtkmClip::FillInputPortInformation(int, vtkInformation* info) -{ - // These are the types supported by tovtkm::Convert: - info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkUnstructuredGrid"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkStructuredGrid"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkUniformGrid"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); - return 1; -} diff --git a/Accelerators/Vtkm/vtkmClip.h b/Accelerators/Vtkm/vtkmClip.h deleted file mode 100644 index 011e9d854..000000000 --- a/Accelerators/Vtkm/vtkmClip.h +++ /dev/null @@ -1,93 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmClip - * @brief Clip a dataset using the accelerated vtk-m Clip filter. - * - * Clip a dataset using either a given value or by using an vtkImplicitFunction - * Currently the supported implicit functions are Box, Plane, and Sphere. - * - */ - -#ifndef vtkmClip_h -#define vtkmClip_h - -#include "vtkAcceleratorsVTKmModule.h" // For export macro -#include "vtkUnstructuredGridAlgorithm.h" - -#include // For std::unique_ptr - -class vtkImplicitFunction; - -namespace tovtkm -{ - -class ImplicitFunctionConverter; - -} // namespace tovtkm - -class VTKACCELERATORSVTKM_EXPORT vtkmClip : public vtkUnstructuredGridAlgorithm -{ -public: - static vtkmClip* New(); - vtkTypeMacro(vtkmClip, vtkUnstructuredGridAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - - /** - * The scalar value to use when clipping the dataset. Values greater than - * ClipValue are preserved in the output dataset. Default is 0. - */ - vtkGetMacro(ClipValue, double); - vtkSetMacro(ClipValue, double); - - /** - * If true, all input point data arrays will be mapped onto the output - * dataset. Default is true. - */ - vtkGetMacro(ComputeScalars, bool); - vtkSetMacro(ComputeScalars, bool); - - /** - * Set the implicit function with which to perform the clipping. If set, - * \c ClipValue is ignored and the clipping is performed using the implicit - * function. - */ - void SetClipFunction(vtkImplicitFunction*); - vtkGetObjectMacro(ClipFunction, vtkImplicitFunction); - - vtkMTimeType GetMTime() override; - -protected: - vtkmClip(); - ~vtkmClip() override; - - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - - int FillInputPortInformation(int port, vtkInformation* info) override; - - double ClipValue; - bool ComputeScalars; - - vtkImplicitFunction* ClipFunction; - std::unique_ptr ClipFunctionConverter; - -private: - vtkmClip(const vtkmClip&) = delete; - void operator=(const vtkmClip&) = delete; -}; - -#endif // vtkmClip_h -// VTK-HeaderTest-Exclude: vtkmClip.h diff --git a/Accelerators/Vtkm/vtkmConfig.h.in b/Accelerators/Vtkm/vtkmConfig.h.in deleted file mode 100644 index 8bc19a544..000000000 --- a/Accelerators/Vtkm/vtkmConfig.h.in +++ /dev/null @@ -1,65 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: ObjectFactory.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#ifndef vtkmConfig_h -#define vtkmConfig_h - -//make sure we use 64bit id's just like vtk -#include "vtkType.h" -#ifdef VTK_USE_64BIT_IDS -# define VTKM_USE_64BIT_IDS -#endif - -/*--------------------------------------------------------------------------*/ -/* Other Configuration Options */ - -/* Determine what types the vtkm policy will need to support for arrays */ -#cmakedefine VTKM_FILTER_INCLUDE_AOS -#cmakedefine VTKM_FILTER_INCLUDE_SOA - -#include -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation - - -/*--------------------------------------------------------------------------*/ -/* Support the old exceptions */ -#include -#ifdef vtk_m_cont_ErrorControlBadAllocation_h - -namespace vtkm { -namespace cont { -using ErrorBadAllocation = ErrorControlBadAllocation; -using ErrorBadValue = ErrorControlBadValue; -} -} -#endif - - -#ifndef VTKACCELERATORSVTKM_TEMPLATE_EXPORT -# if !defined(VTKACCELERATORSVTKM_STATIC_DEFINE) && defined(_MSC_VER) - /* Warning C4910 on windows state that extern explicit template can't be - labeled with __declspec(dllexport). So that is why we use a new custom - define. But when other modules ( e.g. rendering ) include this header - we need them to see that the extern template is actually being imported. - */ - /* We are building this library with MSVC */ -# define VTKACCELERATORSVTKM_TEMPLATE_EXPORT -# else - /* Defer to the config module */ -# define VTKACCELERATORSVTKM_TEMPLATE_EXPORT VTKACCELERATORSVTKM_EXPORT -# endif -#endif - - -#endif // vtkmConfig_h diff --git a/Accelerators/Vtkm/vtkmContour.cxx b/Accelerators/Vtkm/vtkmContour.cxx deleted file mode 100644 index e8304bf6a..000000000 --- a/Accelerators/Vtkm/vtkmContour.cxx +++ /dev/null @@ -1,139 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmContour.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkNew.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" -#include "vtkmlib/PolyDataConverter.h" - -#include "vtkmFilterPolicy.h" - -#include -#include -#include - -vtkStandardNewMacro(vtkmContour); - -//------------------------------------------------------------------------------ -vtkmContour::vtkmContour() {} - -//------------------------------------------------------------------------------ -vtkmContour::~vtkmContour() {} - -//------------------------------------------------------------------------------ -void vtkmContour::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} - -//------------------------------------------------------------------------------ -int vtkmContour::RequestData( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkm::cont::ScopedRuntimeDeviceTracker tracker( - vtkm::cont::DeviceAdapterTagCuda{}, vtkm::cont::RuntimeDeviceTrackerMode::Disable); - - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - // Find the scalar array: - int association = this->GetInputArrayAssociation(0, inputVector); - vtkDataArray* inputArray = this->GetInputArrayToProcess(0, inputVector); - if (association != vtkDataObject::FIELD_ASSOCIATION_POINTS || inputArray == nullptr || - inputArray->GetName() == nullptr || inputArray->GetName()[0] == '\0') - { - vtkErrorMacro("Invalid scalar array; array missing or not a point array."); - return 0; - } - - const int numContours = this->GetNumberOfContours(); - if (numContours == 0) - { - return 1; - } - - try - { - vtkm::filter::Contour filter; - filter.SetActiveField(inputArray->GetName(), vtkm::cont::Field::Association::POINTS); - filter.SetGenerateNormals(this->GetComputeNormals() != 0); - filter.SetNumberOfIsoValues(numContours); - for (int i = 0; i < numContours; ++i) - { - filter.SetIsoValue(i, this->GetValue(i)); - } - - // convert the input dataset to a vtkm::cont::DataSet - vtkm::cont::DataSet in; - if (this->ComputeScalars) - { - in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - } - else - { - in = tovtkm::Convert(input, tovtkm::FieldsFlag::None); - // explicitly convert just the field we need - auto inField = tovtkm::Convert(inputArray, association); - in.AddField(inField); - // don't pass this field - filter.SetFieldsToPass(vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE)); - } - - vtkm::cont::DataSet result; - vtkmInputFilterPolicy policy; - - result = filter.Execute(in, policy); - - // convert back the dataset to VTK - if (!fromvtkm::Convert(result, output, input)) - { - vtkWarningMacro(<< "Unable to convert VTKm DataSet back to VTK.\n" - << "Falling back to serial implementation."); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - - if (this->ComputeScalars) - { - output->GetPointData()->SetActiveScalars(inputArray->GetName()); - } - if (this->ComputeNormals) - { - output->GetPointData()->SetActiveAttribute( - filter.GetNormalArrayName().c_str(), vtkDataSetAttributes::NORMALS); - } - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - // we got this far, everything is good - return 1; -} diff --git a/Accelerators/Vtkm/vtkmContour.h b/Accelerators/Vtkm/vtkmContour.h deleted file mode 100644 index 2e5d3efd9..000000000 --- a/Accelerators/Vtkm/vtkmContour.h +++ /dev/null @@ -1,58 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmContour - * @brief generate isosurface(s) from volume - * - * vtkmContour is a filter that takes as input a volume (e.g., 3D - * structured point set) and generates on output one or more isosurfaces. - * One or more contour values must be specified to generate the isosurfaces. - * Alternatively, you can specify a min/max scalar range and the number of - * contours to generate a series of evenly spaced contour values. - * - * @warning - * This filter is currently only supports 3D volumes. If you are interested in - * contouring other types of data, use the general vtkContourFilter. If you - * want to contour an image (i.e., a volume slice), use vtkMarchingSquares. - * - */ - -#ifndef vtkmContour_h -#define vtkmContour_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkContourFilter.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmContour : public vtkContourFilter -{ -public: - vtkTypeMacro(vtkmContour, vtkContourFilter); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmContour* New(); - -protected: - vtkmContour(); - ~vtkmContour() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmContour(const vtkmContour&) = delete; - void operator=(const vtkmContour&) = delete; -}; - -#endif // vtkmContour_h -// VTK-HeaderTest-Exclude: vtkmContour.h diff --git a/Accelerators/Vtkm/vtkmCoordinateSystemTransform.cxx b/Accelerators/Vtkm/vtkmCoordinateSystemTransform.cxx deleted file mode 100644 index 154c37e16..000000000 --- a/Accelerators/Vtkm/vtkmCoordinateSystemTransform.cxx +++ /dev/null @@ -1,208 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmCoordinateSystemTransform.h" -#include "vtkmConfig.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkImageData.h" -#include "vtkImageDataToPointSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkRectilinearGrid.h" -#include "vtkRectilinearGridToPointSet.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkmFilterPolicy.h" - -#include - -vtkStandardNewMacro(vtkmCoordinateSystemTransform); - -//------------------------------------------------------------------------------ -vtkmCoordinateSystemTransform::vtkmCoordinateSystemTransform() -{ - this->TransformType = TransformTypes::None; -} - -//------------------------------------------------------------------------------ -vtkmCoordinateSystemTransform::~vtkmCoordinateSystemTransform() {} - -//------------------------------------------------------------------------------ -void vtkmCoordinateSystemTransform::SetCartesianToCylindrical() -{ - this->TransformType = TransformTypes::CarToCyl; -} - -//------------------------------------------------------------------------------ -void vtkmCoordinateSystemTransform::SetCylindricalToCartesian() -{ - this->TransformType = TransformTypes::CylToCar; -} - -//------------------------------------------------------------------------------ -void vtkmCoordinateSystemTransform::SetCartesianToSpherical() -{ - this->TransformType = TransformTypes::CarToSph; -} - -//------------------------------------------------------------------------------ -void vtkmCoordinateSystemTransform::SetSphericalToCartesian() -{ - this->TransformType = TransformTypes::SphToCar; -} - -//------------------------------------------------------------------------------ -int vtkmCoordinateSystemTransform::FillInputPortInformation( - int vtkNotUsed(port), vtkInformation* info) -{ - info->Remove(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE()); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPointSet"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkRectilinearGrid"); - return 1; -} - -//------------------------------------------------------------------------------ -int vtkmCoordinateSystemTransform::RequestDataObject( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); - vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); - - if (inImage || inRect) - { - vtkStructuredGrid* output = vtkStructuredGrid::GetData(outputVector); - if (!output) - { - vtkNew newOutput; - outputVector->GetInformationObject(0)->Set(vtkDataObject::DATA_OBJECT(), newOutput); - } - return 1; - } - else - { - return this->Superclass::RequestDataObject(request, inputVector, outputVector); - } -} - -//------------------------------------------------------------------------------ -int vtkmCoordinateSystemTransform::RequestData( - vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkSmartPointer input = vtkPointSet::GetData(inputVector[0]); - vtkPointSet* output = vtkPointSet::GetData(outputVector); - - if (!input) - { - // Try converting image data. - vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); - if (inImage) - { - vtkNew image2points; - image2points->SetInputData(inImage); - image2points->Update(); - input = image2points->GetOutput(); - } - } - - if (!input) - { - // Try converting rectilinear grid. - vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); - if (inRect) - { - vtkNew rect2points; - rect2points->SetInputData(inRect); - rect2points->Update(); - input = rect2points->GetOutput(); - } - } - - if (!input) - { - vtkErrorMacro(<< "Invalid or missing input"); - return 0; - } - - output->CopyStructure(input); - - vtkPoints* inPts = input->GetPoints(); - - if (!inPts || this->TransformType == TransformTypes::None) - { - vtkErrorMacro(<< "Miss input points or transform type has not been specified"); - return 0; - } - - try - { - vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::Points); - vtkmInputFilterPolicy policy; - vtkDataArray* transformResult; - if (this->TransformType == TransformTypes::CarToCyl || - this->TransformType == TransformTypes::CylToCar) - { // Cylindrical coordinate transform - vtkm::filter::CylindricalCoordinateTransform cylindricalCT; - cylindricalCT.SetUseCoordinateSystemAsField(true); - (this->TransformType == TransformTypes::CarToCyl) ? cylindricalCT.SetCartesianToCylindrical() - : cylindricalCT.SetCylindricalToCartesian(); - auto result = cylindricalCT.Execute(in, policy); - transformResult = fromvtkm::Convert(result.GetField( - "cylindricalCoordinateSystemTransform", vtkm::cont::Field::Association::POINTS)); - } - else - { // Spherical coordinate system - vtkm::filter::SphericalCoordinateTransform sphericalCT; - sphericalCT.SetUseCoordinateSystemAsField(true); - (this->TransformType == TransformTypes::CarToSph) ? sphericalCT.SetCartesianToSpherical() - : sphericalCT.SetSphericalToCartesian(); - auto result = sphericalCT.Execute(in, policy); - transformResult = fromvtkm::Convert(result.GetField( - "sphericalCoordinateSystemTransform", vtkm::cont::Field::Association::POINTS)); - } - vtkPoints* newPts = vtkPoints::New(); - // Update points - newPts->SetNumberOfPoints(transformResult->GetNumberOfTuples()); - newPts->SetData(transformResult); - output->SetPoints(newPts); - newPts->Delete(); - transformResult->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - } - - // Update ourselves and release memory - output->GetPointData()->CopyNormalsOff(); // distorted geometry - output->GetPointData()->PassData(input->GetPointData()); - output->GetCellData()->CopyNormalsOff(); // distorted geometry - output->GetCellData()->PassData(input->GetCellData()); - - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmCoordinateSystemTransform::PrintSelf(std::ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} diff --git a/Accelerators/Vtkm/vtkmCoordinateSystemTransform.h b/Accelerators/Vtkm/vtkmCoordinateSystemTransform.h deleted file mode 100644 index 48012004f..000000000 --- a/Accelerators/Vtkm/vtkmCoordinateSystemTransform.h +++ /dev/null @@ -1,73 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmCoordinateSystemTransform - * @brief transform a coordinate system between Cartesian&Cylindrical and - * Cartesian&Spherical - * - * vtkmCoordinateSystemTransform is a filter that transforms a coordinate system - * between Cartesian&Cylindrical and Cartesian&Spherical. - */ - -#ifndef vtkmCoordinateSystemTransform_h -#define vtkmCoordinateSystemTransform_h - -#include "vtkAcceleratorsVTKmModule.h" // required for correct export -#include "vtkPointSetAlgorithm.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmCoordinateSystemTransform : public vtkPointSetAlgorithm -{ - enum struct TransformTypes - { - None, - CarToCyl, - CylToCar, - CarToSph, - SphToCar - }; - -public: - vtkTypeMacro(vtkmCoordinateSystemTransform, vtkPointSetAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - - static vtkmCoordinateSystemTransform* New(); - - void SetCartesianToCylindrical(); - void SetCylindricalToCartesian(); - - void SetCartesianToSpherical(); - void SetSphericalToCartesian(); - - int FillInputPortInformation(int port, vtkInformation* info) override; - -protected: - vtkmCoordinateSystemTransform(); - ~vtkmCoordinateSystemTransform() override; - - int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector, - vtkInformationVector* outputVector) override; - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmCoordinateSystemTransform(const vtkmCoordinateSystemTransform&) = delete; - void operator=(const vtkmCoordinateSystemTransform&) = delete; - - TransformTypes TransformType; -}; - -#endif // vtkmCoordinateSystemTransform_h - -// VTK-HeaderTest-Exclude: vtkmCoordinateSystemTransform.h diff --git a/Accelerators/Vtkm/vtkmDataArray.cxx b/Accelerators/Vtkm/vtkmDataArray.cxx deleted file mode 100644 index 45668bf24..000000000 --- a/Accelerators/Vtkm/vtkmDataArray.cxx +++ /dev/null @@ -1,36 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2019 Sandia Corporation. -// Copyright 2019 UT-Battelle, LLC. -// Copyright 2019 Los Alamos National Security. -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National -// Laboratory (LANL), the U.S. Government retains certain rights in -// this software. -//============================================================================ -#define vtkmDataArray_cxx - -#include "vtkmDataArray.h" - -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; -template class VTKACCELERATORSVTKM_EXPORT vtkmDataArray; diff --git a/Accelerators/Vtkm/vtkmDataArray.h b/Accelerators/Vtkm/vtkmDataArray.h deleted file mode 100644 index 10139e3bd..000000000 --- a/Accelerators/Vtkm/vtkmDataArray.h +++ /dev/null @@ -1,128 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2019 Sandia Corporation. -// Copyright 2019 UT-Battelle, LLC. -// Copyright 2019 Los Alamos National Security. -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National -// Laboratory (LANL), the U.S. Government retains certain rights in -// this software. -//============================================================================ -#ifndef __VTK_WRAP__ -#ifndef VTK_WRAPPING_CXX - -#ifndef vtkmDataArray_h -#define vtkmDataArray_h - -#include "vtkAcceleratorsVTKmModule.h" // For export macro -#include "vtkGenericDataArray.h" -#include "vtkmConfig.h" // For template export - -#include // For vtkm::List -#include // For vtkm::VecFromPortal -#include // For vtkm::VecTraits -#include // For vtkm::cont::ArrayHandle -#include // For vtkm::cont::VariantArrayHandle - -#include // For unique_ptr - -namespace internal -{ - -template -class ArrayHandleWrapperBase; - -} // internal - -template -class vtkmDataArray : public vtkGenericDataArray, T> -{ - static_assert(std::is_arithmetic::value, "T must be an integral or floating-point type"); - - using GenericDataArrayType = vtkGenericDataArray, T>; - -public: - using SelfType = vtkmDataArray; - vtkTemplateTypeMacro(SelfType, GenericDataArrayType); - - using typename Superclass::ValueType; - - using VtkmTypesList = vtkm::List, vtkm::Vec, vtkm::Vec, - vtkm::VecFromPortal::PortalControl> >; - - static vtkmDataArray* New(); - - template - void SetVtkmArrayHandle(const vtkm::cont::ArrayHandle& ah); - - vtkm::cont::VariantArrayHandle GetVtkmVariantArrayHandle() const; - - /// concept methods for \c vtkGenericDataArray - ValueType GetValue(vtkIdType valueIdx) const; - void SetValue(vtkIdType valueIdx, ValueType value); - void GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const; - void SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple); - ValueType GetTypedComponent(vtkIdType tupleIdx, int compIdx) const; - void SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value); - -protected: - vtkmDataArray(); - ~vtkmDataArray() override; - - /// concept methods for \c vtkGenericDataArray - bool AllocateTuples(vtkIdType numTuples); - bool ReallocateTuples(vtkIdType numTuples); - -private: - vtkmDataArray(const vtkmDataArray&) = delete; - void operator=(const vtkmDataArray&) = delete; - - // To access AllocateTuples and ReallocateTuples - friend Superclass; - - std::unique_ptr > VtkmArray; -}; - -//============================================================================= -template -inline vtkmDataArray::BaseComponentType>* make_vtkmDataArray( - const vtkm::cont::ArrayHandle& ah) -{ - auto ret = vtkmDataArray::BaseComponentType>::New(); - ret->SetVtkmArrayHandle(ah); - return ret; -} - -//============================================================================= -#ifndef vtkmDataArray_cxx -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT vtkmDataArray; -#endif // vtkmDataArray_cxx - -#endif // vtkmDataArray_h - -#include "vtkmDataArray.hxx" - -#endif -#endif -// VTK-HeaderTest-Exclude: vtkmDataArray.h diff --git a/Accelerators/Vtkm/vtkmDataArray.hxx b/Accelerators/Vtkm/vtkmDataArray.hxx deleted file mode 100644 index 12ceaa316..000000000 --- a/Accelerators/Vtkm/vtkmDataArray.hxx +++ /dev/null @@ -1,506 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2019 Sandia Corporation. -// Copyright 2019 UT-Battelle, LLC. -// Copyright 2019 Los Alamos National Security. -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National -// Laboratory (LANL), the U.S. Government retains certain rights in -// this software. -//============================================================================ -#ifndef vtkmDataArray_hxx -#define vtkmDataArray_hxx - -#include "vtkObjectFactory.h" -#include "vtkSmartPointer.h" - -#include -#include -#include -#include - -namespace internal -{ -//============================================================================= -template -class ArrayHandleWrapperBase -{ -public: - virtual ~ArrayHandleWrapperBase() = default; - - virtual vtkIdType GetNumberOfTuples() const = 0; - virtual int GetNumberOfComponents() const = 0; - - virtual void SetTuple(vtkIdType idx, const T* value) = 0; - virtual void GetTuple(vtkIdType idx, T* value) const = 0; - - virtual void SetComponent(vtkIdType tuple, int comp, const T& value) = 0; - virtual T GetComponent(vtkIdType tuple, int comp) const = 0; - - virtual void Allocate(vtkIdType numTuples) = 0; - virtual void Reallocate(vtkIdType numTuples) = 0; - - virtual vtkm::cont::VariantArrayHandle GetVtkmVariantArrayHandle() const = 0; -}; - -//----------------------------------------------------------------------------- -template ::HasMultipleComponents> -struct FlattenVec; - -template -struct FlattenVec -{ - using SubVec = FlattenVec::ComponentType>; - using ComponentType = typename SubVec::ComponentType; - - static VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents(const T& vec) - { - return vtkm::VecTraits::GetNumberOfComponents(vec) * - SubVec::GetNumberOfComponents(vtkm::VecTraits::GetComponent(vec, 0)); - } - - static VTKM_EXEC_CONT const ComponentType& GetComponent(const T& vec, vtkm::IdComponent comp) - { - auto ncomps = SubVec::GetNumberOfComponents(vtkm::VecTraits::GetComponent(vec, 0)); - return SubVec::GetComponent( - vtkm::VecTraits::GetComponent(vec, comp / ncomps), comp % ncomps); - } - - static VTKM_EXEC_CONT ComponentType& GetComponent(T& vec, vtkm::IdComponent comp) - { - auto ncomps = SubVec::GetNumberOfComponents(vtkm::VecTraits::GetComponent(vec, 0)); - return SubVec::GetComponent( - vtkm::VecTraits::GetComponent(vec, comp / ncomps), comp % ncomps); - } -}; - -template -struct FlattenVec -{ - using ComponentType = typename vtkm::VecTraits::ComponentType; - - static constexpr VTKM_EXEC_CONT vtkm::IdComponent GetNumberOfComponents(const T&) { return 1; } - - static VTKM_EXEC_CONT const ComponentType& GetComponent(const T& vec, vtkm::IdComponent) - { - return vtkm::VecTraits::GetComponent(vec, 0); - } - - static VTKM_EXEC_CONT ComponentType& GetComponent(T& vec, vtkm::IdComponent) - { - return vtkm::VecTraits::GetComponent(vec, 0); - } -}; - -//----------------------------------------------------------------------------- -template -class ArrayHandleWrapper - : public ArrayHandleWrapperBase::ComponentType> -{ -private: - using ArrayHandleType = vtkm::cont::ArrayHandle; - using ComponentType = typename FlattenVec::ComponentType; - using PortalType = typename ArrayHandleType::PortalControl; - -public: - explicit ArrayHandleWrapper(const ArrayHandleType& handle) - : Handle(handle) - { - this->Portal = this->Handle.GetPortalControl(); - this->NumberOfComponents = (this->Portal.GetNumberOfValues() == 0) - ? 1 - : FlattenVec::GetNumberOfComponents(this->Portal.Get(0)); - } - - vtkIdType GetNumberOfTuples() const override { return this->Portal.GetNumberOfValues(); } - - int GetNumberOfComponents() const override { return this->NumberOfComponents; } - - void SetTuple(vtkIdType idx, const ComponentType* value) override - { - // some vector types are not default constructible... - auto v = this->Portal.Get(idx); - for (vtkm::IdComponent i = 0; i < this->NumberOfComponents; ++i) - { - FlattenVec::GetComponent(v, i) = value[i]; - } - this->Portal.Set(idx, v); - } - - void GetTuple(vtkIdType idx, ComponentType* value) const override - { - auto v = this->Portal.Get(idx); - for (vtkm::IdComponent i = 0; i < this->NumberOfComponents; ++i) - { - value[i] = FlattenVec::GetComponent(v, i); - } - } - - void SetComponent(vtkIdType tuple, int comp, const ComponentType& value) override - { - auto v = this->Portal.Get(tuple); - FlattenVec::GetComponent(v, comp) = value; - this->Portal.Set(tuple, v); - } - - ComponentType GetComponent(vtkIdType tuple, int comp) const override - { - return FlattenVec::GetComponent(this->Portal.Get(tuple), comp); - } - - void Allocate(vtkIdType numTuples) override - { - this->Handle.Allocate(numTuples); - this->Portal = this->Handle.GetPortalControl(); - } - - void Reallocate(vtkIdType numTuples) override - { - ArrayHandleType newHandle; - newHandle.Allocate(numTuples); - vtkm::cont::Algorithm::CopySubRange(this->Handle, 0, - std::min(this->Handle.GetNumberOfValues(), newHandle.GetNumberOfValues()), newHandle, 0); - this->Handle = std::move(newHandle); - this->Portal = this->Handle.GetPortalControl(); - } - - vtkm::cont::VariantArrayHandle GetVtkmVariantArrayHandle() const override - { - return vtkm::cont::VariantArrayHandle{ this->Handle }; - } - -private: - ArrayHandleType Handle; - PortalType Portal; - vtkm::IdComponent NumberOfComponents; -}; - -//----------------------------------------------------------------------------- -template -class ArrayHandleWrapperReadOnly - : public ArrayHandleWrapperBase::ComponentType> -{ -private: - using ArrayHandleType = vtkm::cont::ArrayHandle; - using ComponentType = typename FlattenVec::ComponentType; - using PortalType = typename ArrayHandleType::PortalConstControl; - -public: - explicit ArrayHandleWrapperReadOnly(const ArrayHandleType& handle) - : Handle(handle) - { - this->Portal = this->Handle.GetPortalConstControl(); - this->NumberOfComponents = (this->Portal.GetNumberOfValues() == 0) - ? 1 - : FlattenVec::GetNumberOfComponents(this->Portal.Get(0)); - } - - vtkIdType GetNumberOfTuples() const override { return this->Portal.GetNumberOfValues(); } - - int GetNumberOfComponents() const override { return this->NumberOfComponents; } - - void SetTuple(vtkIdType, const ComponentType*) override - { - vtkGenericWarningMacro(<< "SetTuple called on read-only vtkmDataArray"); - } - - void GetTuple(vtkIdType idx, ComponentType* value) const override - { - auto v = this->Portal.Get(idx); - for (vtkm::IdComponent i = 0; i < this->NumberOfComponents; ++i) - { - value[i] = FlattenVec::GetComponent(v, i); - } - } - - void SetComponent(vtkIdType, int, const ComponentType&) override - { - vtkGenericWarningMacro(<< "SetComponent called on read-only vtkmDataArray"); - } - - ComponentType GetComponent(vtkIdType tuple, int comp) const override - { - return FlattenVec::GetComponent(this->Portal.Get(tuple), comp); - } - - void Allocate(vtkIdType) override - { - vtkGenericWarningMacro(<< "Allocate called on read-only vtkmDataArray"); - } - - void Reallocate(vtkIdType) override - { - vtkGenericWarningMacro(<< "Reallocate called on read-only vtkmDataArray"); - } - - vtkm::cont::VariantArrayHandle GetVtkmVariantArrayHandle() const override - { - return vtkm::cont::VariantArrayHandle{ this->Handle }; - } - -private: - ArrayHandleType Handle; - PortalType Portal; - vtkm::IdComponent NumberOfComponents; -}; - -//----------------------------------------------------------------------------- -template -class ArrayHandleWrapperFlatSOA : public ArrayHandleWrapperBase -{ -private: - using ArrayHandleType = vtkm::cont::ArrayHandle; - using PortalType = typename ArrayHandleType::PortalControl; - using VtkmArrayType = vtkm::cont::ArrayHandleGroupVecVariable >; - -public: - explicit ArrayHandleWrapperFlatSOA(const ArrayHandleType& handle, int numberOfComponents) - : Handle(handle) - , NumberOfComponents(numberOfComponents) - { - this->Portal = this->Handle.GetPortalControl(); - } - - vtkIdType GetNumberOfTuples() const override - { - return this->Portal.GetNumberOfValues() / this->NumberOfComponents; - } - - int GetNumberOfComponents() const override { return this->NumberOfComponents; } - - void SetTuple(vtkIdType idx, const T* value) override - { - vtkm::Id start = idx * this->NumberOfComponents; - vtkm::Id end = start + this->NumberOfComponents; - for (auto i = start; i < end; ++i) - { - this->Portal.Set(i, *value++); - } - } - - void GetTuple(vtkIdType idx, T* value) const override - { - vtkm::Id start = idx * this->NumberOfComponents; - vtkm::Id end = start + this->NumberOfComponents; - for (auto i = start; i < end; ++i) - { - *value++ = this->Portal.Get(i); - } - } - - void SetComponent(vtkIdType tuple, int comp, const T& value) override - { - this->Portal.Set((tuple * this->NumberOfComponents) + comp, value); - } - - T GetComponent(vtkIdType tuple, int comp) const override - { - return this->Portal.Get((tuple * this->NumberOfComponents) + comp); - } - - void Allocate(vtkIdType numTuples) override - { - this->Handle.Allocate(numTuples * this->NumberOfComponents); - this->Portal = this->Handle.GetPortalControl(); - } - - void Reallocate(vtkIdType numTuples) override - { - ArrayHandleType newHandle; - newHandle.Allocate(numTuples * this->NumberOfComponents); - vtkm::cont::Algorithm::CopySubRange(this->Handle, 0, - std::min(this->Handle.GetNumberOfValues(), newHandle.GetNumberOfValues()), newHandle, 0); - this->Handle = std::move(newHandle); - this->Portal = this->Handle.GetPortalControl(); - } - - vtkm::cont::VariantArrayHandle GetVtkmVariantArrayHandle() const override - { - return vtkm::cont::VariantArrayHandle{ this->GetVtkmArray() }; - } - -private: - VtkmArrayType GetVtkmArray() const - { - auto length = this->Handle.GetNumberOfValues() / this->NumberOfComponents; - auto offsets = vtkm::cont::ArrayHandleCounting(0, this->NumberOfComponents, length); - return VtkmArrayType{ this->Handle, offsets }; - } - - ArrayHandleType Handle; - PortalType Portal; - vtkm::IdComponent NumberOfComponents; -}; - -//----------------------------------------------------------------------------- -template -using IsReadOnly = std::integral_constant::value>; - -template -ArrayHandleWrapperBase::ComponentType>* WrapArrayHandle( - const vtkm::cont::ArrayHandle& ah, std::false_type) -{ - return new ArrayHandleWrapper{ ah }; -} - -template -ArrayHandleWrapperBase::ComponentType>* WrapArrayHandle( - const vtkm::cont::ArrayHandle& ah, std::true_type) -{ - return new ArrayHandleWrapperReadOnly{ ah }; -} - -template -ArrayHandleWrapperBase::ComponentType>* MakeArrayHandleWrapper( - const vtkm::cont::ArrayHandle& ah) -{ - return WrapArrayHandle(ah, typename IsReadOnly >::type{}); -} - -template -ArrayHandleWrapperBase* MakeArrayHandleWrapper(vtkIdType numberOfTuples, int numberOfComponents) -{ - switch (numberOfComponents) - { - case 1: - { - vtkm::cont::ArrayHandle ah; - ah.Allocate(numberOfTuples); - return MakeArrayHandleWrapper(ah); - } - case 2: - { - vtkm::cont::ArrayHandle > ah; - ah.Allocate(numberOfTuples); - return MakeArrayHandleWrapper(ah); - } - case 3: - { - vtkm::cont::ArrayHandle > ah; - ah.Allocate(numberOfTuples); - return MakeArrayHandleWrapper(ah); - } - case 4: - { - vtkm::cont::ArrayHandle > ah; - ah.Allocate(numberOfTuples); - return MakeArrayHandleWrapper(ah); - } - default: - { - vtkm::cont::ArrayHandle ah; - ah.Allocate(numberOfTuples * numberOfComponents); - return new ArrayHandleWrapperFlatSOA{ ah, numberOfComponents }; - } - } -} - -} // internal - -//============================================================================= -template -vtkmDataArray::vtkmDataArray() = default; - -template -vtkmDataArray::~vtkmDataArray() = default; - -template -vtkmDataArray* vtkmDataArray::New() -{ - VTK_STANDARD_NEW_BODY(vtkmDataArray); -} - -template -template -void vtkmDataArray::SetVtkmArrayHandle(const vtkm::cont::ArrayHandle& ah) -{ - static_assert(std::is_same::ComponentType>::value, - "Component type of the arrays don't match"); - - this->VtkmArray.reset(internal::MakeArrayHandleWrapper(ah)); - - this->Size = this->VtkmArray->GetNumberOfTuples() * this->VtkmArray->GetNumberOfComponents(); - this->MaxId = this->Size - 1; - this->SetNumberOfComponents(this->VtkmArray->GetNumberOfComponents()); -} - -template -vtkm::cont::VariantArrayHandle vtkmDataArray::GetVtkmVariantArrayHandle() const -{ - return this->VtkmArray->GetVtkmVariantArrayHandle(); -} - -template -auto vtkmDataArray::GetValue(vtkIdType valueIdx) const -> ValueType -{ - auto idx = valueIdx / this->NumberOfComponents; - auto comp = valueIdx % this->NumberOfComponents; - return this->VtkmArray->GetComponent(idx, comp); -} - -template -void vtkmDataArray::SetValue(vtkIdType valueIdx, ValueType value) -{ - auto idx = valueIdx / this->NumberOfComponents; - auto comp = valueIdx % this->NumberOfComponents; - this->VtkmArray->SetComponent(idx, comp, value); -} - -template -void vtkmDataArray::GetTypedTuple(vtkIdType tupleIdx, ValueType* tuple) const -{ - this->VtkmArray->GetTuple(tupleIdx, tuple); -} - -template -void vtkmDataArray::SetTypedTuple(vtkIdType tupleIdx, const ValueType* tuple) -{ - this->VtkmArray->SetTuple(tupleIdx, tuple); -} - -template -auto vtkmDataArray::GetTypedComponent(vtkIdType tupleIdx, int compIdx) const -> ValueType -{ - return this->VtkmArray->GetComponent(tupleIdx, compIdx); -} - -template -void vtkmDataArray::SetTypedComponent(vtkIdType tupleIdx, int compIdx, ValueType value) -{ - this->VtkmArray->SetComponent(tupleIdx, compIdx, value); -} - -template -bool vtkmDataArray::AllocateTuples(vtkIdType numTuples) -{ - if (this->VtkmArray && this->VtkmArray->GetNumberOfComponents() == this->NumberOfComponents) - { - this->VtkmArray->Allocate(numTuples); - } - else - { - this->VtkmArray.reset(internal::MakeArrayHandleWrapper(numTuples, this->NumberOfComponents)); - } - return true; -} - -template -bool vtkmDataArray::ReallocateTuples(vtkIdType numTuples) -{ - this->VtkmArray->Reallocate(numTuples); - return true; -} - -#endif // vtkmDataArray_hxx diff --git a/Accelerators/Vtkm/vtkmDataSet.cxx b/Accelerators/Vtkm/vtkmDataSet.cxx deleted file mode 100644 index 54b19c108..000000000 --- a/Accelerators/Vtkm/vtkmDataSet.cxx +++ /dev/null @@ -1,435 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2015 Sandia Corporation. -// Copyright 2015 UT-Battelle, LLC. -// Copyright 2015 Los Alamos National Security. -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National -// Laboratory (LANL), the U.S. Government retains certain rights in -// this software. -//============================================================================ -#include "vtkmDataSet.h" - -#include "vtkmDataArray.h" -#include "vtkmFilterPolicy.h" -#include "vtkmlib/ArrayConverters.h" - -#include "vtkCell.h" -#include "vtkDataSet.h" -#include "vtkDoubleArray.h" -#include "vtkGenericCell.h" -#include "vtkIdList.h" -#include "vtkNew.h" -#include "vtkPoints.h" - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace -{ - -using SupportedCellSets = - vtkm::ListAppend; - -template -struct VtkmLocator -{ - std::mutex lock; - std::unique_ptr control; - vtkMTimeType buildTime = 0; -}; - -} // anonymous - -struct vtkmDataSet::DataMembers -{ - vtkm::cont::DynamicCellSet CellSet; - vtkm::cont::CoordinateSystem Coordinates; - vtkNew Cell; - - VtkmLocator PointLocator; - VtkmLocator CellLocator; -}; - -//---------------------------------------------------------------------------- -vtkmDataSet::vtkmDataSet() - : Internals(new DataMembers) -{ -} - -vtkmDataSet::~vtkmDataSet() = default; - -vtkStandardNewMacro(vtkmDataSet); - -void vtkmDataSet::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - - this->Internals->CellSet.PrintSummary(os); - this->Internals->Coordinates.PrintSummary(os); -} - -//---------------------------------------------------------------------------- -void vtkmDataSet::SetVtkmDataSet(const vtkm::cont::DataSet& ds) -{ - this->Internals->CellSet = ds.GetCellSet(); - this->Internals->Coordinates = ds.GetCoordinateSystem(); - fromvtkm::ConvertArrays(ds, this); -} - -vtkm::cont::DataSet vtkmDataSet::GetVtkmDataSet() const -{ - vtkm::cont::DataSet ds; - ds.SetCellSet(this->Internals->CellSet); - ds.AddCoordinateSystem(this->Internals->Coordinates); - tovtkm::ProcessFields(const_cast(this), ds, tovtkm::FieldsFlag::PointsAndCells); - - return ds; -} - -//---------------------------------------------------------------------------- -void vtkmDataSet::CopyStructure(vtkDataSet* ds) -{ - auto vtkmds = vtkmDataSet::SafeDownCast(ds); - if (vtkmds) - { - this->Initialize(); - this->Internals->CellSet = vtkmds->Internals->CellSet; - this->Internals->Coordinates = vtkmds->Internals->Coordinates; - } -} - -vtkIdType vtkmDataSet::GetNumberOfPoints() -{ - return this->Internals->Coordinates.GetNumberOfPoints(); -} - -vtkIdType vtkmDataSet::GetNumberOfCells() -{ - auto* csBase = this->Internals->CellSet.GetCellSetBase(); - return csBase ? csBase->GetNumberOfCells() : 0; -} - -double* vtkmDataSet::GetPoint(vtkIdType ptId) -{ - static double point[3]; - this->GetPoint(ptId, point); - return point; -} - -void vtkmDataSet::GetPoint(vtkIdType id, double x[3]) -{ - auto portal = this->Internals->Coordinates.GetData().GetPortalConstControl(); - auto value = portal.Get(id); - x[0] = value[0]; - x[1] = value[1]; - x[2] = value[2]; -} - -vtkCell* vtkmDataSet::GetCell(vtkIdType cellId) -{ - this->GetCell(cellId, this->Internals->Cell); - return this->Internals->Cell->GetRepresentativeCell(); -} - -void vtkmDataSet::GetCell(vtkIdType cellId, vtkGenericCell* cell) -{ - cell->SetCellType(this->GetCellType(cellId)); - - auto* pointIds = cell->GetPointIds(); - this->GetCellPoints(cellId, pointIds); - - auto numPoints = pointIds->GetNumberOfIds(); - cell->GetPoints()->SetNumberOfPoints(numPoints); - for (vtkIdType i = 0; i < numPoints; ++i) - { - double x[3]; - this->GetPoint(pointIds->GetId(i), x); - cell->GetPoints()->SetPoint(i, x); - } -} - -void vtkmDataSet::GetCellBounds(vtkIdType cellId, double bounds[6]) -{ - if (this->Internals->Coordinates.GetData() - .IsType() && - this->Internals->CellSet.IsType >()) - { - auto portal = this->Internals->Coordinates.GetData() - .Cast() - .GetPortalConstControl(); - - vtkm::internal::ConnectivityStructuredInternals<3> helper; - helper.SetPointDimensions(portal.GetDimensions()); - auto id3 = helper.FlatToLogicalCellIndex(cellId); - auto min = portal.Get(id3); - auto max = min + portal.GetSpacing(); - for (int i = 0; i < 3; ++i) - { - bounds[2 * i] = min[i]; - bounds[2 * i + 1] = max[i]; - } - } - else - { - Superclass::GetCellBounds(cellId, bounds); - } -} - -int vtkmDataSet::GetCellType(vtkIdType cellId) -{ - auto* csBase = this->Internals->CellSet.GetCellSetBase(); - if (csBase) - { - return csBase->GetCellShape(cellId); - } - return VTK_EMPTY_CELL; -} - -void vtkmDataSet::GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) -{ - auto* csBase = this->Internals->CellSet.GetCellSetBase(); - if (csBase) - { - vtkm::Id numPoints = csBase->GetNumberOfPointsInCell(cellId); - ptIds->SetNumberOfIds(numPoints); - csBase->GetCellPointIds(cellId, ptIds->GetPointer(0)); - } -} - -namespace -{ - -struct WorkletGetPointCells : vtkm::worklet::WorkletVisitPointsWithCells -{ - using ControlSignature = void(CellSetIn); - using ExecutionSignature = void(CellCount, CellIndices, Device); - using ScatterType = vtkm::worklet::ScatterPermutation<>; - - explicit WorkletGetPointCells(vtkIdList* output) - : Output(output) - { - } - - template - VTKM_EXEC void operator()(vtkm::Id, IndicesVecType, vtkm::cont::DeviceAdapterTagCuda) const - { - } - - VTKM_SUPPRESS_EXEC_WARNINGS - template - VTKM_EXEC void operator()(vtkm::Id count, IndicesVecType idxs, Device) const - { - this->Output->SetNumberOfIds(count); - for (vtkm::Id i = 0; i < count; ++i) - { - this->Output->SetId(i, idxs[i]); - } - } - - vtkIdList* Output; -}; - -} // anonymous namespace - -void vtkmDataSet::GetPointCells(vtkIdType ptId, vtkIdList* cellIds) -{ - auto scatter = WorkletGetPointCells::ScatterType(vtkm::cont::make_ArrayHandle(&ptId, 1)); - vtkm::cont::Invoker invoke(vtkm::cont::DeviceAdapterTagSerial{}); - invoke(WorkletGetPointCells{ cellIds }, scatter, - this->Internals->CellSet.ResetCellSetList(SupportedCellSets{})); -} - -vtkIdType vtkmDataSet::FindPoint(double x[3]) -{ - auto& locator = this->Internals->PointLocator; - // critical section - { - std::lock_guard lock(locator.lock); - if (locator.buildTime < this->GetMTime()) - { - locator.control.reset(new vtkm::cont::PointLocatorUniformGrid); - locator.control->SetCoordinates(this->Internals->Coordinates); - locator.control->Update(); - locator.buildTime = this->GetMTime(); - } - } - auto execLocator = locator.control->PrepareForExecution(vtkm::cont::DeviceAdapterTagSerial{}); - - vtkm::Vec point(x[0], x[1], x[2]); - vtkm::Id pointId = -1; - vtkm::FloatDefault d2 = 0; - // exec object created for the Serial device can be called directly - execLocator->FindNearestNeighbor(point, pointId, d2); - return pointId; -} - -// non thread-safe version -vtkIdType vtkmDataSet::FindCell( - double x[3], vtkCell*, vtkIdType, double, int& subId, double pcoords[3], double* weights) -{ - // just call the thread-safe version - return this->FindCell(x, nullptr, nullptr, -1, 0.0, subId, pcoords, weights); -} - -// thread-safe version -vtkIdType vtkmDataSet::FindCell(double x[3], vtkCell*, vtkGenericCell*, vtkIdType, double, - int& subId, double pcoords[3], double* weights) -{ - auto& locator = this->Internals->CellLocator; - // critical section - { - std::lock_guard lock(locator.lock); - if (locator.buildTime < this->GetMTime()) - { - locator.control.reset(new vtkm::cont::CellLocatorGeneral); - locator.control->SetCellSet(this->Internals->CellSet); - locator.control->SetCoordinates(this->Internals->Coordinates); - locator.control->Update(); - locator.buildTime = this->GetMTime(); - } - } - auto execLocator = locator.control->PrepareForExecution(vtkm::cont::DeviceAdapterTagSerial{}); - - vtkm::Vec point(x[0], x[1], x[2]); - vtkm::Vec pc; - vtkm::Id cellId = -1; - // exec object created for the Serial device can be called directly - execLocator->FindCell(point, cellId, pc, vtkm::worklet::WorkletMapField{}); - - if (cellId >= 0) - { - double closestPoint[3], dist2; - vtkNew vtkcell; - this->GetCell(cellId, vtkcell); - vtkcell->EvaluatePosition(x, closestPoint, subId, pcoords, dist2, weights); - } - - return cellId; -} - -void vtkmDataSet::Squeeze() -{ - Superclass::Squeeze(); - - this->Internals->PointLocator.control.reset(nullptr); - this->Internals->PointLocator.buildTime = 0; - this->Internals->CellLocator.control.reset(nullptr); - this->Internals->CellLocator.buildTime = 0; -} - -void vtkmDataSet::ComputeBounds() -{ - if (this->GetMTime() > this->ComputeTime) - { - vtkm::Bounds bounds = this->Internals->Coordinates.GetBounds(); - this->Bounds[0] = bounds.X.Min; - this->Bounds[1] = bounds.X.Max; - this->Bounds[2] = bounds.Y.Min; - this->Bounds[3] = bounds.Y.Max; - this->Bounds[4] = bounds.Z.Min; - this->Bounds[5] = bounds.Z.Max; - this->ComputeTime.Modified(); - } -} - -void vtkmDataSet::Initialize() -{ - Superclass::Initialize(); - this->Internals = std::make_shared(); -} - -namespace -{ - -struct MaxCellSize -{ - template - void operator()( - const vtkm::cont::CellSetStructured& cellset, vtkm::IdComponent& result) const - { - result = cellset.GetNumberOfPointsInCell(0); - } - - template - void operator()(const vtkm::cont::CellSetSingleType& cellset, vtkm::IdComponent& result) const - { - result = cellset.GetNumberOfPointsInCell(0); - } - - template - void operator()( - const vtkm::cont::CellSetExplicit& cellset, vtkm::IdComponent& result) const - { - auto counts = - cellset.GetNumIndicesArray(vtkm::TopologyElementTagCell{}, vtkm::TopologyElementTagPoint{}); - result = vtkm::cont::Algorithm::Reduce(counts, vtkm::IdComponent{ 0 }, vtkm::Maximum{}); - } - - template - void operator()(const CellSetType& cellset, vtkm::IdComponent& result) const - { - result = -1; - vtkm::Id numberOfCells = cellset.GetNumberOfCells(); - for (vtkm::Id i = 0; i < numberOfCells; ++i) - { - result = std::max(result, cellset.GetNumberOfPointsInCell(i)); - } - } -}; -} // anonymous namespace - -int vtkmDataSet::GetMaxCellSize() -{ - vtkm::IdComponent result = 0; - vtkm::cont::CastAndCall( - this->Internals->CellSet.ResetCellSetList(SupportedCellSets{}), MaxCellSize{}, result); - return result; -} - -unsigned long vtkmDataSet::GetActualMemorySize() -{ - return this->Superclass::GetActualMemorySize(); -} - -void vtkmDataSet::ShallowCopy(vtkDataObject* src) -{ - auto obj = vtkmDataSet::SafeDownCast(src); - if (obj) - { - Superclass::ShallowCopy(obj); - this->Internals = obj->Internals; - } -} - -void vtkmDataSet::DeepCopy(vtkDataObject* src) -{ - auto other = vtkmDataSet::SafeDownCast(src); - if (other) - { - auto* csBase = other->Internals->CellSet.GetCellSetBase(); - if (csBase) - { - this->Initialize(); - - this->Internals->CellSet = other->Internals->CellSet.NewInstance(); - this->Internals->CellSet.GetCellSetBase()->DeepCopy(csBase); - } - } -} diff --git a/Accelerators/Vtkm/vtkmDataSet.h b/Accelerators/Vtkm/vtkmDataSet.h deleted file mode 100644 index d19e09a17..000000000 --- a/Accelerators/Vtkm/vtkmDataSet.h +++ /dev/null @@ -1,196 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2015 Sandia Corporation. -// Copyright 2015 UT-Battelle, LLC. -// Copyright 2015 Los Alamos National Security. -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National -// Laboratory (LANL), the U.S. Government retains certain rights in -// this software. -//============================================================================ -#ifndef vtkmDataSet_h -#define vtkmDataSet_h - -#include "vtkAcceleratorsVTKmModule.h" // For export macro -#include "vtkDataSet.h" - -#include // for std::shared_ptr - -namespace vtkm -{ -namespace cont -{ - -class DataSet; - -} -} // vtkm::cont - -class vtkPoints; -class vtkCell; -class vtkGenericCell; - -class VTKACCELERATORSVTKM_EXPORT vtkmDataSet : public vtkDataSet -{ -public: - vtkTypeMacro(vtkmDataSet, vtkDataSet); - void PrintSelf(ostream& os, vtkIndent indent) override; - - static vtkmDataSet* New(); - - void SetVtkmDataSet(const vtkm::cont::DataSet& ds); - vtkm::cont::DataSet GetVtkmDataSet() const; - - /** - * Copy the geometric and topological structure of an object. Note that - * the invoking object and the object pointed to by the parameter ds must - * be of the same type. - */ - void CopyStructure(vtkDataSet* ds) override; - - /** - * Determine the number of points composing the dataset. - */ - vtkIdType GetNumberOfPoints() override; - - /** - * Determine the number of cells composing the dataset. - */ - vtkIdType GetNumberOfCells() override; - - /** - * Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints. - */ - double* GetPoint(vtkIdType ptId) VTK_SIZEHINT(3) override; - - /** - * Copy point coordinates into user provided array x[3] for specified - * point id. - */ - void GetPoint(vtkIdType id, double x[3]) override; - - using vtkDataSet::GetCell; - /** - * Get cell with cellId such that: 0 <= cellId < NumberOfCells. - */ - vtkCell* GetCell(vtkIdType cellId) override; - void GetCell(vtkIdType cellId, vtkGenericCell* cell) override; - - /** - * Get the bounds of the cell with cellId such that: - * 0 <= cellId < NumberOfCells. - */ - void GetCellBounds(vtkIdType cellId, double bounds[6]) override; - - /** - * Get type of cell with cellId such that: 0 <= cellId < NumberOfCells. - */ - int GetCellType(vtkIdType cellId) override; - - /** - * Topological inquiry to get points defining cell. - */ - void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override; - - /** - * Topological inquiry to get cells using point. - */ - void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override; - - //@{ - /** - * Locate the closest point to the global coordinate x. Return the - * point id. If point id < 0; then no point found. (This may arise - * when point is outside of dataset.) - */ - vtkIdType FindPoint(double x[3]) override; - //@} - - /** - * Locate cell based on global coordinate x and tolerance - * squared. If cell and cellId is non-nullptr, then search starts from - * this cell and looks at immediate neighbors. Returns cellId >= 0 - * if inside, < 0 otherwise. The parametric coordinates are - * provided in pcoords[3]. The interpolation weights are returned in - * weights[]. (The number of weights is equal to the number of - * points in the found cell). Tolerance is used to control how close - * the point is to be considered "in" the cell. - */ - vtkIdType FindCell(double x[3], vtkCell* cell, vtkIdType cellId, double tol2, int& subId, - double pcoords[3], double* weights) override; - - /** - * This is a version of the above method that can be used with - * multithreaded applications. A vtkGenericCell must be passed in - * to be used in internal calls that might be made to GetCell() - */ - vtkIdType FindCell(double x[3], vtkCell* cell, vtkGenericCell* gencell, vtkIdType cellId, - double tol2, int& subId, double pcoords[3], double* weights) override; - - /** - * Reclaim any extra memory used to store data. - */ - void Squeeze() override; - - /** - * Compute the data bounding box from data points. - */ - void ComputeBounds() override; - - /** - * Restore data object to initial state. - * THIS METHOD IS NOT THREAD SAFE. - */ - void Initialize() override; - - /** - * Convenience method returns largest cell size in dataset. This is generally - * used to allocate memory for supporting data structures. - */ - int GetMaxCellSize() override; - - /** - * Return the actual size of the data in kibibytes (1024 bytes). This number - * is valid only after the pipeline has updated. The memory size - * returned is guaranteed to be greater than or equal to the - * memory required to represent the data (e.g., extra space in - * arrays, etc. are not included in the return value). - */ - unsigned long GetActualMemorySize() override; - - /** - * Return the type of data object. - */ - int GetDataObjectType() override { return VTK_DATA_SET; } - - //@{ - /** - * Shallow and Deep copy. - */ - void ShallowCopy(vtkDataObject* src) override; - void DeepCopy(vtkDataObject* src) override; - //@} - -protected: - vtkmDataSet(); - ~vtkmDataSet() override; - -private: - vtkmDataSet(const vtkmDataSet&) = delete; - void operator=(const vtkmDataSet&) = delete; - - struct DataMembers; - std::shared_ptr Internals; -}; - -#endif // vtkmDataSet_h -// VTK-HeaderTest-Exclude: vtkmDataSet.h diff --git a/Accelerators/Vtkm/vtkmExternalFaces.cxx b/Accelerators/Vtkm/vtkmExternalFaces.cxx deleted file mode 100644 index 8450ed5a0..000000000 --- a/Accelerators/Vtkm/vtkmExternalFaces.cxx +++ /dev/null @@ -1,136 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmExternalFaces.h" - -#include "vtkCellData.h" -#include "vtkDemandDrivenPipeline.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkNew.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkUnsignedCharArray.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/CellSetConverters.h" -#include "vtkmlib/DataSetConverters.h" -#include "vtkmlib/UnstructuredGridConverter.h" - -#include "vtkmFilterPolicy.h" - -#include -#include - -vtkStandardNewMacro(vtkmExternalFaces); - -//------------------------------------------------------------------------------ -vtkmExternalFaces::vtkmExternalFaces() - : CompactPoints(false) -{ - this->SetNumberOfInputPorts(1); - this->SetNumberOfOutputPorts(1); -} - -//------------------------------------------------------------------------------ -vtkmExternalFaces::~vtkmExternalFaces() {} - -//------------------------------------------------------------------------------ -void vtkmExternalFaces::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} - -//------------------------------------------------------------------------------ -void vtkmExternalFaces::SetInputData(vtkUnstructuredGrid* ds) -{ - this->SetInputDataObject(0, ds); -} - -//------------------------------------------------------------------------------ -vtkUnstructuredGrid* vtkmExternalFaces::GetOutput() -{ - return vtkUnstructuredGrid::SafeDownCast(this->GetOutputDataObject(0)); -} - -//------------------------------------------------------------------------------ -int vtkmExternalFaces::FillInputPortInformation(int, vtkInformation* info) -{ - info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkUnstructuredGrid"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkStructuredGrid"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkRectilinearGrid"); - return 1; -} - -//------------------------------------------------------------------------------ -int vtkmExternalFaces::FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) -{ - info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkUnstructuredGrid"); - return 1; -} - -//------------------------------------------------------------------------------ -vtkTypeBool vtkmExternalFaces::ProcessRequest( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - // generate the data - if (request->Has(vtkDemandDrivenPipeline::REQUEST_DATA())) - { - return this->RequestData(request, inputVector, outputVector); - } - - return this->Superclass::ProcessRequest(request, inputVector, outputVector); -} - -//------------------------------------------------------------------------------ -int vtkmExternalFaces::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkUnstructuredGrid* output = - vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - try - { - // convert the input dataset to a vtkm::cont::DataSet - auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - - // apply the filter - vtkmInputFilterPolicy policy; - vtkm::filter::ExternalFaces filter; - filter.SetCompactPoints(this->CompactPoints); - filter.SetPassPolyData(true); - auto result = filter.Execute(in, policy); - - // convert back to vtkDataSet (vtkUnstructuredGrid) - if (!fromvtkm::Convert(result, output, input)) - { - vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - return 1; -} diff --git a/Accelerators/Vtkm/vtkmExternalFaces.h b/Accelerators/Vtkm/vtkmExternalFaces.h deleted file mode 100644 index e3321db25..000000000 --- a/Accelerators/Vtkm/vtkmExternalFaces.h +++ /dev/null @@ -1,83 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmExternalFaces - * @brief generate External Faces of a DataSet - * - * vtkmExternalFaces is a filter that extracts all external faces from a - * data set. An external face is defined is defined as a face/side of a cell - * that belongs only to one cell in the entire mesh. - * @warning - * This filter is currently only supports propagation of point properties - * - */ - -#ifndef vtkmExternalFaces_h -#define vtkmExternalFaces_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkAlgorithm.h" - -class vtkUnstructuredGrid; - -class VTKACCELERATORSVTKM_EXPORT vtkmExternalFaces : public vtkAlgorithm -{ -public: - vtkTypeMacro(vtkmExternalFaces, vtkAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmExternalFaces* New(); - - /** - * Set the input DataSet - */ - void SetInputData(vtkUnstructuredGrid* ds); - - /** - * Get the resulr DataSet - */ - vtkUnstructuredGrid* GetOutput(); - - //@{ - /** - * Get/Set if the points from the input that are unused in the output should - * be removed. This will take extra time but the result dataset may use - * less memory. Off by default. - */ - vtkSetMacro(CompactPoints, bool); - vtkGetMacro(CompactPoints, bool); - vtkBooleanMacro(CompactPoints, bool); - //@} - -protected: - vtkmExternalFaces(); - ~vtkmExternalFaces() override; - - int FillInputPortInformation(int, vtkInformation*) override; - int FillOutputPortInformation(int, vtkInformation*) override; - - vtkTypeBool ProcessRequest( - vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*); - - bool CompactPoints; - -private: - vtkmExternalFaces(const vtkmExternalFaces&) = delete; - void operator=(const vtkmExternalFaces&) = delete; -}; - -#endif // vtkmExternalFaces_h -// VTK-HeaderTest-Exclude: vtkmExternalFaces.h diff --git a/Accelerators/Vtkm/vtkmExtractVOI.cxx b/Accelerators/Vtkm/vtkmExtractVOI.cxx deleted file mode 100644 index 9063524cb..000000000 --- a/Accelerators/Vtkm/vtkmExtractVOI.cxx +++ /dev/null @@ -1,103 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkExtractVOI.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkmExtractVOI.h" - -#include "vtkCellData.h" -#include "vtkExtractStructuredGridHelper.h" -#include "vtkImageData.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkPointData.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/ImageDataConverter.h" - -#include "vtkmFilterPolicy.h" - -#include "vtkm/filter/ExtractStructured.h" -#include "vtkm/filter/ExtractStructured.hxx" - -namespace -{ - -struct InputFilterPolicy : public vtkmInputFilterPolicy -{ - using StructuredCellSetList = vtkm::List, - vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3> >; -}; - -} - -vtkStandardNewMacro(vtkmExtractVOI); - -//------------------------------------------------------------------------------ -void vtkmExtractVOI::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} - -//------------------------------------------------------------------------------ -vtkmExtractVOI::vtkmExtractVOI() = default; -vtkmExtractVOI::~vtkmExtractVOI() = default; - -//------------------------------------------------------------------------------ -int vtkmExtractVOI::RequestData( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - - vtkImageData* input = vtkImageData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkImageData* output = vtkImageData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - try - { - // convert the input dataset to a vtkm::cont::DataSet - auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - - // transform VOI - int inExtents[6], voi[6]; - input->GetExtent(inExtents); - for (int i = 0; i < 6; i += 2) - { - voi[i] = this->VOI[i] - inExtents[i]; - voi[i + 1] = this->VOI[i + 1] - inExtents[i] + 1; - } - - // apply the filter - vtkm::filter::PolicyBase policy; - vtkm::filter::ExtractStructured filter; - filter.SetVOI(voi[0], voi[1], voi[2], voi[3], voi[4], voi[5]); - filter.SetSampleRate(this->SampleRate[0], this->SampleRate[1], this->SampleRate[2]); - filter.SetIncludeBoundary((this->IncludeBoundary != 0)); - auto result = filter.Execute(in, policy); - - // convert back to vtkImageData - int outExtents[6]; - this->Internal->GetOutputWholeExtent(outExtents); - if (!fromvtkm::Convert(result, outExtents, output, input)) - { - vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage() << "Falling back to vtkExtractVOI"); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - - return 1; -} diff --git a/Accelerators/Vtkm/vtkmExtractVOI.h b/Accelerators/Vtkm/vtkmExtractVOI.h deleted file mode 100644 index e41ba0207..000000000 --- a/Accelerators/Vtkm/vtkmExtractVOI.h +++ /dev/null @@ -1,60 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkExtractVOI.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/** - * @class vtkmExtractVOI - * @brief select piece (e.g., volume of interest) and/or subsample structured points dataset - * - * vtkmExtractVOI is a filter that selects a portion of an input structured - * points dataset, or subsamples an input dataset. (The selected portion of - * interested is referred to as the Volume Of Interest, or VOI.) The output of - * this filter is a structured points dataset. The filter treats input data - * of any topological dimension (i.e., point, line, image, or volume) and can - * generate output data of any topological dimension. - * - * To use this filter set the VOI ivar which are i-j-k min/max indices that - * specify a rectangular region in the data. (Note that these are 0-offset.) - * You can also specify a sampling rate to subsample the data. - * - * Typical applications of this filter are to extract a slice from a volume - * for image processing, subsampling large volumes to reduce data size, or - * extracting regions of a volume with interesting data. - * - */ -#ifndef vtkmExtractVOI_h -#define vtkmExtractVOI_h - -#include "vtkAcceleratorsVTKmModule.h" // for export macro -#include "vtkExtractVOI.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmExtractVOI : public vtkExtractVOI -{ -public: - vtkTypeMacro(vtkmExtractVOI, vtkExtractVOI); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmExtractVOI* New(); - -protected: - vtkmExtractVOI(); - ~vtkmExtractVOI() override; - - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmExtractVOI(const vtkmExtractVOI&) = delete; - void operator=(const vtkmExtractVOI&) = delete; -}; - -#endif // vtkmExtractVOI_h -// VTK-HeaderTest-Exclude: vtkmExtractVOI.h diff --git a/Accelerators/Vtkm/vtkmFilterPolicy.h b/Accelerators/Vtkm/vtkmFilterPolicy.h deleted file mode 100644 index c813b5b8f..000000000 --- a/Accelerators/Vtkm/vtkmFilterPolicy.h +++ /dev/null @@ -1,149 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#ifndef vtkmFilterPolicy_h -#define vtkmFilterPolicy_h -#ifndef __VTK_WRAP__ -#ifndef VTK_WRAPPING_CXX - -#include "vtkmConfig.h" //required for general vtkm setup - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace tovtkm -{ - -//------------------------------------------------------------------------------ -// All scalar types in vtkType.h -using VTKScalarTypes = vtkm::List< // - char, // - signed char, // - unsigned char, // - short, // - unsigned short, // - int, // - unsigned int, // - long, // - unsigned long, // - long long, // - unsigned long long, // - float, // - double // - >; - -using SpecialGradientOutTypes = - vtkm::List, 3>, vtkm::Vec, 3> >; - -using FieldTypeInVTK = vtkm::ListAppend; - -using FieldTypeOutVTK = - vtkm::ListAppend; - -//------------------------------------------------------------------------------ -using CellListStructuredInVTK = - vtkm::List, vtkm::cont::CellSetStructured<2> >; -using CellListStructuredOutVTK = - vtkm::List >, - vtkm::cont::CellSetPermutation > >; - -// vtkCellArray may use either 32 or 64 bit arrays to hold connectivity/offset -// data, so we may be using ArrayHandleCast to convert to vtkm::Ids. -#ifdef VTKM_USE_64BIT_IDS -using Int32AOSHandle = vtkm::cont::ArrayHandle; -using Int32AsIdAOSHandle = vtkm::cont::ArrayHandleCast; -using Int32AsIdAOSStorage = typename Int32AsIdAOSHandle::StorageTag; - -using CellSetExplicit32Bit = vtkm::cont::CellSetExplicit; -using CellSetExplicit64Bit = vtkm::cont::CellSetExplicit; -using CellSetSingleType32Bit = vtkm::cont::CellSetSingleType; -using CellSetSingleType64Bit = vtkm::cont::CellSetSingleType; -#else // VTKM_USE_64BIT_IDS -using Int64AOSHandle = vtkm::cont::ArrayHandle; -using Int64AsIdAOSHandle = vtkm::cont::ArrayHandleCast; -using Int64AsIdAOSStorage = typename Int64AsIdAOSHandle::StorageTag; - -using CellSetExplicit32Bit = vtkm::cont::CellSetExplicit; -using CellSetExplicit64Bit = vtkm::cont::CellSetExplicit; -using CellSetSingleType32Bit = vtkm::cont::CellSetSingleType; -using CellSetSingleType64Bit = vtkm::cont::CellSetSingleType; -#endif // VTKM_USE_64BIT_IDS - -//------------------------------------------------------------------------------ -using CellListUnstructuredInVTK = vtkm::List< // - CellSetExplicit32Bit, // - CellSetExplicit64Bit, // - CellSetSingleType32Bit, // - CellSetSingleType64Bit // - >; - -using CellListUnstructuredOutVTK = vtkm::List< // - vtkm::cont::CellSetExplicit<>, // - vtkm::cont::CellSetSingleType<>, // - CellSetExplicit32Bit, // - CellSetExplicit64Bit, // - CellSetSingleType32Bit, // - CellSetSingleType64Bit, // - vtkm::cont::CellSetPermutation, // - vtkm::cont::CellSetPermutation, // - vtkm::cont::CellSetPermutation, // - vtkm::cont::CellSetPermutation, // - vtkm::cont::CellSetPermutation >, // - vtkm::cont::CellSetPermutation > // - >; - -//------------------------------------------------------------------------------ -using CellListAllInVTK = vtkm::ListAppend; -using CellListAllOutVTK = vtkm::ListAppend; - -} // end namespace tovtkm - -//------------------------------------------------------------------------------ -class vtkmInputFilterPolicy : public vtkm::filter::PolicyBase -{ -public: - using FieldTypeList = tovtkm::FieldTypeInVTK; - - using StructuredCellSetList = tovtkm::CellListStructuredInVTK; - using UnstructuredCellSetList = tovtkm::CellListUnstructuredInVTK; - using AllCellSetList = tovtkm::CellListAllInVTK; -}; - -//------------------------------------------------------------------------------ -class vtkmOutputFilterPolicy : public vtkm::filter::PolicyBase -{ -public: - using FieldTypeList = tovtkm::FieldTypeOutVTK; - - using StructuredCellSetList = tovtkm::CellListStructuredOutVTK; - using UnstructuredCellSetList = tovtkm::CellListUnstructuredOutVTK; - using AllCellSetList = tovtkm::CellListAllOutVTK; -}; - -#endif -#endif -#endif -// VTK-HeaderTest-Exclude: vtkmFilterPolicy.h diff --git a/Accelerators/Vtkm/vtkmGradient.cxx b/Accelerators/Vtkm/vtkmGradient.cxx deleted file mode 100644 index 488a94dfc..000000000 --- a/Accelerators/Vtkm/vtkmGradient.cxx +++ /dev/null @@ -1,258 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmGradient.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkNew.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" -#include "vtkmlib/PolyDataConverter.h" - -#include "vtkmFilterPolicy.h" - -#include -#include -#include - -vtkStandardNewMacro(vtkmGradient); - -namespace -{ -using GradientTypes = vtkm::List< // - vtkm::Float32, // - vtkm::Float64, // - vtkm::Vec, // - vtkm::Vec, // - vtkm::Vec, 3>, // - vtkm::Vec, 3> // - >; - -//------------------------------------------------------------------------------ -class vtkmGradientFilterPolicy : public vtkm::filter::PolicyBase -{ -public: - using FieldTypeList = GradientTypes; - - using StructuredCellSetList = tovtkm::CellListStructuredInVTK; - using UnstructuredCellSetList = tovtkm::CellListUnstructuredInVTK; - using AllCellSetList = tovtkm::CellListAllInVTK; -}; - -inline vtkm::cont::DataSet CopyDataSetStructure(const vtkm::cont::DataSet& ds) -{ - vtkm::cont::DataSet cp; - cp.CopyStructure(ds); - return cp; -} - -} // anonymous namespace - -//------------------------------------------------------------------------------ -vtkmGradient::vtkmGradient() {} - -//------------------------------------------------------------------------------ -vtkmGradient::~vtkmGradient() {} - -//------------------------------------------------------------------------------ -void vtkmGradient::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} - -//------------------------------------------------------------------------------ -int vtkmGradient::RequestData( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - output->ShallowCopy(input); - - // grab the input array to process to determine the field want to compute - // the gradient for - int association = this->GetInputArrayAssociation(0, inputVector); - vtkDataArray* inputArray = this->GetInputArrayToProcess(0, inputVector); - if (inputArray == nullptr || inputArray->GetName() == nullptr || inputArray->GetName()[0] == '\0') - { - vtkErrorMacro("Invalid input array."); - return 0; - } - - try - { - // convert the input dataset to a vtkm::cont::DataSet. We explicitly drop - // all arrays from the conversion as this algorithm doesn't change topology - // and therefore doesn't need input fields converted through the VTK-m filter - auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::None); - vtkm::cont::Field field = tovtkm::Convert(inputArray, association); - in.AddField(field); - - const bool fieldIsPoint = field.GetAssociation() == vtkm::cont::Field::Association::POINTS; - const bool fieldIsCell = field.GetAssociation() == vtkm::cont::Field::Association::CELL_SET; - const bool fieldIsVec = (inputArray->GetNumberOfComponents() == 3); - const bool fieldIsScalar = - inputArray->GetDataType() == VTK_FLOAT || inputArray->GetDataType() == VTK_DOUBLE; - const bool fieldValid = - (fieldIsPoint || fieldIsCell) && fieldIsScalar && (field.GetName() != std::string()); - - if (!fieldValid) - { - vtkWarningMacro(<< "Unsupported field type\n" - << "Falling back to vtkGradientFilter."); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - - vtkmGradientFilterPolicy policy; - auto passNoFields = vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE); - vtkm::filter::Gradient filter; - filter.SetFieldsToPass(passNoFields); - filter.SetColumnMajorOrdering(); - - if (fieldIsVec) - { // this properties are only valid when processing a vec<3> field - filter.SetComputeDivergence(this->ComputeDivergence != 0); - filter.SetComputeVorticity(this->ComputeVorticity != 0); - filter.SetComputeQCriterion(this->ComputeQCriterion != 0); - } - - if (this->ResultArrayName) - { - filter.SetOutputFieldName(this->ResultArrayName); - } - - if (this->DivergenceArrayName) - { - filter.SetDivergenceName(this->DivergenceArrayName); - } - - if (this->VorticityArrayName) - { - filter.SetVorticityName(this->VorticityArrayName); - } - - if (this->QCriterionArrayName) - { - filter.SetQCriterionName(this->QCriterionArrayName); - } - else - { - filter.SetQCriterionName("Q-criterion"); - } - - // Run the VTK-m Gradient Filter - // ----------------------------- - vtkm::cont::DataSet result; - if (fieldIsPoint) - { - filter.SetComputePointGradient(!this->FasterApproximation); - filter.SetActiveField(field.GetName(), vtkm::cont::Field::Association::POINTS); - result = filter.Execute(in, policy); - - // When we have faster approximation enabled the VTK-m gradient will output - // a cell field not a point field. So at that point we will need to convert - // back to a point field - if (this->FasterApproximation) - { - vtkm::filter::PointAverage cellToPoint; - cellToPoint.SetFieldsToPass(passNoFields); - - auto c2pIn = result; - result = CopyDataSetStructure(result); - - if (this->ComputeGradient) - { - cellToPoint.SetActiveField( - filter.GetOutputFieldName(), vtkm::cont::Field::Association::CELL_SET); - auto ds = cellToPoint.Execute(c2pIn, policy); - result.AddField(ds.GetField(0)); - } - if (this->ComputeDivergence && fieldIsVec) - { - cellToPoint.SetActiveField( - filter.GetDivergenceName(), vtkm::cont::Field::Association::CELL_SET); - auto ds = cellToPoint.Execute(c2pIn, policy); - result.AddField(ds.GetField(0)); - } - if (this->ComputeVorticity && fieldIsVec) - { - cellToPoint.SetActiveField( - filter.GetVorticityName(), vtkm::cont::Field::Association::CELL_SET); - auto ds = cellToPoint.Execute(c2pIn, policy); - result.AddField(ds.GetField(0)); - } - if (this->ComputeQCriterion && fieldIsVec) - { - cellToPoint.SetActiveField( - filter.GetQCriterionName(), vtkm::cont::Field::Association::CELL_SET); - auto ds = cellToPoint.Execute(c2pIn, policy); - result.AddField(ds.GetField(0)); - } - } - } - else - { - // we need to convert the field to be a point field - vtkm::filter::PointAverage cellToPoint; - cellToPoint.SetFieldsToPass(passNoFields); - cellToPoint.SetActiveField(field.GetName(), field.GetAssociation()); - cellToPoint.SetOutputFieldName(field.GetName()); - in = cellToPoint.Execute(in, policy); - - filter.SetComputePointGradient(false); - filter.SetActiveField(field.GetName(), vtkm::cont::Field::Association::POINTS); - result = filter.Execute(in, policy); - } - - // Remove gradient field from result if it was not requested. - auto requestedResult = result; - if (!this->ComputeGradient) - { - requestedResult = CopyDataSetStructure(result); - vtkm::Id numOfFields = static_cast(result.GetNumberOfFields()); - for (vtkm::Id i = 0; i < numOfFields; ++i) - { - if (result.GetField(i).GetName() != filter.GetOutputFieldName()) - { - requestedResult.AddField(result.GetField(i)); - } - } - } - - // convert arrays back to VTK - if (!fromvtkm::ConvertArrays(result, output)) - { - vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() - << "Falling back to serial implementation."); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - - return 1; -} diff --git a/Accelerators/Vtkm/vtkmGradient.h b/Accelerators/Vtkm/vtkmGradient.h deleted file mode 100644 index 6512951c2..000000000 --- a/Accelerators/Vtkm/vtkmGradient.h +++ /dev/null @@ -1,58 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmGradient - * @brief A general filter for gradient estimation. - * - * Estimates the gradient of a field in a data set. The gradient calculation - * is dependent on the input dataset type. The created gradient array - * is of the same type as the array it is calculated from (e.g. point data - * or cell data) as well as data type (e.g. float, double). The output array has - * 3*number of components of the input data array. The ordering for the - * output tuple will be {du/dx, du/dy, du/dz, dv/dx, dv/dy, dv/dz, dw/dx, - * dw/dy, dw/dz} for an input array {u, v, w}. - * - * Also options to additionally compute the divergence, vorticity and - * Q criterion of input vector fields. - * - */ - -#ifndef vtkmGradient_h -#define vtkmGradient_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkGradientFilter.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmGradient : public vtkGradientFilter -{ -public: - vtkTypeMacro(vtkmGradient, vtkGradientFilter); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmGradient* New(); - -protected: - vtkmGradient(); - ~vtkmGradient() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmGradient(const vtkmGradient&) = delete; - void operator=(const vtkmGradient&) = delete; -}; - -#endif // vtkmGradient_h -// VTK-HeaderTest-Exclude: vtkmGradient.h diff --git a/Accelerators/Vtkm/vtkmHistogram.cxx b/Accelerators/Vtkm/vtkmHistogram.cxx deleted file mode 100644 index 80bb82a8f..000000000 --- a/Accelerators/Vtkm/vtkmHistogram.cxx +++ /dev/null @@ -1,168 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkElevationFilter.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkmHistogram.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkDoubleArray.h" -#include "vtkFieldData.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkPointData.h" -#include "vtkTable.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkSmartPointer.h" - -#include "vtkmFilterPolicy.h" -#include -#include - -vtkStandardNewMacro(vtkmHistogram); - -//------------------------------------------------------------------------------ -vtkmHistogram::vtkmHistogram() -{ - this->CustomBinRange[0] = 0; - this->CustomBinRange[0] = 100; - this->UseCustomBinRanges = false; - this->CenterBinsAroundMinAndMax = false; - this->NumberOfBins = 10; -} - -//------------------------------------------------------------------------------ -vtkmHistogram::~vtkmHistogram() {} - -//----------------------------------------------------------------------------- -int vtkmHistogram::FillInputPortInformation(int port, vtkInformation* info) -{ - this->Superclass::FillInputPortInformation(port, info); - - info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataObject"); - return 1; -} - -//------------------------------------------------------------------------------ -int vtkmHistogram::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkTable* output = vtkTable::GetData(outputVector, 0); - output->Initialize(); - - // These are the mid-points for each of the bins - vtkSmartPointer binExtents = vtkSmartPointer::New(); - binExtents->SetNumberOfComponents(1); - binExtents->SetNumberOfTuples(static_cast(this->NumberOfBins)); - binExtents->SetName("bin_extents"); - binExtents->FillComponent(0, 0.0); - - // Grab the input array to process to determine the field we want to apply histogram - int association = this->GetInputArrayAssociation(0, inputVector); - auto fieldArray = this->GetInputArrayToProcess(0, inputVector); - if ((association != vtkDataObject::FIELD_ASSOCIATION_POINTS && - association != vtkDataObject::FIELD_ASSOCIATION_CELLS) || - fieldArray == nullptr || fieldArray->GetName() == nullptr || fieldArray->GetName()[0] == '\0') - { - vtkErrorMacro(<< "Invalid field: Requires a point or cell field with a valid name."); - return 0; - } - - const char* fieldName = fieldArray->GetName(); - - try - { - vtkm::cont::DataSet in = tovtkm::Convert(input); - auto field = tovtkm::Convert(fieldArray, association); - in.AddField(field); - - vtkmInputFilterPolicy policy; - vtkm::filter::Histogram filter; - - filter.SetNumberOfBins(static_cast(this->NumberOfBins)); - filter.SetActiveField(fieldName, field.GetAssociation()); - if (this->UseCustomBinRanges) - { - if (this->CustomBinRange[0] > this->CustomBinRange[1]) - { - vtkWarningMacro("Custom bin range adjusted to keep min <= max value"); - double min = this->CustomBinRange[1]; - double max = this->CustomBinRange[0]; - this->CustomBinRange[0] = min; - this->CustomBinRange[1] = max; - } - filter.SetRange(vtkm::Range(this->CustomBinRange[0], this->CustomBinRange[1])); - } - auto result = filter.Execute(in, policy); - this->BinDelta = filter.GetBinDelta(); - this->ComputedRange[0] = filter.GetComputedRange().Min; - this->ComputedRange[1] = filter.GetComputedRange().Max; - - // Convert the result back - vtkDataArray* resultingArray = fromvtkm::Convert(result.GetField("histogram")); - resultingArray->SetName("bin_values"); - if (resultingArray == nullptr) - { - vtkErrorMacro(<< "Unable to convert result array from VTK-m to VTK"); - return 0; - } - this->FillBinExtents(binExtents); - output->GetRowData()->AddArray(binExtents); - output->GetRowData()->AddArray(resultingArray); - - resultingArray->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmHistogram::PrintSelf(std::ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - - os << indent << "NumberOfBins: " << NumberOfBins << "\n"; - os << indent << "UseCustomBinRanges: " << UseCustomBinRanges << "\n"; - os << indent << "CenterBinsAroundMinAndMax: " << CenterBinsAroundMinAndMax << "\n"; - os << indent << "CustomBinRange: " << CustomBinRange[0] << ", " << CustomBinRange[1] << "\n"; -} - -//------------------------------------------------------------------------------ -void vtkmHistogram::FillBinExtents(vtkDoubleArray* binExtents) -{ - binExtents->SetNumberOfComponents(1); - binExtents->SetNumberOfTuples(static_cast(this->NumberOfBins)); - double binDelta = this->CenterBinsAroundMinAndMax - ? ((this->ComputedRange[1] - this->ComputedRange[0]) / (this->NumberOfBins - 1)) - : this->BinDelta; - double halfBinDelta = binDelta / 2.0; - for (vtkIdType i = 0; i < static_cast(this->NumberOfBins); i++) - { - binExtents->SetValue(i, - this->ComputedRange[0] + (i * binDelta) + - (this->CenterBinsAroundMinAndMax ? 0.0 : halfBinDelta)); - } -} diff --git a/Accelerators/Vtkm/vtkmHistogram.h b/Accelerators/Vtkm/vtkmHistogram.h deleted file mode 100644 index b11bc9514..000000000 --- a/Accelerators/Vtkm/vtkmHistogram.h +++ /dev/null @@ -1,115 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmHistogram - * @brief generate a histogram out of a scalar data - * - * vtkmHistogram is a filter that generates a histogram out of a scalar data. - * The histogram consists of a certain number of bins specified by the user, and - * the user can fetch the range and bin delta after completion. - * - */ - -#ifndef vtkmHistogram_h -#define vtkmHistogram_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct export -#include "vtkTableAlgorithm.h" - -class vtkDoubleArray; - -class VTKACCELERATORSVTKM_EXPORT vtkmHistogram : public vtkTableAlgorithm -{ -public: - vtkTypeMacro(vtkmHistogram, vtkTableAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmHistogram* New(); - - //@{ - /** - * Specify number of bins. Default is 10. - */ - vtkSetMacro(NumberOfBins, size_t); - vtkGetMacro(NumberOfBins, size_t); - //@} - - //@{ - /** - * Specify the range to use to generate the histogram. They are only used when - * UseCustomBinRanges is set to true. - */ - vtkSetVector2Macro(CustomBinRange, double); - vtkGetVector2Macro(CustomBinRange, double); - //@} - - //@{ - /** - * When set to true, CustomBinRanges will be used instead of using the full - * range for the selected array. By default, set to false. - */ - vtkSetMacro(UseCustomBinRanges, bool); - vtkGetMacro(UseCustomBinRanges, bool); - vtkBooleanMacro(UseCustomBinRanges, bool); - //@} - - //@{ - /** - * Get/Set if first and last bins must be centered around the min and max - * data. This is only used when UseCustomBinRanges is set to false. - * Default is false. - */ - vtkSetMacro(CenterBinsAroundMinAndMax, bool); - vtkGetMacro(CenterBinsAroundMinAndMax, bool); - vtkBooleanMacro(CenterBinsAroundMinAndMax, bool); - //@} - - //@{ - /** - * Return the range used to generate the histogram. - */ - vtkGetVectorMacro(ComputedRange, double, 2); - //@} - - //@{ - /** - * Return the bin delta of the computed field. - */ - vtkGetMacro(BinDelta, double); - //@} - -protected: - vtkmHistogram(); - ~vtkmHistogram() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - int FillInputPortInformation(int port, vtkInformation* info) override; - -private: - vtkmHistogram(const vtkmHistogram&) = delete; - void operator=(const vtkmHistogram&) = delete; - - void FillBinExtents(vtkDoubleArray* binExtents); - - size_t NumberOfBins; - double BinDelta; - double CustomBinRange[2]; - bool UseCustomBinRanges; - bool CenterBinsAroundMinAndMax; - double ComputedRange[2]; -}; - -#endif // vtkmHistogram_h -// VTK-HeaderTest-Exclude: vtkmHistogram.h diff --git a/Accelerators/Vtkm/vtkmImageConnectivity.cxx b/Accelerators/Vtkm/vtkmImageConnectivity.cxx deleted file mode 100644 index 425d1869b..000000000 --- a/Accelerators/Vtkm/vtkmImageConnectivity.cxx +++ /dev/null @@ -1,102 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmImageConnectivity.h" - -#include "vtkImageData.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkNew.h" -#include "vtkObjectFactory.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" -#include "vtkmlib/PolyDataConverter.h" - -#include "vtkmFilterPolicy.h" - -#include - -vtkStandardNewMacro(vtkmImageConnectivity); - -//------------------------------------------------------------------------------ -vtkmImageConnectivity::vtkmImageConnectivity() {} - -//------------------------------------------------------------------------------ -vtkmImageConnectivity::~vtkmImageConnectivity() {} - -//------------------------------------------------------------------------------ -void vtkmImageConnectivity::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} - -//------------------------------------------------------------------------------ -int vtkmImageConnectivity::RequestData( - vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - - vtkImageData* output = static_cast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkImageData* input = static_cast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - // Find the scalar array: - int association = this->GetInputArrayAssociation(0, inputVector); - vtkDataArray* inputArray = this->GetInputArrayToProcess(0, inputVector); - if (association != vtkDataObject::FIELD_ASSOCIATION_POINTS || inputArray == nullptr || - inputArray->GetName() == nullptr || inputArray->GetName()[0] == '\0') - { - vtkErrorMacro("Invalid scalar array; array missing or not a point array."); - return 0; - } - - try - { - vtkm::filter::ImageConnectivity filter; - filter.SetActiveField(inputArray->GetName(), vtkm::cont::Field::Association::POINTS); - // the field should be named 'RegionId' - filter.SetOutputFieldName("RegionId"); - - // explicitly convert just the field we need - auto inData = tovtkm::Convert(input, tovtkm::FieldsFlag::None); - auto inField = tovtkm::Convert(inputArray, association); - inData.AddField(inField); - - // don't pass this field - filter.SetFieldsToPass(vtkm::filter::FieldSelection(vtkm::filter::FieldSelection::MODE_NONE)); - - vtkm::cont::DataSet result; - vtkmInputFilterPolicy policy; - result = filter.Execute(inData, policy); - - // Make sure the output has all the fields / etc that the input has - output->ShallowCopy(input); - - // convert back the regionId field to VTK - if (!fromvtkm::ConvertArrays(result, output)) - { - vtkWarningMacro(<< "Unable to convert VTKm DataSet back to VTK.\n" - << "Falling back to serial implementation."); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - return 1; -} diff --git a/Accelerators/Vtkm/vtkmImageConnectivity.h b/Accelerators/Vtkm/vtkmImageConnectivity.h deleted file mode 100644 index ce39d3023..000000000 --- a/Accelerators/Vtkm/vtkmImageConnectivity.h +++ /dev/null @@ -1,62 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmImageConnectivity - * @brief Label regions inside an image by connectivity - * - * vtkmImageConnectivity will identify connected regions within an - * image and label them. - * The filter finds groups of points that have the same field value and are - * connected together through their topology. Any point is considered to be - * connected to its Moore neighborhood: - * - 8 neighboring points for 2D - * - 27 neighboring points for 3D - * - * The active field passed to the filter must be associated with the points. - * The result of the filter is a point field of type vtkIdType. - * Each entry in the point field will be a number that identifies to which - * region it belongs. By default, this output point field is named “component”. - * - * @sa - * vtkConnectivityFilter, vtkImageConnectivityFilter - */ - -#ifndef vtkmImageConnectivity_h -#define vtkmImageConnectivity_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkImageAlgorithm.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmImageConnectivity : public vtkImageAlgorithm -{ -public: - vtkTypeMacro(vtkmImageConnectivity, vtkImageAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmImageConnectivity* New(); - -protected: - vtkmImageConnectivity(); - ~vtkmImageConnectivity() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmImageConnectivity(const vtkmImageConnectivity&) = delete; - void operator=(const vtkmImageConnectivity&) = delete; -}; - -#endif // vtkmImageConnectivity_h -// VTK-HeaderTest-Exclude: vtkmImageConnectivity.h diff --git a/Accelerators/Vtkm/vtkmLevelOfDetail.cxx b/Accelerators/Vtkm/vtkmLevelOfDetail.cxx deleted file mode 100644 index 89f1c7a5a..000000000 --- a/Accelerators/Vtkm/vtkmLevelOfDetail.cxx +++ /dev/null @@ -1,169 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmLevelOfDetail.h" -#include "vtkmConfig.h" - -#include "vtkDataSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkNew.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" -#include "vtkmlib/PolyDataConverter.h" - -#include "vtkmFilterPolicy.h" - -#include -// To handle computing custom coordinate sets bounds we need to include -// the following -#include - -vtkStandardNewMacro(vtkmLevelOfDetail); - -//------------------------------------------------------------------------------ -vtkmLevelOfDetail::vtkmLevelOfDetail() -{ - this->NumberOfDivisions[0] = 512; - this->NumberOfDivisions[1] = 512; - this->NumberOfDivisions[2] = 512; -} - -//------------------------------------------------------------------------------ -vtkmLevelOfDetail::~vtkmLevelOfDetail() {} - -//------------------------------------------------------------------------------ -void vtkmLevelOfDetail::SetNumberOfXDivisions(int num) -{ - this->Modified(); - this->NumberOfDivisions[0] = num; -} - -//------------------------------------------------------------------------------ -void vtkmLevelOfDetail::SetNumberOfYDivisions(int num) -{ - this->Modified(); - this->NumberOfDivisions[1] = num; -} - -//------------------------------------------------------------------------------ -void vtkmLevelOfDetail::SetNumberOfZDivisions(int num) -{ - this->Modified(); - this->NumberOfDivisions[2] = num; -} - -//------------------------------------------------------------------------------ -int vtkmLevelOfDetail::GetNumberOfXDivisions() -{ - return this->NumberOfDivisions[0]; -} - -//------------------------------------------------------------------------------ -int vtkmLevelOfDetail::GetNumberOfYDivisions() -{ - return this->NumberOfDivisions[1]; -} - -//------------------------------------------------------------------------------ -int vtkmLevelOfDetail::GetNumberOfZDivisions() -{ - return this->NumberOfDivisions[2]; -} - -//------------------------------------------------------------------------------ -void vtkmLevelOfDetail::SetNumberOfDivisions(int div0, int div1, int div2) -{ - this->Modified(); - this->NumberOfDivisions[0] = div0; - this->NumberOfDivisions[1] = div1; - this->NumberOfDivisions[2] = div2; -} - -//------------------------------------------------------------------------------ -const int* vtkmLevelOfDetail::GetNumberOfDivisions() -{ - return this->NumberOfDivisions; -} - -//------------------------------------------------------------------------------ -void vtkmLevelOfDetail::GetNumberOfDivisions(int div[3]) -{ - div[0] = this->NumberOfDivisions[0]; - div[1] = this->NumberOfDivisions[1]; - div[2] = this->NumberOfDivisions[1]; -} - -//------------------------------------------------------------------------------ -int vtkmLevelOfDetail::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - if (!input || input->GetNumberOfPoints() == 0) - { - // empty output for empty inputs - return 1; - } - - try - { - // convert the input dataset to a vtkm::cont::DataSet - auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - if (in.GetNumberOfCells() == 0 || in.GetNumberOfPoints() == 0) - { - return 0; - } - - vtkmInputFilterPolicy policy; - vtkm::filter::VertexClustering filter; - filter.SetNumberOfDivisions(vtkm::make_Vec( - this->NumberOfDivisions[0], this->NumberOfDivisions[1], this->NumberOfDivisions[2])); - - auto result = filter.Execute(in, policy); - - // convert back the dataset to VTK - if (!fromvtkm::Convert(result, output, input)) - { - vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmLevelOfDetail::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - - os << indent << "Number of X Divisions: " << this->NumberOfDivisions[0] << "\n"; - os << indent << "Number of Y Divisions: " << this->NumberOfDivisions[1] << "\n"; - os << indent << "Number of Z Divisions: " << this->NumberOfDivisions[2] << "\n"; -} diff --git a/Accelerators/Vtkm/vtkmLevelOfDetail.h b/Accelerators/Vtkm/vtkmLevelOfDetail.h deleted file mode 100644 index 7fa56c93a..000000000 --- a/Accelerators/Vtkm/vtkmLevelOfDetail.h +++ /dev/null @@ -1,96 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmLevelOfDetail - * @brief reduce the number of triangles in a mesh - * - * vtkmLevelOfDetail is a filter to reduce the number of triangles in a - * triangle mesh, forming a good approximation to the original geometry. The - * input to vtkmLevelOfDetail is a vtkPolyData or vtkUnstrcutredGrid object, - * and only triangles are treated. If you desire to decimate polygonal meshes, - * first triangulate the polygons with vtkTriangleFilter object. - * - * The general approach of the algorithm is to cluster vertices in a uniform - * binning of space, accumulating to an average point within each bin. In - * more detail, the algorithm first gets the bounds of the input poly data. - * It then breaks this bounding volume into a user-specified number of - * spatial bins. It then reads each triangle from the input and hashes its - * vertices into these bins. Then, if 2 or more vertices of - * the triangle fall in the same bin, the triangle is dicarded. If the - * triangle is not discarded, it adds the triangle to the list of output - * triangles as a list of vertex identifiers. (There is one vertex id per - * bin.) After all the triangles have been read, the representative vertex - * for each bin is computed. This determines the spatial location of the - * vertices of each of the triangles in the output. - * - * To use this filter, specify the divisions defining the spatial subdivision - * in the x, y, and z directions. Compared to algorithms such as - * vtkQuadricClustering, a significantly higher bin count is recommended as it - * doesn't increase the computation or memory of the algorithm and will produce - * significantly better results. - * - */ - -#ifndef vtkmLevelOfDetail_h -#define vtkmLevelOfDetail_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkPolyDataAlgorithm.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmLevelOfDetail : public vtkPolyDataAlgorithm -{ -public: - vtkTypeMacro(vtkmLevelOfDetail, vtkPolyDataAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmLevelOfDetail* New(); - - // Description: - // Set/Get the number of divisions along an individual axis for the spatial - // bins. - // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* - // NumberOfZDivisions. - void SetNumberOfXDivisions(int num); - void SetNumberOfYDivisions(int num); - void SetNumberOfZDivisions(int num); - int GetNumberOfXDivisions(); - int GetNumberOfYDivisions(); - int GetNumberOfZDivisions(); - - // Description: - // Set/Get the number of divisions for each axis for the spatial bins. - // The number of spatial bins is NumberOfXDivisions*NumberOfYDivisions* - // NumberOfZDivisions. - void SetNumberOfDivisions(int div[3]) { this->SetNumberOfDivisions(div[0], div[1], div[2]); } - void SetNumberOfDivisions(int div0, int div1, int div2); - - const int* GetNumberOfDivisions(); - void GetNumberOfDivisions(int div[3]); - -protected: - vtkmLevelOfDetail(); - ~vtkmLevelOfDetail() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - int NumberOfDivisions[3]; - - vtkmLevelOfDetail(const vtkmLevelOfDetail&) = delete; - void operator=(const vtkmLevelOfDetail&) = delete; -}; - -#endif // vtkmLevelOfDetail_h -// VTK-HeaderTest-Exclude: vtkmLevelOfDetail.h diff --git a/Accelerators/Vtkm/vtkmNDHistogram.cxx b/Accelerators/Vtkm/vtkmNDHistogram.cxx deleted file mode 100644 index a6302ee64..000000000 --- a/Accelerators/Vtkm/vtkmNDHistogram.cxx +++ /dev/null @@ -1,202 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmNDHistogram.h" -#include "vtkmConfig.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkSparseArray.h" -#include "vtkTable.h" -#include "vtkmFilterPolicy.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include - -vtkStandardNewMacro(vtkmNDHistogram); - -//------------------------------------------------------------------------------ -void vtkmNDHistogram::PrintSelf(std::ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - os << indent << "FieldNames: " - << "\n"; - for (const auto& fieldName : FieldNames) - { - os << indent << fieldName << " "; - } - os << indent << "\n"; - os << indent << "NumberOfBins: " - << "\n"; - for (const auto& nob : NumberOfBins) - { - os << indent << nob << " "; - } - os << indent << "\n"; - os << indent << "BinDeltas: " - << "\n"; - for (const auto& bd : BinDeltas) - { - os << indent << bd << " "; - } - os << indent << "\n"; - os << indent << "DataRanges: " - << "\n"; - for (const auto& dr : DataRanges) - { - os << indent << dr.first << " " << dr.second << " "; - } - os << indent << "\n"; -} - -//------------------------------------------------------------------------------ -vtkmNDHistogram::vtkmNDHistogram() {} - -//------------------------------------------------------------------------------ -vtkmNDHistogram::~vtkmNDHistogram() {} - -//------------------------------------------------------------------------------ -void vtkmNDHistogram::AddFieldAndBin(const std::string& fieldName, const vtkIdType& numberOfBins) -{ - this->FieldNames.push_back(fieldName); - this->NumberOfBins.push_back(numberOfBins); - this->SetInputArrayToProcess(static_cast(this->FieldNames.size()), 0, 0, - vtkDataObject::FIELD_ASSOCIATION_POINTS, fieldName.c_str()); -} - -//------------------------------------------------------------------------------ -double vtkmNDHistogram::GetBinDelta(size_t fieldIndex) -{ - return this->BinDeltas[fieldIndex]; -} - -//------------------------------------------------------------------------------ -std::pair vtkmNDHistogram::GetDataRange(size_t fieldIndex) -{ - return this->DataRanges[fieldIndex]; -} - -//------------------------------------------------------------------------------ -int vtkmNDHistogram::FillInputPortInformation(int port, vtkInformation* info) -{ - this->Superclass::FillInputPortInformation(port, info); - - info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataObject"); - return 1; -} - -//------------------------------------------------------------------------------ -int vtkmNDHistogram::GetFieldIndexFromFieldName(const std::string& fieldName) -{ - auto iter = std::find(this->FieldNames.begin(), this->FieldNames.end(), fieldName); - return (iter == std::end(this->FieldNames)) ? -1 - : static_cast(iter - this->FieldNames.begin()); -} - -//------------------------------------------------------------------------------ -int vtkmNDHistogram::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkArrayData* output = vtkArrayData::GetData(outputVector, 0); - output->ClearArrays(); - - try - { - vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - - vtkmInputFilterPolicy policy; - vtkm::filter::NDHistogram filter; - for (size_t i = 0; i < this->FieldNames.size(); i++) - { - filter.AddFieldAndBin(this->FieldNames[i], this->NumberOfBins[i]); - } - vtkm::cont::DataSet out = filter.Execute(in, policy); - - vtkm::Id numberOfFields = out.GetNumberOfFields(); - this->BinDeltas.clear(); - this->DataRanges.clear(); - this->BinDeltas.reserve(static_cast(numberOfFields)); - this->DataRanges.reserve(static_cast(numberOfFields)); - - // Fetch the field array out of the vtkm filter result - size_t index = 0; - std::vector fArrays; - for (auto& fn : this->FieldNames) - { - vtkDataArray* fnArray = fromvtkm::Convert(out.GetField(fn)); - fnArray->SetName(fn.c_str()); - fArrays.push_back(fnArray); - this->BinDeltas.push_back(filter.GetBinDelta(index)); - this->DataRanges.push_back( - std::make_pair(filter.GetDataRange(index).Min, filter.GetDataRange(index).Max)); - index++; - } - vtkDataArray* frequencyArray = fromvtkm::Convert(out.GetField("Frequency")); - frequencyArray->SetName("Frequency"); - - // Create the sparse array - vtkSparseArray* sparseArray = vtkSparseArray::New(); - vtkArrayExtents sae; // sparse array extent - size_t ndims(fArrays.size()); - sae.SetDimensions(static_cast(ndims)); - for (size_t i = 0; i < ndims; i++) - { - sae[static_cast(i)] = - vtkArrayRange(0, fArrays[i]->GetNumberOfValues()); - } - sparseArray->Resize(sae); - - // Set the dimension label - for (size_t i = 0; i < ndims; i++) - { - sparseArray->SetDimensionLabel(static_cast(i), fArrays[i]->GetName()); - } - // Fill in the sparse array - for (vtkIdType i = 0; i < frequencyArray->GetNumberOfValues(); i++) - { - vtkArrayCoordinates coords; - coords.SetDimensions(static_cast(ndims)); - for (size_t j = 0; j < ndims; j++) - { - coords[static_cast(j)] = fArrays[j]->GetComponent(i, 0); - } - sparseArray->SetValue(coords, frequencyArray->GetComponent(i, 0)); - } - output->AddArray(sparseArray); - - // Clean up the memory - for (auto& fArray : fArrays) - { - fArray->FastDelete(); - } - frequencyArray->FastDelete(); - sparseArray->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - return 1; -} diff --git a/Accelerators/Vtkm/vtkmNDHistogram.h b/Accelerators/Vtkm/vtkmNDHistogram.h deleted file mode 100644 index 76b2ac7f1..000000000 --- a/Accelerators/Vtkm/vtkmNDHistogram.h +++ /dev/null @@ -1,81 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmNDHistogram - * @brief generate a n dimensional histogram field from input fields - * - * vtkmNDhistogram is a filter that generate a n dimensional histogram field from - * some input fields. - * This filter takes a data set and with target fields and bins defined, - * it would generate a N-Dims histogram from input fields. The input fields should - * have the same number of values. - * The result is stored in a field named as "Frequency". This field contains all - * the frequencies of the N-Dims histogram in sparse representation. - * That being said, the result field does not store 0 frequency bins. Meanwhile - * all input fields now would have the same length and store bin ids instead. - * E.g. (FieldA[i], FieldB[i], FieldC[i], Frequency[i]) is a bin in the histogram. - * The first three numbers are binIDs for FieldA, FieldB and FieldC. Frequency[i] stores - * the frequency for this bin (FieldA[i], FieldB[i], FieldC[i]). - */ - -#ifndef vtkmNDHistogram_h -#define vtkmNDHistogram_h - -#include "vtkAcceleratorsVTKmModule.h" // required for correct export -#include "vtkArrayDataAlgorithm.h" -#include -#include - -class VTKACCELERATORSVTKM_EXPORT vtkmNDHistogram : public vtkArrayDataAlgorithm -{ -public: - vtkTypeMacro(vtkmNDHistogram, vtkArrayDataAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - - void AddFieldAndBin(const std::string& fieldName, const vtkIdType& numberOfBins); - - double GetBinDelta(size_t fieldIndex); - std::pair GetDataRange(size_t fieldIndex); - - /** - * @brief GetFieldIndexFromFieldName - * @param fieldName - * @return the index of the fieldName. If it's not in the FieldNames list, a -1 - * would be returned. - */ - int GetFieldIndexFromFieldName(const std::string& fieldName); - - static vtkmNDHistogram* New(); - -protected: - vtkmNDHistogram(); - ~vtkmNDHistogram() override; - - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - int FillInputPortInformation(int port, vtkInformation* info) override; - -private: - vtkmNDHistogram(const vtkmNDHistogram&) = delete; - void operator=(const vtkmNDHistogram&) = delete; - std::vector FieldNames; - std::vector NumberOfBins; - std::vector BinDeltas; - std::vector > DataRanges; -}; - -#endif // vtkmNDHistogram_h - -// VTK-HeaderTest-Exclude: vtkmNDHistogram.h diff --git a/Accelerators/Vtkm/vtkmPointElevation.cxx b/Accelerators/Vtkm/vtkmPointElevation.cxx deleted file mode 100644 index b176acc44..000000000 --- a/Accelerators/Vtkm/vtkmPointElevation.cxx +++ /dev/null @@ -1,99 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmPointElevation.h" -#include "vtkmConfig.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkPointData.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkmFilterPolicy.h" - -#include - -vtkStandardNewMacro(vtkmPointElevation); - -//------------------------------------------------------------------------------ -vtkmPointElevation::vtkmPointElevation() {} - -//------------------------------------------------------------------------------ -vtkmPointElevation::~vtkmPointElevation() {} - -//------------------------------------------------------------------------------ -int vtkmPointElevation::RequestData( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - // Get the input and output data objects. - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - output->ShallowCopy(input); - // Check the size of the input. - vtkIdType numPts = input->GetNumberOfPoints(); - if (numPts < 1) - { - vtkDebugMacro("No input!"); - return 1; - } - - try - { - // Convert the input dataset to a vtkm::cont::DataSet - auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::Points); - - vtkmInputFilterPolicy policy; - // Setup input - vtkm::filter::PointElevation filter; - filter.SetLowPoint(this->LowPoint[0], this->LowPoint[1], this->LowPoint[2]); - filter.SetHighPoint(this->HighPoint[0], this->HighPoint[1], this->HighPoint[2]); - filter.SetRange(this->ScalarRange[0], this->ScalarRange[1]); - filter.SetOutputFieldName("elevation"); - filter.SetUseCoordinateSystemAsField(true); - auto result = filter.Execute(in, policy); - - // Convert the result back - vtkDataArray* resultingArray = fromvtkm::Convert(result.GetField("elevation")); - if (resultingArray == nullptr) - { - vtkErrorMacro(<< "Unable to convert result array from VTK-m to VTK"); - return 0; - } - output->GetPointData()->AddArray(resultingArray); - output->GetPointData()->SetActiveScalars("elevation"); - resultingArray->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage() << "Falling back to serial implementation"); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmPointElevation::PrintSelf(std::ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} diff --git a/Accelerators/Vtkm/vtkmPointElevation.h b/Accelerators/Vtkm/vtkmPointElevation.h deleted file mode 100644 index abc75c0b7..000000000 --- a/Accelerators/Vtkm/vtkmPointElevation.h +++ /dev/null @@ -1,55 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmPointElevation - * @brief generate a scalar field along a specified direction - * - * vtkmPointElevation is a filter that generates a scalar field along a specified - * direction. The scalar field values lie within a user specified range, and are - * generated by computing a projection of each dataset point onto a line. The line - * can be oriented arbitrarily. A typical example is to generate scalars based - * on elevation or height above a plane. - * - */ - -#ifndef vtkmPointElevation_h -#define vtkmPointElevation_h - -#include "vtkAcceleratorsVTKmModule.h" // required for correct export -#include "vtkElevationFilter.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmPointElevation : public vtkElevationFilter -{ -public: - vtkTypeMacro(vtkmPointElevation, vtkElevationFilter); - void PrintSelf(ostream& os, vtkIndent indent) override; - - static vtkmPointElevation* New(); - -protected: - vtkmPointElevation(); - ~vtkmPointElevation() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmPointElevation(const vtkmPointElevation&) = delete; - void operator=(const vtkmPointElevation&) = delete; -}; - -#endif // vtkmPointElevation_h - -// VTK-HeaderTest-Exclude: vtkmPointElevation.h diff --git a/Accelerators/Vtkm/vtkmPointTransform.cxx b/Accelerators/Vtkm/vtkmPointTransform.cxx deleted file mode 100644 index b13026c99..000000000 --- a/Accelerators/Vtkm/vtkmPointTransform.cxx +++ /dev/null @@ -1,171 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkTransformFilter.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkmPointTransform.h" - -#include "vtkCellData.h" -#include "vtkHomogeneousTransform.h" -#include "vtkImageData.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkMatrix4x4.h" -#include "vtkNew.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkRectilinearGrid.h" -#include "vtkRectilinearGridToPointSet.h" -#include "vtkSmartPointer.h" -#include "vtkStructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkm/cont/Error.h" -#include "vtkm/filter/PointTransform.h" -#include "vtkm/filter/PointTransform.hxx" - -#include "vtkmFilterPolicy.h" - -vtkStandardNewMacro(vtkmPointTransform); -vtkCxxSetObjectMacro(vtkmPointTransform, Transform, vtkHomogeneousTransform); - -//------------------------------------------------------------------------------ -vtkmPointTransform::vtkmPointTransform() -{ - this->Transform = nullptr; -} - -//------------------------------------------------------------------------------ -vtkmPointTransform::~vtkmPointTransform() -{ - this->SetTransform(nullptr); -} - -//------------------------------------------------------------------------------ -int vtkmPointTransform::FillInputPortInformation(int vtkNotUsed(port), vtkInformation* info) -{ - info->Remove(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE()); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPointSet"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); - info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkRectilinearGrid"); - return 1; -} - -//------------------------------------------------------------------------------ -int vtkmPointTransform::RequestDataObject( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); - vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); - - if (inImage || inRect) - { - vtkStructuredGrid* output = vtkStructuredGrid::GetData(outputVector); - if (!output) - { - vtkNew newOutput; - outputVector->GetInformationObject(0)->Set(vtkDataObject::DATA_OBJECT(), newOutput); - } - return 1; - } - else - { - return this->Superclass::RequestDataObject(request, inputVector, outputVector); - } -} - -//------------------------------------------------------------------------------ -int vtkmPointTransform::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkSmartPointer input = vtkPointSet::GetData(inputVector[0]); - vtkSmartPointer output = vtkPointSet::GetData(outputVector); - - if (!input) - { - // Try converting rectilinear grid - vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); - if (inRect) - { - vtkNew rectToPoints; - rectToPoints->SetInputData(inRect); - rectToPoints->Update(); - input = rectToPoints->GetOutput(); - } - } - if (!input) - { - vtkErrorMacro(<< "Invalid or missing input"); - return 0; - } - - output->CopyStructure(input); - - vtkPoints* inPts = input->GetPoints(); - - if (!inPts || !this->Transform) - { - vtkDebugMacro(<< "Miss input points or transform matrix"); - return 0; - } - - try - { - vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - vtkMatrix4x4* matrix = this->Transform->GetMatrix(); - vtkm::Matrix vtkmMatrix; - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 4; j++) - { - vtkmMatrix[i][j] = static_cast(matrix->GetElement(i, j)); - } - } - - vtkm::filter::PointTransform pointTransform; - pointTransform.SetUseCoordinateSystemAsField(true); - pointTransform.SetTransform(vtkmMatrix); - - vtkmInputFilterPolicy policy; - auto result = pointTransform.Execute(in, policy); - vtkDataArray* pointTransformResult = - fromvtkm::Convert(result.GetField("transform", vtkm::cont::Field::Association::POINTS)); - vtkPoints* newPts = vtkPoints::New(); - // Update points - newPts->SetNumberOfPoints(pointTransformResult->GetNumberOfTuples()); - newPts->SetData(pointTransformResult); - output->SetPoints(newPts); - newPts->FastDelete(); - pointTransformResult->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - } - - // Update ourselves and release memory - output->GetPointData()->CopyNormalsOff(); // distorted geometry - output->GetPointData()->PassData(input->GetPointData()); - output->GetCellData()->CopyNormalsOff(); // distorted geometry - output->GetCellData()->PassData(input->GetCellData()); - - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmPointTransform::PrintSelf(std::ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - os << indent << "Transform: " << this->Transform << "\n"; -} diff --git a/Accelerators/Vtkm/vtkmPointTransform.h b/Accelerators/Vtkm/vtkmPointTransform.h deleted file mode 100644 index ccdb0cba7..000000000 --- a/Accelerators/Vtkm/vtkmPointTransform.h +++ /dev/null @@ -1,64 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkTransformFilter.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/** - * @class vtkmPointTransform - * @brief transform points via vtkm PointTransform filter - * - * vtkmPointTransform is a filter to transform point coordinates. For now it - * does not support transforming associated point normals and vectors, as well - * as cell normals and vectors with the point coordinates. - */ - -#ifndef vtkmPointTransform_h -#define vtkmPointTransform_h - -#include "vtkAcceleratorsVTKmModule.h" // For export macro -#include "vtkPointSetAlgorithm.h" - -class vtkHomogeneousTransform; - -class VTKACCELERATORSVTKM_EXPORT vtkmPointTransform : public vtkPointSetAlgorithm -{ -public: - vtkTypeMacro(vtkmPointTransform, vtkPointSetAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - - static vtkmPointTransform* New(); - - //@{ - /** - * Specify the transform object used to transform the points - */ - void SetTransform(vtkHomogeneousTransform* tf); - vtkGetObjectMacro(Transform, vtkHomogeneousTransform); - //@} - - int FillInputPortInformation(int port, vtkInformation* info) override; - -protected: - vtkmPointTransform(); - ~vtkmPointTransform() override; - int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector, - vtkInformationVector* outputVector) override; - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - vtkHomogeneousTransform* Transform; - -private: - vtkmPointTransform(const vtkmPointTransform&) = delete; - void operator=(const vtkmPointTransform&) = delete; -}; - -#endif -// VTK-HeaderTest-Exclude: vtkmPointTransform.h diff --git a/Accelerators/Vtkm/vtkmPolyDataNormals.cxx b/Accelerators/Vtkm/vtkmPolyDataNormals.cxx deleted file mode 100644 index dabbd90e5..000000000 --- a/Accelerators/Vtkm/vtkmPolyDataNormals.cxx +++ /dev/null @@ -1,125 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkmPolyDataNormals.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkmPolyDataNormals.h" - -#include "vtkCellData.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" -#include "vtkSmartPointer.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/PolyDataConverter.h" - -#include "vtkmFilterPolicy.h" - -#include "vtkm/filter/SurfaceNormals.h" - -vtkStandardNewMacro(vtkmPolyDataNormals); - -//------------------------------------------------------------------------------ -void vtkmPolyDataNormals::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} - -//------------------------------------------------------------------------------ -vtkmPolyDataNormals::vtkmPolyDataNormals() -{ - // change defaults from parent - this->Splitting = 0; - this->Consistency = 0; - this->FlipNormals = 0; - this->ComputePointNormals = 1; - this->ComputeCellNormals = 0; - this->AutoOrientNormals = 0; -} - -//------------------------------------------------------------------------------ -vtkmPolyDataNormals::~vtkmPolyDataNormals() = default; - -//------------------------------------------------------------------------------ -int vtkmPolyDataNormals::RequestData( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - // get the info objects - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - - // get the input and output - vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - try - { - // convert the input dataset to a vtkm::cont::DataSet - auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::None); - - vtkm::cont::DataSet result; - - // check for flags that vtkm filter cannot handle - bool unsupported = this->Splitting != 0; - if (!unsupported) - { - vtkmInputFilterPolicy policy; - vtkm::filter::SurfaceNormals filter; - filter.SetGenerateCellNormals((this->ComputeCellNormals != 0)); - filter.SetCellNormalsName("Normals"); - filter.SetGeneratePointNormals((this->ComputePointNormals != 0)); - filter.SetPointNormalsName("Normals"); - filter.SetAutoOrientNormals(this->AutoOrientNormals != 0); - filter.SetFlipNormals(this->FlipNormals != 0); - filter.SetConsistency(this->Consistency != 0); - result = filter.Execute(in, policy); - } - else - { - vtkWarningMacro(<< "Unsupported options\n" - << "Falling back to vtkPolyDataNormals."); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - - if (!fromvtkm::Convert(result, output, input)) - { - vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() << "Falling back to vtkPolyDataNormals"); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - - vtkSmartPointer pointNormals = output->GetPointData()->GetArray("Normals"); - vtkSmartPointer cellNormals = output->GetCellData()->GetArray("Normals"); - - output->GetPointData()->CopyNormalsOff(); - output->GetPointData()->PassData(input->GetPointData()); - output->GetCellData()->CopyNormalsOff(); - output->GetCellData()->PassData(input->GetPointData()); - - if (pointNormals) - { - output->GetPointData()->SetNormals(pointNormals); - } - if (cellNormals) - { - output->GetCellData()->SetNormals(cellNormals); - } - - return 1; -} diff --git a/Accelerators/Vtkm/vtkmPolyDataNormals.h b/Accelerators/Vtkm/vtkmPolyDataNormals.h deleted file mode 100644 index e6665f689..000000000 --- a/Accelerators/Vtkm/vtkmPolyDataNormals.h +++ /dev/null @@ -1,67 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkmPolyDataNormals.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/** - * @class vtkmPolyDataNormals - * @brief compute normals for polygonal mesh - * - * vtkmPolyDataNormals is a filter that computes point and/or cell normals - * for a polygonal mesh. The user specifies if they would like the point - * and/or cell normals to be computed by setting the ComputeCellNormals - * and ComputePointNormals flags. - * - * The computed normals (a vtkFloatArray) are set to be the active normals - * (using SetNormals()) of the PointData and/or the CellData (respectively) - * of the output PolyData. The name of these arrays is "Normals". - * - * The algorithm works by determining normals for each polygon and then - * averaging them at shared points. - * - * @warning - * Normals are computed only for polygons and triangles. Normals are - * not computed for lines, vertices, or triangle strips. - * - * @sa - * For high-performance rendering, you could use vtkmTriangleMeshPointNormals - * if you know that you have a triangle mesh which does not require splitting - * nor consistency check on the cell orientations. - * - */ - -#ifndef vtkmPolyDataNormals_h -#define vtkmPolyDataNormals_h - -#include "vtkAcceleratorsVTKmModule.h" // for export macro -#include "vtkPolyDataNormals.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmPolyDataNormals : public vtkPolyDataNormals -{ -public: - vtkTypeMacro(vtkmPolyDataNormals, vtkPolyDataNormals); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmPolyDataNormals* New(); - -protected: - vtkmPolyDataNormals(); - ~vtkmPolyDataNormals() override; - - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmPolyDataNormals(const vtkmPolyDataNormals&) = delete; - void operator=(const vtkmPolyDataNormals&) = delete; -}; - -#endif // vtkmPolyDataNormals_h -// VTK-HeaderTest-Exclude: vtkmPolyDataNormals.h diff --git a/Accelerators/Vtkm/vtkmProbe.cxx b/Accelerators/Vtkm/vtkmProbe.cxx deleted file mode 100644 index 355cfbbe3..000000000 --- a/Accelerators/Vtkm/vtkmProbe.cxx +++ /dev/null @@ -1,265 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmProbe.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkExecutive.h" -#include "vtkImageData.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkStreamingDemandDrivenPipeline.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkmFilterPolicy.h" - -#include "vtkm/filter/Probe.h" - -vtkStandardNewMacro(vtkmProbe); - -//------------------------------------------------------------------------------ -vtkmProbe::vtkmProbe() -{ - this->SetNumberOfInputPorts(2); - this->PassCellArrays = false; - this->PassPointArrays = false; - this->PassFieldArrays = true; - this->ValidPointMaskArrayName = "vtkValidPointMask"; - this->ValidCellMaskArrayName = "vtkValidCellMask"; -} - -//------------------------------------------------------------------------------ -void vtkmProbe::SetSourceData(vtkDataObject* input) -{ - this->SetInputData(1, input); -} - -//------------------------------------------------------------------------------ -vtkDataObject* vtkmProbe::GetSource() -{ - if (this->GetNumberOfInputConnections(1) < 1) - { - return nullptr; - } - return this->GetExecutive()->GetInputData(1, 0); -} - -//------------------------------------------------------------------------------ -void vtkmProbe::SetSourceConnection(vtkAlgorithmOutput* algOutput) -{ - this->SetInputConnection(1, algOutput); -} - -//------------------------------------------------------------------------------ -int vtkmProbe::RequestData(vtkInformation* vtkNotUsed(request), vtkInformationVector** inputVector, - vtkInformationVector* outputVector) -{ - // Get the info objects - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* sourceInfo = inputVector[1]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - - // Get the input and output - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataSet::DATA_OBJECT())); - vtkDataSet* source = vtkDataSet::SafeDownCast(sourceInfo->Get(vtkDataSet::DATA_OBJECT())); - vtkDataSet* output = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataSet::DATA_OBJECT())); - - // Copy the input to the output as a starting point - output->CopyStructure(input); - - try - { - // Convert the input dataset to a vtkm::cont::DataSet - vtkm::cont::DataSet in = tovtkm::Convert(input); - // VTK-m's probe filter requires the source to have at least a cellSet. - vtkm::cont::DataSet so = tovtkm::Convert(source, tovtkm::FieldsFlag::PointsAndCells); - if (so.GetNumberOfCells() <= 0) - { - vtkErrorMacro(<< "The source geometry does not have any cell set," - "aborting vtkmProbe filter"); - return 0; - } - - vtkmInputFilterPolicy policy; - vtkm::filter::Probe probe; - // The input in VTK is the geometry in VTKM and the source in VTK is the input - // in VTKM. - probe.SetGeometry(in); - - auto result = probe.Execute(so, policy); - for (vtkm::Id i = 0; i < result.GetNumberOfFields(); i++) - { - const vtkm::cont::Field& field = result.GetField(i); - vtkDataArray* fieldArray = fromvtkm::Convert(field); - if (field.GetAssociation() == vtkm::cont::Field::Association::POINTS) - { - if (strcmp(fieldArray->GetName(), "HIDDEN") == 0) - { - fieldArray->SetName(this->ValidPointMaskArrayName.c_str()); - } - output->GetPointData()->AddArray(fieldArray); - } - else if (field.GetAssociation() == vtkm::cont::Field::Association::CELL_SET) - { - if (strcmp(fieldArray->GetName(), "HIDDEN") == 0) - { - fieldArray->SetName(this->ValidCellMaskArrayName.c_str()); - } - output->GetCellData()->AddArray(fieldArray); - } - fieldArray->FastDelete(); - } - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - this->PassAttributeData(input, source, output); - - return 1; -} - -//------------------------------------------------------------------------------ -int vtkmProbe::RequestInformation(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - // Update the whole extent in the output - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* sourceInfo = inputVector[1]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - int wholeExtent[6]; - if (inInfo && outInfo) - { - outInfo->CopyEntry(sourceInfo, vtkStreamingDemandDrivenPipeline::TIME_STEPS()); - outInfo->CopyEntry(sourceInfo, vtkStreamingDemandDrivenPipeline::TIME_RANGE()); - inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExtent); - outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExtent, 6); - - // Make sure that the scalar type and number of components - // are propagated from the source not the input. - if (vtkImageData::HasScalarType(sourceInfo)) - { - vtkImageData::SetScalarType(vtkImageData::GetScalarType(sourceInfo), outInfo); - } - if (vtkImageData::HasNumberOfScalarComponents(sourceInfo)) - { - vtkImageData::SetNumberOfScalarComponents( - vtkImageData::GetNumberOfScalarComponents(sourceInfo), outInfo); - } - return 1; - } - vtkErrorMacro("Missing input or output info!"); - return 0; -} - -//------------------------------------------------------------------------------ -int vtkmProbe::RequestUpdateExtent(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* sourceInfo = inputVector[1]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - - if (inInfo && outInfo) - { // Source's update exetent should be independent of the resampling extent - inInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); - sourceInfo->Remove(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()); - if (sourceInfo->Has(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())) - { - sourceInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), - sourceInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()), 6); - } - return 1; - } - vtkErrorMacro("Missing input or output info!"); - return 0; -} - -//------------------------------------------------------------------------------ -void vtkmProbe::PassAttributeData( - vtkDataSet* input, vtkDataObject* vtkNotUsed(source), vtkDataSet* output) -{ - if (this->PassPointArrays) - { // Copy point data arrays - int numPtArrays = input->GetPointData()->GetNumberOfArrays(); - for (int i = 0; i < numPtArrays; i++) - { - vtkDataArray* da = input->GetPointData()->GetArray(i); - if (da && !output->GetPointData()->HasArray(da->GetName())) - { - output->GetPointData()->AddArray(da); - } - } - - // Set active attributes in the output to the active attributes in the input - for (int i = 0; i < vtkDataSetAttributes::NUM_ATTRIBUTES; ++i) - { - vtkAbstractArray* da = input->GetPointData()->GetAttribute(i); - if (da && da->GetName() && !output->GetPointData()->GetAttribute(i)) - { - output->GetPointData()->SetAttribute(da, i); - } - } - } - - // copy cell data arrays - if (this->PassCellArrays) - { - int numCellArrays = input->GetCellData()->GetNumberOfArrays(); - for (int i = 0; i < numCellArrays; ++i) - { - vtkDataArray* da = input->GetCellData()->GetArray(i); - if (!output->GetCellData()->HasArray(da->GetName())) - { - output->GetCellData()->AddArray(da); - } - } - - // Set active attributes in the output to the active attributes in the input - for (int i = 0; i < vtkDataSetAttributes::NUM_ATTRIBUTES; ++i) - { - vtkAbstractArray* da = input->GetCellData()->GetAttribute(i); - if (da && da->GetName() && !output->GetCellData()->GetAttribute(i)) - { - output->GetCellData()->SetAttribute(da, i); - } - } - } - - if (this->PassFieldArrays) - { - // nothing to do, vtkDemandDrivenPipeline takes care of that. - } - else - { - output->GetFieldData()->Initialize(); - } -} - -//------------------------------------------------------------------------------ -void vtkmProbe::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - os << indent << "PassPointArrays: " << this->PassPointArrays << "\n"; - os << indent << "PassCellArrays: " << this->PassCellArrays << "\n"; - os << indent << "PassFieldArray: " << this->PassFieldArrays << "\n"; -} diff --git a/Accelerators/Vtkm/vtkmProbe.h b/Accelerators/Vtkm/vtkmProbe.h deleted file mode 100644 index 18dc00efa..000000000 --- a/Accelerators/Vtkm/vtkmProbe.h +++ /dev/null @@ -1,159 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmProbe - * @brief Sample data at specified point locations - * - * vtkmProbe is a filter that computes point attributes(e.g., scalars, vectors, - * etc.) at specific point positions using the probe filter in VTK-m. The - * filter has two inputs: the Input and Source. - * The Input geometric structure is passed through the filter. The point - * attributes are computed at the Input point positions by interpolating into - * the source data. For example, we can compute data values on a plane(plane - * specified as Input from a volume(Source). The source geometry must have cellSet - * defined otherwise the vtkm filter won't work. The cell data of the source data - * is copied to the output based on in which source cell each input point is. If - * an array of the same name exists both in source's point and cell data, only - * the one from the point data is probed. The valid point result is stored as - * a field array whose default name is "vtkValidPointMask" in the point data and - * the valid cell result(Invalid cells are the cells with at least one invalid - * point) is stored as a field array whose default name is "vtkValidCellMask" in - * the cell data. - * - * This filter can be used to resample data, or convert one dataset form into - * another. For example, an unstructured grid (vtkUnstructuredGrid) can be - * probed with a volume (three-dimensional vtkImageData), and then volume - * rendering techniques can be used to visualize the results. Another example: - * a line or curve can be used to probe data to produce x-y plots along - * that line or curve. - */ - -#ifndef vtkmProbe_h -#define vtkmProbe_h - -#include // for std::string - -#include "vtkAcceleratorsVTKmModule.h" //required for export -#include "vtkDataSetAlgorithm.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmProbe : public vtkDataSetAlgorithm -{ -public: - vtkTypeMacro(vtkmProbe, vtkDataSetAlgorithm); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmProbe* New(); - - //@{ - /** - * Specify the data set that will be probed at the input points. - * The Input gives the geometry (the points and cells) for the output, - * while the Source is probed (interpolated) to generate the scalars, - * vectors, etc. for the output points based on the point locations. - */ - void SetSourceData(vtkDataObject* source); - vtkDataObject* GetSource(); - //@} - - //@} - /** - * Specify the data set that will be probed at the input points. - * The Input gives the geometry (the points and cells) for the output, - * while the Source is probed (interpolated) to generate the scalars, - * vectors, etc. for the output points based on the point locations. - */ - void SetSourceConnection(vtkAlgorithmOutput* algOutput); - //@} - - //@{ - /** - * Shallow copy the input cell data arrays to the output. - * Off by default. - */ - vtkSetMacro(PassCellArrays, vtkTypeBool); - vtkBooleanMacro(PassCellArrays, vtkTypeBool); - vtkGetMacro(PassCellArrays, vtkTypeBool); - //@} - //@{ - /** - * Shallow copy the input point data arrays to the output. - * Off by default. - */ - vtkSetMacro(PassPointArrays, vtkTypeBool); - vtkBooleanMacro(PassPointArrays, vtkTypeBool); - vtkGetMacro(PassPointArrays, vtkTypeBool); - //@} - - //@{ - /** - * Set whether to pass the field-data arrays from the Input i.e. the input - * providing the geometry to the output. On by default. - */ - vtkSetMacro(PassFieldArrays, vtkTypeBool); - vtkBooleanMacro(PassFieldArrays, vtkTypeBool); - vtkGetMacro(PassFieldArrays, vtkTypeBool); - //@} - - //@{ - /** - * Returns the name of the valid point array added to the output with values 2 for - * hidden points and 0 for valid points. - * Set to "vtkValidPointMask" by default. - */ - vtkSetMacro(ValidPointMaskArrayName, std::string); - vtkGetMacro(ValidPointMaskArrayName, std::string); - //@} - - //@{ - /** - * Returns the name of the valid cell array added to the output with values 2 for - * hidden points and 0 for valid points. - * Set to "vtkValidCellMask" by default. - */ - vtkSetMacro(ValidCellMaskArrayName, std::string); - vtkGetMacro(ValidCellMaskArrayName, std::string); - //@} - -protected: - vtkmProbe(); - ~vtkmProbe() override = default; - - vtkTypeBool PassCellArrays; - vtkTypeBool PassPointArrays; - vtkTypeBool PassFieldArrays; - std::string ValidPointMaskArrayName; - std::string ValidCellMaskArrayName; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - - virtual int RequestUpdateExtent( - vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - - virtual int RequestInformation( - vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - - /** - * Call at the end of RequestData() to pass attribute dat a respecting the - * PassCellArrays, PassPointArrays and PassFieldArrays flag - */ - void PassAttributeData(vtkDataSet* input, vtkDataObject* source, vtkDataSet* output); - -private: - vtkmProbe(const vtkmProbe&) = delete; - void operator=(const vtkmProbe&) = delete; -}; - -#endif // vtkmProbe_h -// VTK-HeaderTest-Exclude: vtkmProbe.h diff --git a/Accelerators/Vtkm/vtkmThreshold.cxx b/Accelerators/Vtkm/vtkmThreshold.cxx deleted file mode 100644 index 8efcc5b4c..000000000 --- a/Accelerators/Vtkm/vtkmThreshold.cxx +++ /dev/null @@ -1,96 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmThreshold.h" -#include "vtkmConfig.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkObjectFactory.h" -#include "vtkPointData.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" -#include "vtkmlib/UnstructuredGridConverter.h" - -#include "vtkmFilterPolicy.h" - -#include -#include - -vtkStandardNewMacro(vtkmThreshold); - -//------------------------------------------------------------------------------ -vtkmThreshold::vtkmThreshold() {} - -//------------------------------------------------------------------------------ -vtkmThreshold::~vtkmThreshold() {} - -//------------------------------------------------------------------------------ -int vtkmThreshold::RequestData( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkUnstructuredGrid* output = - vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - vtkDataArray* inputArray = this->GetInputArrayToProcess(0, inputVector); - if (inputArray == nullptr || inputArray->GetName() == nullptr || inputArray->GetName()[0] == '\0') - { - vtkErrorMacro("Invalid input array."); - return 0; - } - - try - { - // convert the input dataset to a vtkm::cont::DataSet - auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - - vtkmInputFilterPolicy policy; - vtkm::filter::Threshold filter; - filter.SetActiveField(inputArray->GetName()); - filter.SetLowerThreshold(this->GetLowerThreshold()); - filter.SetUpperThreshold(this->GetUpperThreshold()); - auto result = filter.Execute(in, policy); - - // now we are done the algorithm and conversion of arrays so - // convert back the dataset to VTK - if (!fromvtkm::Convert(result, output, input)) - { - vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() - << "Falling back to serial implementation"); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmThreshold::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} diff --git a/Accelerators/Vtkm/vtkmThreshold.h b/Accelerators/Vtkm/vtkmThreshold.h deleted file mode 100644 index 803550a85..000000000 --- a/Accelerators/Vtkm/vtkmThreshold.h +++ /dev/null @@ -1,57 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmThreshold - * @brief extracts cells where scalar value in cell satisfies threshold criterion - * - * vtkmThreshold is a filter that extracts cells from any dataset type that - * satisfy a threshold criterion. A cell satisfies the criterion if the - * scalar value of every point or cell satisfies the criterion. The - * criterion takes the form of between two values. The output of this - * filter is an unstructured grid. - * - * Note that scalar values are available from the point and cell attribute - * data. By default, point data is used to obtain scalars, but you can - * control this behavior. See the AttributeMode ivar below. - * - */ -#ifndef vtkmThreshold_h -#define vtkmThreshold_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkThreshold.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmThreshold : public vtkThreshold -{ -public: - vtkTypeMacro(vtkmThreshold, vtkThreshold); - void PrintSelf(ostream& os, vtkIndent indent) override; - - static vtkmThreshold* New(); - -protected: - vtkmThreshold(); - ~vtkmThreshold() override; - - virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmThreshold(const vtkmThreshold&) = delete; - void operator=(const vtkmThreshold&) = delete; -}; - -#endif // vtkmThreshold_h -// VTK-HeaderTest-Exclude: vtkmThreshold.h diff --git a/Accelerators/Vtkm/vtkmTriangleMeshPointNormals.cxx b/Accelerators/Vtkm/vtkmTriangleMeshPointNormals.cxx deleted file mode 100644 index ae98fc21e..000000000 --- a/Accelerators/Vtkm/vtkmTriangleMeshPointNormals.cxx +++ /dev/null @@ -1,115 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkmTriangleMeshPointNormals.cxx - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkmTriangleMeshPointNormals.h" - -#include "vtkCellArray.h" -#include "vtkCellData.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" -#include "vtkSmartPointer.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/PolyDataConverter.h" - -#include "vtkmFilterPolicy.h" - -#include "vtkm/filter/SurfaceNormals.h" - -namespace -{ - -struct InputFilterPolicy : public vtkmInputFilterPolicy -{ - using UnstructuredCellSetList = - vtkm::List; -}; - -} - -vtkStandardNewMacro(vtkmTriangleMeshPointNormals); - -//------------------------------------------------------------------------------ -void vtkmTriangleMeshPointNormals::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} - -//------------------------------------------------------------------------------ -vtkmTriangleMeshPointNormals::vtkmTriangleMeshPointNormals() = default; -vtkmTriangleMeshPointNormals::~vtkmTriangleMeshPointNormals() = default; - -//------------------------------------------------------------------------------ -int vtkmTriangleMeshPointNormals::RequestData( - vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - // get the info objects - vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); - vtkInformation* outInfo = outputVector->GetInformationObject(0); - - // get the input and output - vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); - vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); - - // check if polydata is in supported format - if (input->GetVerts()->GetNumberOfCells() != 0 || input->GetLines()->GetNumberOfCells() != 0 || - input->GetStrips()->GetNumberOfCells() != 0 || - (input->GetPolys()->GetNumberOfConnectivityIds() % 3) != 0) - { - vtkErrorMacro(<< "This filter only works with polydata containing just triangles."); - return 0; - } - - try - { - // convert the input dataset to a vtkm::cont::DataSet - auto in = tovtkm::Convert(input, tovtkm::FieldsFlag::None); - - vtkm::filter::PolicyBase policy; - vtkm::filter::SurfaceNormals filter; - filter.SetGenerateCellNormals(false); - filter.SetNormalizeCellNormals(false); - filter.SetGeneratePointNormals(true); - filter.SetPointNormalsName("Normals"); - auto result = filter.Execute(in, policy); - - if (!fromvtkm::Convert(result, output, input)) - { - vtkErrorMacro(<< "Unable to convert VTKm DataSet back to VTK"); - return 0; - } - } - catch (const vtkm::cont::Error& e) - { - vtkWarningMacro(<< "VTK-m error: " << e.GetMessage() - << "Falling back to vtkTriangleMeshPointNormals"); - return this->Superclass::RequestData(request, inputVector, outputVector); - } - - vtkSmartPointer pointNormals = output->GetPointData()->GetArray("Normals"); - - output->GetPointData()->CopyNormalsOff(); - output->GetPointData()->PassData(input->GetPointData()); - output->GetCellData()->CopyNormalsOff(); - output->GetCellData()->PassData(input->GetPointData()); - - if (pointNormals) - { - output->GetPointData()->SetNormals(pointNormals); - } - - return 1; -} diff --git a/Accelerators/Vtkm/vtkmTriangleMeshPointNormals.h b/Accelerators/Vtkm/vtkmTriangleMeshPointNormals.h deleted file mode 100644 index a211627ea..000000000 --- a/Accelerators/Vtkm/vtkmTriangleMeshPointNormals.h +++ /dev/null @@ -1,72 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: vtkmTriangleMeshPointNormals.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/** - * @class vtkmTriangleMeshPointNormals - * @brief compute point normals for triangle mesh - * - * vtkmTriangleMeshPointNormals is a filter that computes point normals for - * a triangle mesh to enable high-performance rendering. It is a fast-path - * version of the vtkmPolyDataNormals filter in order to be able to compute - * normals for triangle meshes deforming rapidly. - * - * The computed normals (a vtkFloatArray) are set to be the active normals - * (using SetNormals()) of the PointData. The array name is "Normals". - * - * The algorithm works by determining normals for each triangle and adding - * these vectors to the triangle points. The resulting vectors at each - * point are then normalized. - * - * @warning - * Normals are computed only for triangular polygons: the filter can not - * handle meshes with other types of cells (Verts, Lines, Strips) or Polys - * with the wrong number of components (not equal to 3). - * - * @warning - * Unlike the vtkPolyDataNormals filter, this filter does not apply any - * splitting nor checks for cell orientation consistency in order to speed - * up the computation. Moreover, normals are not calculated the exact same - * way as the vtkPolyDataNormals filter since the triangle normals are not - * normalized before being added to the point normals: those cell normals - * are therefore weighted by the triangle area. This is not more nor less - * correct than normalizing them before adding them, but it is much faster. - * - */ - -#ifndef vtkmTriangleMeshPointNormals_h -#define vtkmTriangleMeshPointNormals_h - -#include "vtkAcceleratorsVTKmModule.h" // for export macro -#include "vtkTriangleMeshPointNormals.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmTriangleMeshPointNormals : public vtkTriangleMeshPointNormals -{ -public: - vtkTypeMacro(vtkmTriangleMeshPointNormals, vtkTriangleMeshPointNormals); - void PrintSelf(ostream& os, vtkIndent indent) override; - static vtkmTriangleMeshPointNormals* New(); - -protected: - vtkmTriangleMeshPointNormals(); - ~vtkmTriangleMeshPointNormals() override; - - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmTriangleMeshPointNormals(const vtkmTriangleMeshPointNormals&) = delete; - void operator=(const vtkmTriangleMeshPointNormals&) = delete; -}; - -#endif // vtkmTriangleMeshPointNormals_h -// VTK-HeaderTest-Exclude: vtkmTriangleMeshPointNormals.h diff --git a/Accelerators/Vtkm/vtkmWarpScalar.cxx b/Accelerators/Vtkm/vtkmWarpScalar.cxx deleted file mode 100644 index 31ad0b26e..000000000 --- a/Accelerators/Vtkm/vtkmWarpScalar.cxx +++ /dev/null @@ -1,191 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmWarpScalar.h" -#include "vtkmConfig.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkImageData.h" -#include "vtkImageDataToPointSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkPointData.h" -#include "vtkRectilinearGrid.h" -#include "vtkRectilinearGridToPointSet.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkm/cont/DataSetFieldAdd.h" -#include "vtkmFilterPolicy.h" - -#include - -vtkStandardNewMacro(vtkmWarpScalar); - -//------------------------------------------------------------------------------ -vtkmWarpScalar::vtkmWarpScalar() - : vtkWarpScalar() -{ -} - -//------------------------------------------------------------------------------ -vtkmWarpScalar::~vtkmWarpScalar() {} - -//------------------------------------------------------------------------------ -int vtkmWarpScalar::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkSmartPointer input = vtkPointSet::GetData(inputVector[0]); - vtkSmartPointer output = vtkPointSet::GetData(outputVector); - - if (!input) - { - // Try converting image data. - vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); - if (inImage) - { - vtkNew image2points; - image2points->SetInputData(inImage); - image2points->Update(); - input = image2points->GetOutput(); - } - } - - if (!input) - { - // Try converting rectilinear grid. - vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); - if (inRect) - { - vtkNew rect2points; - rect2points->SetInputData(inRect); - rect2points->Update(); - input = rect2points->GetOutput(); - } - } - if (!input) - { - vtkErrorMacro(<< "Invalid or missing input"); - return 0; - } - - output->CopyStructure(input); - - // Get the scalar field info - vtkDataArray* inScalars = this->GetInputArrayToProcess(0, inputVector); - int inScalarsAssociation = this->GetInputArrayAssociation(0, inputVector); - // Get the normal field info - vtkDataArray* inNormals = input->GetPointData()->GetNormals(); - vtkPoints* inPts = input->GetPoints(); - - // InScalars is not used when XYPlane is on - if (!inPts || (!inScalars && !this->XYPlane)) - { - vtkDebugMacro(<< "No data to warp"); - return 1; - } - - try - { - vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - if (inScalars) - { - auto scalarFactor = tovtkm::Convert(inScalars, inScalarsAssociation); - in.AddField(scalarFactor); - } - vtkm::Id numberOfPoints = in.GetCoordinateSystem().GetData().GetNumberOfValues(); - - // ScaleFactor in vtk is the scalarAmount in vtk-m. - vtkm::filter::WarpScalar warpScalar(this->ScaleFactor); - warpScalar.SetUseCoordinateSystemAsField(true); - - // Get/generate the normal field - if (inNormals && !this->UseNormal) - { // DataNormal - auto inNormalsField = tovtkm::Convert(inNormals, vtkDataObject::FIELD_ASSOCIATION_POINTS); - in.AddField(inNormalsField); - warpScalar.SetNormalField(inNormals->GetName()); - } - else if (this->XYPlane) - { - using vecType = vtkm::Vec; - vecType normal = vtkm::make_Vec(0.0, 0.0, 1.0); - vtkm::cont::ArrayHandleConstant vectorAH = - vtkm::cont::make_ArrayHandleConstant(normal, numberOfPoints); - vtkm::cont::DataSetFieldAdd::AddPointField(in, "zNormal", vectorAH); - warpScalar.SetNormalField("zNormal"); - } - else - { - using vecType = vtkm::Vec; - vecType normal = - vtkm::make_Vec(this->Normal[0], this->Normal[1], this->Normal[2]); - vtkm::cont::ArrayHandleConstant vectorAH = - vtkm::cont::make_ArrayHandleConstant(normal, numberOfPoints); - vtkm::cont::DataSetFieldAdd::AddPointField(in, "instanceNormal", vectorAH); - warpScalar.SetNormalField("instanceNormal"); - } - - if (this->XYPlane) - { // Just use the z value to warp the surface. Ignore the input scalars. - std::vector zValues; - zValues.reserve(static_cast(input->GetNumberOfPoints())); - for (vtkIdType i = 0; i < input->GetNumberOfPoints(); i++) - { - zValues.push_back(input->GetPoints()->GetPoint(i)[2]); - } - vtkm::cont::DataSetFieldAdd::AddPointField(in, "scalarfactor", zValues); - warpScalar.SetScalarFactorField("scalarfactor"); - } - else - { - warpScalar.SetScalarFactorField(std::string(inScalars->GetName())); - } - - vtkmInputFilterPolicy policy; - auto result = warpScalar.Execute(in, policy); - vtkDataArray* warpScalarResult = - fromvtkm::Convert(result.GetField("warpscalar", vtkm::cont::Field::Association::POINTS)); - vtkPoints* newPts = vtkPoints::New(); - // Update points - newPts->SetNumberOfPoints(warpScalarResult->GetNumberOfTuples()); - newPts->SetData(warpScalarResult); - output->SetPoints(newPts); - newPts->Delete(); - warpScalarResult->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - // Update ourselves and release memory - output->GetPointData()->CopyNormalsOff(); // distorted geometry - output->GetPointData()->PassData(input->GetPointData()); - output->GetCellData()->CopyNormalsOff(); // distorted geometry - output->GetCellData()->PassData(input->GetCellData()); - - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmWarpScalar::PrintSelf(std::ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} diff --git a/Accelerators/Vtkm/vtkmWarpScalar.h b/Accelerators/Vtkm/vtkmWarpScalar.h deleted file mode 100644 index 7a08139a9..000000000 --- a/Accelerators/Vtkm/vtkmWarpScalar.h +++ /dev/null @@ -1,67 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmWarpScalar - * @brief deform geometry with scalar data - * - * vtkmWarpScalar is a filter that modifies point coordinates by moving points - * along point normals by the scalar amount times the scalar factor with vtkm - * as its backend. - * Useful for creating carpet or x-y-z plots. - * - * If normals are not present in data, the Normal instance variable will - * be used as the direction along which to warp the geometry. If normals are - * present but you would like to use the Normal instance variable, set the - * UseNormal boolean to true. - * - * If XYPlane boolean is set true, then the z-value is considered to be - * a scalar value (still scaled by scale factor), and the displacement is - * along the z-axis. If scalars are also present, these are copied through - * and can be used to color the surface. - * - * Note that the filter passes both its point data and cell data to - * its output, except for normals, since these are distorted by the - * warping. - */ - -#ifndef vtkmWarpScalar_h -#define vtkmWarpScalar_h - -#include "vtkAcceleratorsVTKmModule.h" // required for correct export -#include "vtkWarpScalar.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmWarpScalar : public vtkWarpScalar -{ -public: - vtkTypeMacro(vtkmWarpScalar, vtkWarpScalar); - void PrintSelf(ostream& os, vtkIndent indent) override; - - static vtkmWarpScalar* New(); - -protected: - vtkmWarpScalar(); - ~vtkmWarpScalar() override; - - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmWarpScalar(const vtkmWarpScalar&) = delete; - void operator=(const vtkmWarpScalar&) = delete; -}; - -#endif // vtkmWarpScalar_h - -// VTK-HeaderTest-Exclude: vtkmWarpScalar.h diff --git a/Accelerators/Vtkm/vtkmWarpVector.cxx b/Accelerators/Vtkm/vtkmWarpVector.cxx deleted file mode 100644 index ff1bbf3df..000000000 --- a/Accelerators/Vtkm/vtkmWarpVector.cxx +++ /dev/null @@ -1,138 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "vtkmWarpVector.h" -#include "vtkmConfig.h" - -#include "vtkCellData.h" -#include "vtkDataSet.h" -#include "vtkImageData.h" -#include "vtkImageDataToPointSet.h" -#include "vtkInformation.h" -#include "vtkInformationVector.h" -#include "vtkPointData.h" -#include "vtkRectilinearGrid.h" -#include "vtkRectilinearGridToPointSet.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkmlib/ArrayConverters.h" -#include "vtkmlib/DataSetConverters.h" - -#include "vtkm/cont/DataSetFieldAdd.h" -#include "vtkmFilterPolicy.h" - -#include - -vtkStandardNewMacro(vtkmWarpVector); - -//------------------------------------------------------------------------------ -vtkmWarpVector::vtkmWarpVector() - : vtkWarpVector() -{ -} - -//------------------------------------------------------------------------------ -vtkmWarpVector::~vtkmWarpVector() {} - -//------------------------------------------------------------------------------ -int vtkmWarpVector::RequestData(vtkInformation* vtkNotUsed(request), - vtkInformationVector** inputVector, vtkInformationVector* outputVector) -{ - vtkSmartPointer input = vtkPointSet::GetData(inputVector[0]); - vtkSmartPointer output = vtkPointSet::GetData(outputVector); - - if (!input) - { - // Try converting image data. - vtkImageData* inImage = vtkImageData::GetData(inputVector[0]); - if (inImage) - { - vtkNew image2points; - image2points->SetInputData(inImage); - image2points->Update(); - input = image2points->GetOutput(); - } - } - - if (!input) - { - // Try converting rectilinear grid. - vtkRectilinearGrid* inRect = vtkRectilinearGrid::GetData(inputVector[0]); - if (inRect) - { - vtkNew rect2points; - rect2points->SetInputData(inRect); - rect2points->Update(); - input = rect2points->GetOutput(); - } - } - if (!input) - { - vtkErrorMacro(<< "Invalid or missing input"); - return 0; - } - vtkIdType numPts = input->GetPoints()->GetNumberOfPoints(); - - vtkDataArray* vectors = this->GetInputArrayToProcess(0, inputVector); - int vectorsAssociation = this->GetInputArrayAssociation(0, inputVector); - - if (!vectors || !numPts) - { - vtkDebugMacro(<< "no input data"); - return 1; - } - - output->CopyStructure(input); - - try - { - vtkm::cont::DataSet in = tovtkm::Convert(input, tovtkm::FieldsFlag::PointsAndCells); - vtkm::cont::Field vectorField = tovtkm::Convert(vectors, vectorsAssociation); - in.AddField(vectorField); - - vtkmInputFilterPolicy policy; - vtkm::filter::WarpVector warpVector(this->ScaleFactor); - warpVector.SetUseCoordinateSystemAsField(true); - warpVector.SetVectorField(vectorField.GetName(), vectorField.GetAssociation()); - auto result = warpVector.Execute(in, policy); - - vtkDataArray* warpVectorResult = - fromvtkm::Convert(result.GetField("warpvector", vtkm::cont::Field::Association::POINTS)); - vtkNew newPts; - - newPts->SetNumberOfPoints(warpVectorResult->GetNumberOfTuples()); - newPts->SetData(warpVectorResult); - output->SetPoints(newPts); - warpVectorResult->FastDelete(); - } - catch (const vtkm::cont::Error& e) - { - vtkErrorMacro(<< "VTK-m error: " << e.GetMessage()); - return 0; - } - - // Update ourselves and release memory - output->GetPointData()->CopyNormalsOff(); // distorted geometry - output->GetPointData()->PassData(input->GetPointData()); - output->GetCellData()->CopyNormalsOff(); // distorted geometry - output->GetCellData()->PassData(input->GetCellData()); - return 1; -} - -//------------------------------------------------------------------------------ -void vtkmWarpVector::PrintSelf(std::ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); -} diff --git a/Accelerators/Vtkm/vtkmWarpVector.h b/Accelerators/Vtkm/vtkmWarpVector.h deleted file mode 100644 index 05878260a..000000000 --- a/Accelerators/Vtkm/vtkmWarpVector.h +++ /dev/null @@ -1,54 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -/** - * @class vtkmWarpVector - * @brief deform geometry with vector data - * - * vtkWarpVector is a filter that modifies point coordinates by moving - * points along vector times the scale factor. Useful for showing flow - * profiles or mechanical deformation. - * - * The filter passes both its point data and cell data to its output. - */ - -#ifndef vtkmWarpVector_h -#define vtkmWarpVector_h - -#include "vtkAcceleratorsVTKmModule.h" // required for correct export -#include "vtkWarpVector.h" - -class VTKACCELERATORSVTKM_EXPORT vtkmWarpVector : public vtkWarpVector -{ -public: - vtkTypeMacro(vtkmWarpVector, vtkWarpVector); - void PrintSelf(ostream& os, vtkIndent indent) override; - - static vtkmWarpVector* New(); - -protected: - vtkmWarpVector(); - ~vtkmWarpVector() override; - - int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override; - -private: - vtkmWarpVector(const vtkmWarpVector&) = delete; - void operator=(const vtkmWarpVector&) = delete; -}; - -#endif // vtkmWarpVector_h - -// VTK-HeaderTest-Exclude: vtkmWarpVector.h diff --git a/Accelerators/Vtkm/vtkmlib/ArrayConverters.cxx b/Accelerators/Vtkm/vtkmlib/ArrayConverters.cxx deleted file mode 100644 index 92982e24d..000000000 --- a/Accelerators/Vtkm/vtkmlib/ArrayConverters.cxx +++ /dev/null @@ -1,320 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "ArrayConverters.hxx" - -#include "vtkmDataArray.h" -#include "vtkmFilterPolicy.h" - -#include "vtkmlib/PortalTraits.h" - -#include -#include -#include - -#include "vtkCellData.h" -#include "vtkDataArray.h" -#include "vtkDataObject.h" -#include "vtkDataSet.h" -#include "vtkPointData.h" -#include "vtkPoints.h" - -namespace tovtkm -{ - -void ProcessFields(vtkDataSet* input, vtkm::cont::DataSet& dataset, tovtkm::FieldsFlag fields) -{ - if ((fields & tovtkm::FieldsFlag::Points) != tovtkm::FieldsFlag::None) - { - vtkPointData* pd = input->GetPointData(); - for (int i = 0; i < pd->GetNumberOfArrays(); i++) - { - vtkDataArray* array = pd->GetArray(i); - if (array == nullptr) - { - continue; - } - - vtkm::cont::Field pfield = tovtkm::Convert(array, vtkDataObject::FIELD_ASSOCIATION_POINTS); - dataset.AddField(pfield); - } - } - - if ((fields & tovtkm::FieldsFlag::Cells) != tovtkm::FieldsFlag::None) - { - vtkCellData* cd = input->GetCellData(); - for (int i = 0; i < cd->GetNumberOfArrays(); i++) - { - vtkDataArray* array = cd->GetArray(i); - if (array == nullptr) - { - continue; - } - - vtkm::cont::Field cfield = tovtkm::Convert(array, vtkDataObject::FIELD_ASSOCIATION_CELLS); - dataset.AddField(cfield); - } - } -} - -template -vtkm::cont::Field Convert(vtkmDataArray* input, int association) -{ - // we need to switch on if we are a cell or point field first! - // The problem is that the constructor signature for fields differ based - // on if they are a cell or point field. - if (association == vtkDataObject::FIELD_ASSOCIATION_POINTS) - { - return vtkm::cont::make_FieldPoint(input->GetName(), input->GetVtkmVariantArrayHandle()); - } - else if (association == vtkDataObject::FIELD_ASSOCIATION_CELLS) - { - return vtkm::cont::make_FieldCell(input->GetName(), input->GetVtkmVariantArrayHandle()); - } - - return vtkm::cont::Field(); -} - -// determine the type and call the proper Convert routine -vtkm::cont::Field Convert(vtkDataArray* input, int association) -{ - // The association will tell us if we have a cell or point field - - // We need to properly deduce the ValueType of the array. This means - // that we need to switch on Float/Double/Int, and then figure out the - // number of components. The upside is that the Convert Method can internally - // figure out the number of components, and not have to generate a lot - // of template to do so - - // Investigate using vtkArrayDispatch, AOS for all types, and than SOA for - // just - // float/double - vtkm::cont::Field field; - switch (input->GetDataType()) - { - vtkTemplateMacro( - vtkAOSDataArrayTemplate* typedIn1 = - vtkAOSDataArrayTemplate::FastDownCast(input); - if (typedIn1) { field = Convert(typedIn1, association); } else { - vtkSOADataArrayTemplate* typedIn2 = - vtkSOADataArrayTemplate::FastDownCast(input); - if (typedIn2) - { - field = Convert(typedIn2, association); - } - else - { - vtkmDataArray* typedIn3 = vtkmDataArray::SafeDownCast(input); - if (typedIn3) - { - field = Convert(typedIn3, association); - } - } - }); - // end vtkTemplateMacro - } - return field; -} - -} // namespace tovtkm - -namespace fromvtkm -{ - -namespace -{ - -struct ArrayConverter -{ -public: - mutable vtkDataArray* Data; - - ArrayConverter() - : Data(nullptr) - { - } - - // CastAndCall always passes a const array handle. Just shallow copy to a - // local array handle by taking by value. - - template - void operator()(vtkm::cont::ArrayHandle handle) const - { - this->Data = make_vtkmDataArray(handle); - } - - template - void operator()(vtkm::cont::ArrayHandle handle) const - { - using BasicHandle = vtkm::cont::ArrayHandle; - if (vtkm::cont::IsType(handle)) - { - this->operator()(vtkm::cont::Cast(handle)); - } - else - { - this->Data = make_vtkmDataArray(handle); - } - } - - template - void operator()( - vtkm::cont::ArrayHandle, vtkm::cont::StorageTagVirtual> handle) const - { - using SOAHandle = vtkm::cont::ArrayHandle, vtkm::cont::StorageTagSOA>; - using BasicHandle = vtkm::cont::ArrayHandle, vtkm::cont::StorageTagBasic>; - if (vtkm::cont::IsType(handle)) - { - this->operator()(vtkm::cont::Cast(handle)); - } - else if (vtkm::cont::IsType(handle)) - { - this->operator()(vtkm::cont::Cast(handle)); - } - else - { - this->Data = make_vtkmDataArray(handle); - } - } - - template - void operator()(vtkm::cont::ArrayHandle handle) const - { - // we can steal this array! - using Traits = tovtkm::vtkPortalTraits; // Handles Vec properly - using ValueType = typename Traits::ComponentType; - using VTKArrayType = vtkAOSDataArrayTemplate; - - VTKArrayType* array = VTKArrayType::New(); - array->SetNumberOfComponents(Traits::NUM_COMPONENTS); - - handle.SyncControlArray(); - const vtkm::Id size = handle.GetNumberOfValues() * Traits::NUM_COMPONENTS; - - // VTK-m allocations are aligned or done with cuda uvm memory so we need to propagate - // the proper free function to VTK - auto stolenState = handle.GetStorage().StealArray(); - auto stolenMemory = reinterpret_cast(stolenState.first); - array->SetVoidArray(stolenMemory, size, 0, vtkAbstractArray::VTK_DATA_ARRAY_USER_DEFINED); - array->SetArrayFreeFunction(stolenState.second); - - this->Data = array; - } - - template - void operator()(vtkm::cont::ArrayHandle handle) const - { - // we can steal this array! - using Traits = tovtkm::vtkPortalTraits; // Handles Vec properly - using ValueType = typename Traits::ComponentType; - using VTKArrayType = vtkSOADataArrayTemplate; - - VTKArrayType* array = VTKArrayType::New(); - array->SetNumberOfComponents(Traits::NUM_COMPONENTS); - - handle.SyncControlArray(); - auto storage = handle.GetStorage(); - const vtkm::Id size = handle.GetNumberOfValues() * Traits::NUM_COMPONENTS; - for (vtkm::IdComponent i = 0; i < Traits::NUM_COMPONENTS; ++i) - { - // steal each component array. - auto stolenState = storage.GetArray(i).GetStorage().StealArray(); - auto stolenMemory = reinterpret_cast(stolenState.first); - array->SetArray( - i, stolenMemory, size, true, 0, vtkAbstractArray::VTK_DATA_ARRAY_USER_DEFINED); - array->SetArrayFreeFunction(i, stolenState.second); - } - } -}; -} // anonymous namespace - -// Though the following conversion routines take const-ref parameters as input, -// the underlying storage will be stolen, whenever possible, instead of -// performing a full copy. -// Therefore, these routines should be treated as "moves" and the state of the -// input is undeterminisitic. - -vtkDataArray* Convert(const vtkm::cont::Field& input) -{ - // We need to do the conversion from Field to a known vtkm::cont::ArrayHandle - // after that we need to fill the vtkDataArray - vtkmOutputFilterPolicy policy; - vtkDataArray* data = nullptr; - ArrayConverter aConverter; - - try - { - vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicyFieldNotActive(input, policy), aConverter); - data = aConverter.Data; - if (data) - { - data->SetName(input.GetName().c_str()); - } - } - catch (vtkm::cont::Error&) - { - } - return data; -} - -vtkPoints* Convert(const vtkm::cont::CoordinateSystem& input) -{ - ArrayConverter aConverter; - vtkPoints* points = nullptr; - try - { - vtkm::cont::CastAndCall(input, aConverter); - vtkDataArray* pdata = aConverter.Data; - points = vtkPoints::New(); - points->SetData(pdata); - pdata->FastDelete(); - } - catch (vtkm::cont::Error& e) - { - vtkGenericWarningMacro("Converting vtkm::cont::CoordinateSystem to " - "vtkPoints failed: " - << e.what()); - } - return points; -} - -bool ConvertArrays(const vtkm::cont::DataSet& input, vtkDataSet* output) -{ - vtkPointData* pd = output->GetPointData(); - vtkCellData* cd = output->GetCellData(); - - vtkm::IdComponent numFields = input.GetNumberOfFields(); - for (vtkm::IdComponent i = 0; i < numFields; ++i) - { - const vtkm::cont::Field& f = input.GetField(i); - vtkDataArray* vfield = Convert(f); - if (vfield && f.GetAssociation() == vtkm::cont::Field::Association::POINTS) - { - pd->AddArray(vfield); - vfield->FastDelete(); - } - else if (vfield && f.GetAssociation() == vtkm::cont::Field::Association::CELL_SET) - { - cd->AddArray(vfield); - vfield->FastDelete(); - } - else if (vfield) - { - vfield->Delete(); - } - } - return true; -} -} diff --git a/Accelerators/Vtkm/vtkmlib/ArrayConverters.h b/Accelerators/Vtkm/vtkmlib/ArrayConverters.h deleted file mode 100644 index 0130a3e5d..000000000 --- a/Accelerators/Vtkm/vtkmlib/ArrayConverters.h +++ /dev/null @@ -1,142 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#ifndef vtkmlib_ArrayConverters_h -#define vtkmlib_ArrayConverters_h - -#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation -#include "vtkmConfig.h" //required for general vtkm setup - -#include "vtkAOSDataArrayTemplate.h" -#include "vtkSOADataArrayTemplate.h" - -#include -#include - -#include // for std::underlying_type - -class vtkDataArray; -class vtkDataSet; -class vtkPoints; - -namespace vtkm -{ -namespace cont -{ -class DataSet; -class CoordinateSystem; -} -} - -namespace tovtkm -{ - -template -struct DataArrayToArrayHandle; - -template -struct DataArrayToArrayHandle, NumComponents> -{ - using ValueType = - typename std::conditional >::type; - using StorageType = vtkm::cont::internal::Storage; - using ArrayHandleType = vtkm::cont::ArrayHandle; - - static ArrayHandleType Wrap(vtkAOSDataArrayTemplate* input) - { - return vtkm::cont::make_ArrayHandle( - reinterpret_cast(input->GetPointer(0)), input->GetNumberOfTuples()); - } -}; - -template -struct DataArrayToArrayHandle, NumComponents> -{ - using ValueType = vtkm::Vec; - using StorageType = vtkm::cont::internal::Storage; - using ArrayHandleType = vtkm::cont::ArrayHandle; - - static ArrayHandleType Wrap(vtkSOADataArrayTemplate* input) - { - vtkm::Id numValues = input->GetNumberOfTuples(); - vtkm::cont::internal::Storage storage; - for (vtkm::IdComponent i = 0; i < NumComponents; ++i) - { - storage.SetArray(i, - vtkm::cont::make_ArrayHandle( - reinterpret_cast(input->GetComponentArrayPointer(i)), numValues)); - } - - return vtkm::cont::ArrayHandleSOA(storage); - } -}; - -template -struct DataArrayToArrayHandle, 1> -{ - using StorageType = vtkm::cont::internal::Storage; - using ArrayHandleType = vtkm::cont::ArrayHandle; - - static ArrayHandleType Wrap(vtkSOADataArrayTemplate* input) - { - return vtkm::cont::make_ArrayHandle( - input->GetComponentArrayPointer(0), input->GetNumberOfTuples()); - } -}; - -enum class FieldsFlag -{ - None = 0x0, - Points = 0x1, - Cells = 0x2, - - PointsAndCells = Points | Cells -}; - -VTKACCELERATORSVTKM_EXPORT -void ProcessFields(vtkDataSet* input, vtkm::cont::DataSet& dataset, tovtkm::FieldsFlag fields); - -// determine the type and call the proper Convert routine -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::Field Convert(vtkDataArray* input, int association); -} - -namespace fromvtkm -{ - -VTKACCELERATORSVTKM_EXPORT -vtkDataArray* Convert(const vtkm::cont::Field& input); - -VTKACCELERATORSVTKM_EXPORT -vtkPoints* Convert(const vtkm::cont::CoordinateSystem& input); - -VTKACCELERATORSVTKM_EXPORT -bool ConvertArrays(const vtkm::cont::DataSet& input, vtkDataSet* output); -} - -inline tovtkm::FieldsFlag operator&(const tovtkm::FieldsFlag& a, const tovtkm::FieldsFlag& b) -{ - using T = std::underlying_type::type; - return static_cast(static_cast(a) & static_cast(b)); -} - -inline tovtkm::FieldsFlag operator|(const tovtkm::FieldsFlag& a, const tovtkm::FieldsFlag& b) -{ - using T = std::underlying_type::type; - return static_cast(static_cast(a) | static_cast(b)); -} - -#endif // vtkmlib_ArrayConverters_h diff --git a/Accelerators/Vtkm/vtkmlib/ArrayConverters.hxx b/Accelerators/Vtkm/vtkmlib/ArrayConverters.hxx deleted file mode 100644 index 50b8f6cbd..000000000 --- a/Accelerators/Vtkm/vtkmlib/ArrayConverters.hxx +++ /dev/null @@ -1,132 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#include "ArrayConverters.h" - -#include - -#include "vtkDataArray.h" -#include "vtkDataObject.h" - -namespace tovtkm -{ - -template -vtkm::cont::VariantArrayHandle vtkDataArrayToVariantArrayHandle(DataArrayType* input) -{ - int numComps = input->GetNumberOfComponents(); - switch (numComps) - { - case 1: - return vtkm::cont::VariantArrayHandle(DataArrayToArrayHandle::Wrap(input)); - case 2: - return vtkm::cont::VariantArrayHandle(DataArrayToArrayHandle::Wrap(input)); - case 3: - return vtkm::cont::VariantArrayHandle(DataArrayToArrayHandle::Wrap(input)); - case 4: - return vtkm::cont::VariantArrayHandle(DataArrayToArrayHandle::Wrap(input)); - case 6: - return vtkm::cont::VariantArrayHandle(DataArrayToArrayHandle::Wrap(input)); - case 9: - return vtkm::cont::VariantArrayHandle(DataArrayToArrayHandle::Wrap(input)); - default: - { - vtkm::Id numTuples = input->GetNumberOfTuples(); - auto subHandle = DataArrayToArrayHandle::Wrap(input); - auto offsets = - vtkm::cont::ArrayHandleCounting(vtkm::Id(0), vtkm::Id(numComps), numTuples); - auto handle = vtkm::cont::make_ArrayHandleGroupVecVariable(subHandle, offsets); - return vtkm::cont::VariantArrayHandle(handle); - } - } -} - -template -vtkm::cont::Field ConvertPointField(DataArrayType* input) -{ - auto vhandle = vtkDataArrayToVariantArrayHandle(input); - return vtkm::cont::make_FieldPoint(input->GetName(), vhandle); -} - -template -vtkm::cont::Field ConvertCellField(DataArrayType* input) -{ - auto vhandle = vtkDataArrayToVariantArrayHandle(input); - return vtkm::cont::make_FieldCell(input->GetName(), vhandle); -} - -template -vtkm::cont::Field Convert(DataArrayType* input, int association) -{ - // we need to switch on if we are a cell or point field first! - // The problem is that the constructor signature for fields differ based - // on if they are a cell or point field. - if (association == vtkDataObject::FIELD_ASSOCIATION_POINTS) - { - return ConvertPointField(input); - } - else if (association == vtkDataObject::FIELD_ASSOCIATION_CELLS) - { - return ConvertCellField(input); - } - - return vtkm::cont::Field(); -} - -#if !defined(vtkmlib_ArrayConverterExport_cxx) -#define VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, ValueType) \ - extern template vtkm::cont::Field Convert >( \ - ArrayType * input, int association); -#else -#define VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, ValueType) \ - template vtkm::cont::Field Convert >( \ - ArrayType * input, int association); -#endif - -#define VTK_EXPORT_SIGNED_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, char) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, int) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, long) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, long long) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, short) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, signed char) - -#define VTK_EXPORT_UNSIGNED_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned char) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned int) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned long) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned long long) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, unsigned short) - -#define VTK_EXPORT_REAL_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, double) \ - VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL(ArrayType, float) - -#if !defined(vtkmlib_ArrayConverterExport_cxx) -#define VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ - VTK_EXPORT_SIGNED_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ - VTK_EXPORT_UNSIGNED_ARRAY_CONVERSION_TO_VTKM(ArrayType) \ - VTK_EXPORT_REAL_ARRAY_CONVERSION_TO_VTKM(ArrayType) - -VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM(vtkAOSDataArrayTemplate) -VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM(vtkSOADataArrayTemplate) - -#undef VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM -#undef VTK_EXPORT_ARRAY_CONVERSION_TO_VTKM_DETAIL - -#endif // !defined(ArrayConverterExport_cxx) - -} // tovtkm diff --git a/Accelerators/Vtkm/vtkmlib/CellSetConverters.cxx b/Accelerators/Vtkm/vtkmlib/CellSetConverters.cxx deleted file mode 100644 index 448d53a39..000000000 --- a/Accelerators/Vtkm/vtkmlib/CellSetConverters.cxx +++ /dev/null @@ -1,312 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "CellSetConverters.h" - -#include "ArrayConverters.hxx" -#include "DataSetConverters.h" - -#include "vtkmFilterPolicy.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "vtkCellArray.h" -#include "vtkCellType.h" -#include "vtkIdTypeArray.h" -#include "vtkNew.h" -#include "vtkUnsignedCharArray.h" - -namespace tovtkm -{ - -namespace -{ - -template -struct ReorderHex : public vtkm::exec::FunctorBase -{ - ReorderHex(PortalT portal) - : Portal{ portal } - { - } - - void operator()(vtkm::Id index) const - { - const vtkm::Id offset = index * 8; - - auto doSwap = [&](vtkm::Id id1, vtkm::Id id2) { - id1 += offset; - id2 += offset; - - const auto t = this->Portal.Get(id1); - this->Portal.Set(id1, this->Portal.Get(id2)); - this->Portal.Set(id2, t); - }; - - doSwap(2, 3); - doSwap(6, 7); - } - - PortalT Portal; -}; - -struct RunReorder -{ - RunReorder(vtkm::cont::ArrayHandle& handle) - : Handle(handle) - { - } - - template - bool operator()(Device) const - { - using Algo = typename vtkm::cont::DeviceAdapterAlgorithm; - - auto portal = this->Handle.PrepareForInPlace(Device{}); - - using Functor = ReorderHex; - Functor reorder{ portal }; - - Algo::Schedule(reorder, portal.GetNumberOfValues() / 8); - return true; - } - - vtkm::cont::ArrayHandle& Handle; -}; - -struct BuildSingleTypeCellSetVisitor -{ - template - vtkm::cont::DynamicCellSet operator()( - CellStateT& state, vtkm::UInt8 cellType, vtkm::IdComponent cellSize, vtkIdType numPoints) - { - using VTKIdT = typename CellStateT::ValueType; // might not be vtkIdType... - using VTKArrayT = vtkAOSDataArrayTemplate; - static constexpr bool IsVtkmIdType = std::is_same::value; - - // Construct an arrayhandle that holds the connectivity array - using DirectConverter = tovtkm::DataArrayToArrayHandle; - auto connHandleDirect = DirectConverter::Wrap(state.GetConnectivity()); - - // Cast if necessary: - auto connHandle = IsVtkmIdType ? connHandleDirect - : vtkm::cont::make_ArrayHandleCast(connHandleDirect); - - using ConnHandleType = typename std::decay::type; - using ConnStorageTag = typename ConnHandleType::StorageTag; - using CellSetType = vtkm::cont::CellSetSingleType; - - CellSetType cellSet; - cellSet.Fill(static_cast(numPoints), cellType, cellSize, connHandle); - return cellSet; - } -}; - -struct BuildSingleTypeVoxelCellSetVisitor -{ - template - vtkm::cont::DynamicCellSet operator()(CellStateT& state, vtkIdType numPoints) - { - vtkm::cont::ArrayHandle connHandle; - { - auto* conn = state.GetConnectivity(); - const auto* origData = conn->GetPointer(0); - const vtkm::Id numIds = conn->GetNumberOfValues(); - vtkm::cont::ArrayCopy( - vtkm::cont::make_ArrayHandle(origData, numIds, vtkm::CopyFlag::Off), connHandle); - - // reorder cells from voxel->hex: which only can run on - // devices that have shared memory / vtable with the CPU - using SMPTypes = vtkm::List; - - RunReorder reorder{ connHandle }; - vtkm::cont::TryExecute(reorder, SMPTypes{}); - } - - using CellSetType = vtkm::cont::CellSetSingleType<>; - - CellSetType cellSet; - cellSet.Fill(numPoints, vtkm::CELL_SHAPE_HEXAHEDRON, 8, connHandle); - return cellSet; - } -}; - -} // end anon namespace - -// convert a cell array of a single type to a vtkm CellSetSingleType -vtkm::cont::DynamicCellSet ConvertSingleType( - vtkCellArray* cells, int cellType, vtkIdType numberOfPoints) -{ - switch (cellType) - { - case VTK_LINE: - return cells->Visit( - BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_LINE, 2, numberOfPoints); - - case VTK_HEXAHEDRON: - return cells->Visit( - BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_HEXAHEDRON, 8, numberOfPoints); - - case VTK_VOXEL: - // Note that this is a special case that reorders ids voxel to hex: - return cells->Visit(BuildSingleTypeVoxelCellSetVisitor{}, numberOfPoints); - - case VTK_QUAD: - return cells->Visit( - BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_QUAD, 4, numberOfPoints); - - case VTK_TETRA: - return cells->Visit( - BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_TETRA, 4, numberOfPoints); - - case VTK_TRIANGLE: - return cells->Visit( - BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_TRIANGLE, 3, numberOfPoints); - - case VTK_VERTEX: - return cells->Visit( - BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_VERTEX, 1, numberOfPoints); - - case VTK_WEDGE: - return cells->Visit( - BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_WEDGE, 6, numberOfPoints); - - case VTK_PYRAMID: - return cells->Visit( - BuildSingleTypeCellSetVisitor{}, vtkm::CELL_SHAPE_PYRAMID, 5, numberOfPoints); - - default: - break; - } - - throw vtkm::cont::ErrorBadType("Unsupported VTK cell type in " - "CellSetSingleType converter."); -} - -namespace -{ - -struct BuildExplicitCellSetVisitor -{ - template - vtkm::cont::DynamicCellSet operator()(CellStateT& state, - const vtkm::cont::ArrayHandle& shapes, vtkm::Id numPoints) const - { - using VTKIdT = typename CellStateT::ValueType; // might not be vtkIdType... - using VTKArrayT = vtkAOSDataArrayTemplate; - static constexpr bool IsVtkmIdType = std::is_same::value; - - // Construct arrayhandles to hold the arrays - using DirectConverter = tovtkm::DataArrayToArrayHandle; - auto offsetsHandleDirect = DirectConverter::Wrap(state.GetOffsets()); - auto connHandleDirect = DirectConverter::Wrap(state.GetConnectivity()); - - // Cast if necessary: - auto connHandle = IsVtkmIdType ? connHandleDirect - : vtkm::cont::make_ArrayHandleCast(connHandleDirect); - auto offsetsHandle = IsVtkmIdType - ? offsetsHandleDirect - : vtkm::cont::make_ArrayHandleCast(offsetsHandleDirect); - - using ShapesStorageTag = typename std::decay::type::StorageTag; - using ConnStorageTag = typename decltype(connHandle)::StorageTag; - using OffsetsStorageTag = typename decltype(offsetsHandle)::StorageTag; - using CellSetType = - vtkm::cont::CellSetExplicit; - - CellSetType cellSet; - cellSet.Fill(numPoints, shapes, connHandle, offsetsHandle); - return cellSet; - } -}; - -} // end anon namespace - -// convert a cell array of mixed types to a vtkm CellSetExplicit -vtkm::cont::DynamicCellSet Convert( - vtkUnsignedCharArray* types, vtkCellArray* cells, vtkIdType numberOfPoints) -{ - using ShapeArrayType = vtkAOSDataArrayTemplate; - using ShapeConverter = tovtkm::DataArrayToArrayHandle; - return cells->Visit(BuildExplicitCellSetVisitor{}, ShapeConverter::Wrap(types), numberOfPoints); -} - -} // namespace tovtkm - -namespace fromvtkm -{ - -bool Convert(const vtkm::cont::DynamicCellSet& toConvert, vtkCellArray* cells, - vtkUnsignedCharArray* typesArray) -{ - const auto* cellset = toConvert.GetCellSetBase(); - - // small hack as we can't compute properly the number of cells - // instead we will pre-allocate and than shrink - const vtkm::Id numCells = cellset->GetNumberOfCells(); - const vtkm::Id maxSize = numCells * 8; // largest cell type is hex - - // TODO this could steal the guts out of explicit cellsets as a future - // no-copy optimization. - vtkNew offsetsArray; - offsetsArray->SetNumberOfTuples(static_cast(numCells + 1)); - vtkNew connArray; - connArray->SetNumberOfTuples(static_cast(maxSize)); - - if (typesArray) - { - typesArray->SetNumberOfComponents(1); - typesArray->SetNumberOfTuples(static_cast(numCells)); - } - - vtkIdType* connIter = connArray->GetPointer(0); - const vtkIdType* connBegin = connIter; - - for (vtkm::Id cellId = 0; cellId < numCells; ++cellId) - { - const vtkIdType vtkCellId = static_cast(cellId); - const vtkm::Id npts = cellset->GetNumberOfPointsInCell(cellId); - assert(npts <= 8 && "Initial allocation assumes no more than 8 pts/cell."); - - const vtkIdType offset = static_cast(connIter - connBegin); - offsetsArray->SetValue(vtkCellId, offset); - - cellset->GetCellPointIds(cellId, connIter); - connIter += npts; - - if (typesArray) - { - typesArray->SetValue(vtkCellId, cellset->GetCellShape(cellId)); - } - } - - const vtkIdType connSize = static_cast(connIter - connBegin); - offsetsArray->SetValue(static_cast(numCells), connSize); - connArray->Resize(connSize); - cells->SetData(offsetsArray, connArray); - - return true; -} - -} // namespace fromvtkm diff --git a/Accelerators/Vtkm/vtkmlib/CellSetConverters.h b/Accelerators/Vtkm/vtkmlib/CellSetConverters.h deleted file mode 100644 index 7973422eb..000000000 --- a/Accelerators/Vtkm/vtkmlib/CellSetConverters.h +++ /dev/null @@ -1,49 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#ifndef vtkmlib_CellSetConverters_h -#define vtkmlib_CellSetConverters_h - -#include "vtkAcceleratorsVTKmModule.h" -#include "vtkmConfig.h" //required for general vtkm setup - -#include -#include - -class vtkCellArray; -class vtkUnsignedCharArray; -class vtkIdTypeArray; - -namespace tovtkm -{ -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::DynamicCellSet ConvertSingleType( - vtkCellArray* cells, int cellType, vtkIdType numberOfPoints); - -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::DynamicCellSet Convert( - vtkUnsignedCharArray* types, vtkCellArray* cells, vtkIdType numberOfPoints); -} - -namespace fromvtkm -{ - -VTKACCELERATORSVTKM_EXPORT -bool Convert(const vtkm::cont::DynamicCellSet& toConvert, vtkCellArray* cells, - vtkUnsignedCharArray* types = nullptr); -} - -#endif // vtkmlib_CellSetConverters_h diff --git a/Accelerators/Vtkm/vtkmlib/DataSetConverters.cxx b/Accelerators/Vtkm/vtkmlib/DataSetConverters.cxx deleted file mode 100644 index c17ee38c8..000000000 --- a/Accelerators/Vtkm/vtkmlib/DataSetConverters.cxx +++ /dev/null @@ -1,310 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#include "DataSetConverters.h" - -#include "ArrayConverters.h" -#include "CellSetConverters.h" -#include "ImageDataConverter.h" -#include "PolyDataConverter.h" -#include "UnstructuredGridConverter.h" - -#include "vtkmDataArray.h" - -#include "vtkCellArray.h" -#include "vtkCellData.h" -#include "vtkCellTypes.h" -#include "vtkDataObject.h" -#include "vtkDataObjectTypes.h" -#include "vtkDataSetAttributes.h" -#include "vtkImageData.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" -#include "vtkRectilinearGrid.h" -#include "vtkSmartPointer.h" -#include "vtkStructuredGrid.h" -#include "vtkUnstructuredGrid.h" - -#include -#include -#include -#include -#include -#include - -namespace tovtkm -{ - -namespace -{ - -template -vtkm::cont::CoordinateSystem deduce_container(vtkPoints* points) -{ - typedef vtkm::Vec Vec3; - - vtkAOSDataArrayTemplate* typedIn = vtkAOSDataArrayTemplate::FastDownCast(points->GetData()); - if (typedIn) - { - auto p = DataArrayToArrayHandle, 3>::Wrap(typedIn); - return vtkm::cont::CoordinateSystem("coords", p); - } - - vtkSOADataArrayTemplate* typedIn2 = - vtkSOADataArrayTemplate::FastDownCast(points->GetData()); - if (typedIn2) - { - auto p = DataArrayToArrayHandle, 3>::Wrap(typedIn2); - return vtkm::cont::CoordinateSystem("coords", p); - } - - vtkmDataArray* typedIn3 = vtkmDataArray::SafeDownCast(points->GetData()); - if (typedIn3) - { - return vtkm::cont::CoordinateSystem("coords", typedIn3->GetVtkmVariantArrayHandle()); - } - - typedef vtkm::Vec Vec3; - Vec3* xyz = nullptr; - return vtkm::cont::make_CoordinateSystem("coords", xyz, 0); -} -} -//------------------------------------------------------------------------------ -// convert a vtkPoints array into a coordinate system -vtkm::cont::CoordinateSystem Convert(vtkPoints* points) -{ - if (points) - { - if (points->GetDataType() == VTK_FLOAT) - { - return deduce_container(points); - } - else if (points->GetDataType() == VTK_DOUBLE) - { - return deduce_container(points); - } - } - - // unsupported/null point set - typedef vtkm::Vec Vec3; - Vec3* xyz = nullptr; - return vtkm::cont::make_CoordinateSystem("coords", xyz, 0); -} - -//------------------------------------------------------------------------------ -// convert an structured grid type -vtkm::cont::DataSet Convert(vtkStructuredGrid* input, FieldsFlag fields) -{ - const int dimensionality = input->GetDataDimension(); - int dims[3]; - input->GetDimensions(dims); - - vtkm::cont::DataSet dataset; - - // first step convert the points over to an array handle - vtkm::cont::CoordinateSystem coords = Convert(input->GetPoints()); - dataset.AddCoordinateSystem(coords); - - // second step is to create structured cellset that represe - if (dimensionality == 1) - { - vtkm::cont::CellSetStructured<1> cells; - cells.SetPointDimensions(dims[0]); - dataset.SetCellSet(cells); - } - else if (dimensionality == 2) - { - vtkm::cont::CellSetStructured<2> cells; - cells.SetPointDimensions(vtkm::make_Vec(dims[0], dims[1])); - dataset.SetCellSet(cells); - } - else - { // going to presume 3d for everything else - vtkm::cont::CellSetStructured<3> cells; - cells.SetPointDimensions(vtkm::make_Vec(dims[0], dims[1], dims[2])); - dataset.SetCellSet(cells); - } - - ProcessFields(input, dataset, fields); - - return dataset; -} - -//------------------------------------------------------------------------------ -// determine the type and call the proper Convert routine -vtkm::cont::DataSet Convert(vtkDataSet* input, FieldsFlag fields) -{ - switch (input->GetDataObjectType()) - { - case VTK_UNSTRUCTURED_GRID: - return Convert(vtkUnstructuredGrid::SafeDownCast(input), fields); - case VTK_STRUCTURED_GRID: - return Convert(vtkStructuredGrid::SafeDownCast(input), fields); - case VTK_UNIFORM_GRID: - case VTK_IMAGE_DATA: - return Convert(vtkImageData::SafeDownCast(input), fields); - case VTK_POLY_DATA: - return Convert(vtkPolyData::SafeDownCast(input), fields); - - case VTK_UNSTRUCTURED_GRID_BASE: - case VTK_RECTILINEAR_GRID: - case VTK_STRUCTURED_POINTS: - default: - return vtkm::cont::DataSet(); - } -} - -} // namespace tovtkm - -namespace fromvtkm -{ - -namespace -{ - -struct ComputeExtents -{ - template - void operator()(const vtkm::cont::CellSetStructured& cs, - const vtkm::Id3& structuredCoordsDims, int extent[6]) const - { - auto extStart = cs.GetGlobalPointIndexStart(); - for (int i = 0, ii = 0; i < 3; ++i) - { - if (structuredCoordsDims[i] > 1) - { - extent[2 * i] = vtkm::VecTraits::GetComponent(extStart, ii++); - extent[(2 * i) + 1] = extent[2 * i] + structuredCoordsDims[i] - 1; - } - else - { - extent[2 * i] = extent[(2 * i) + 1] = 0; - } - } - } - - template - void operator()(const vtkm::cont::CellSetStructured& cs, int extent[6]) const - { - auto extStart = cs.GetGlobalPointIndexStart(); - auto csDim = cs.GetPointDimensions(); - for (int i = 0; i < Dim; ++i) - { - extent[2 * i] = vtkm::VecTraits::GetComponent(extStart, i); - extent[(2 * i) + 1] = - extent[2 * i] + vtkm::VecTraits::GetComponent(csDim, i) - 1; - } - for (int i = Dim; i < 3; ++i) - { - extent[2 * i] = extent[(2 * i) + 1] = 0; - } - } -}; -} // anonymous namespace - -void PassAttributesInformation(vtkDataSetAttributes* input, vtkDataSetAttributes* output) -{ - for (int attribType = 0; attribType < vtkDataSetAttributes::NUM_ATTRIBUTES; attribType++) - { - vtkDataArray* attribute = input->GetAttribute(attribType); - if (attribute == nullptr) - { - continue; - } - output->SetActiveAttribute(attribute->GetName(), attribType); - } -} - -bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkRectilinearGrid* output, vtkDataSet* input) -{ - using ListCellSetStructured = vtkm::List, - vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3> >; - auto cellSet = vtkmOut.GetCellSet().ResetCellSetList(ListCellSetStructured{}); - - using coordType = - vtkm::cont::ArrayHandleCartesianProduct, - vtkm::cont::ArrayHandle, vtkm::cont::ArrayHandle >; - auto coordsArray = vtkm::cont::Cast(vtkmOut.GetCoordinateSystem().GetData()); - - vtkSmartPointer xArray = - Convert(vtkm::cont::make_FieldPoint("xArray", coordsArray.GetStorage().GetFirstArray())); - vtkSmartPointer yArray = - Convert(vtkm::cont::make_FieldPoint("yArray", coordsArray.GetStorage().GetSecondArray())); - vtkSmartPointer zArray = - Convert(vtkm::cont::make_FieldPoint("zArray", coordsArray.GetStorage().GetThirdArray())); - - if (!xArray || !yArray || !zArray) - { - return false; - } - - vtkm::Id3 dims( - xArray->GetNumberOfValues(), yArray->GetNumberOfValues(), zArray->GetNumberOfValues()); - - int extents[6]; - vtkm::cont::CastAndCall(cellSet, ComputeExtents{}, dims, extents); - - output->SetExtent(extents); - output->SetXCoordinates(xArray); - output->SetYCoordinates(yArray); - output->SetZCoordinates(zArray); - - // Next we need to convert any extra fields from vtkm over to vtk - if (!fromvtkm::ConvertArrays(vtkmOut, output)) - { - return false; - } - - // Pass information about attributes. - PassAttributesInformation(input->GetPointData(), output->GetPointData()); - PassAttributesInformation(input->GetCellData(), output->GetCellData()); - - return true; -} - -bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkStructuredGrid* output, vtkDataSet* input) -{ - using ListCellSetStructured = vtkm::List, - vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3> >; - auto cellSet = vtkmOut.GetCellSet().ResetCellSetList(ListCellSetStructured{}); - - int extents[6]; - vtkm::cont::CastAndCall(cellSet, ComputeExtents{}, extents); - - vtkSmartPointer points = Convert(vtkmOut.GetCoordinateSystem()); - if (!points) - { - return false; - } - - output->SetExtent(extents); - output->SetPoints(points); - - // Next we need to convert any extra fields from vtkm over to vtk - if (!fromvtkm::ConvertArrays(vtkmOut, output)) - { - return false; - } - - // Pass information about attributes. - PassAttributesInformation(input->GetPointData(), output->GetPointData()); - PassAttributesInformation(input->GetCellData(), output->GetCellData()); - - return true; -} - -} // namespace fromvtkm diff --git a/Accelerators/Vtkm/vtkmlib/DataSetConverters.h b/Accelerators/Vtkm/vtkmlib/DataSetConverters.h deleted file mode 100644 index 23369cd98..000000000 --- a/Accelerators/Vtkm/vtkmlib/DataSetConverters.h +++ /dev/null @@ -1,65 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#ifndef vtkmlib_DataSetConverters_h -#define vtkmlib_DataSetConverters_h - -#include "vtkAcceleratorsVTKmModule.h" - -#include "ArrayConverters.h" // for FieldsFlag - -#include "vtkmConfig.h" //required for general vtkm setup - -#include - -class vtkDataSet; -class vtkDataSetAttributes; -class vtkImageData; -class vtkPoints; -class vtkRectilinearGrid; -class vtkStructuredGrid; - -namespace tovtkm -{ - -// convert a vtkPoints array into a coordinate system -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::CoordinateSystem Convert(vtkPoints* points); - -// convert an structured grid type -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::DataSet Convert(vtkStructuredGrid* input, FieldsFlag fields = FieldsFlag::None); - -// determine the type and call the proper Convert routine -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::DataSet Convert(vtkDataSet* input, FieldsFlag fields = FieldsFlag::None); -} - -namespace fromvtkm -{ - -VTKACCELERATORSVTKM_EXPORT -void PassAttributesInformation(vtkDataSetAttributes* input, vtkDataSetAttributes* output); - -VTKACCELERATORSVTKM_EXPORT -bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkRectilinearGrid* output, vtkDataSet* input); - -VTKACCELERATORSVTKM_EXPORT -bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkStructuredGrid* output, vtkDataSet* input); - -} - -#endif // vtkmlib_DataSetConverters_h diff --git a/Accelerators/Vtkm/vtkmlib/ImageDataConverter.cxx b/Accelerators/Vtkm/vtkmlib/ImageDataConverter.cxx deleted file mode 100644 index bab8193c3..000000000 --- a/Accelerators/Vtkm/vtkmlib/ImageDataConverter.cxx +++ /dev/null @@ -1,172 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: ImageDataConverter.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "ImageDataConverter.h" - -#include -#include - -#include "ArrayConverters.h" -#include "DataSetConverters.h" - -#include "vtkCellData.h" -#include "vtkDataArray.h" -#include "vtkDataSetAttributes.h" -#include "vtkImageData.h" -#include "vtkPointData.h" - -namespace -{ - -struct ComputeExtents -{ - template - void operator()(const vtkm::cont::CellSetStructured& cs, - const vtkm::Id3& structuredCoordsDims, int extent[6]) const - { - auto extStart = cs.GetGlobalPointIndexStart(); - for (int i = 0, ii = 0; i < 3; ++i) - { - if (structuredCoordsDims[i] > 1) - { - extent[2 * i] = vtkm::VecTraits::GetComponent(extStart, ii++); - extent[(2 * i) + 1] = extent[2 * i] + structuredCoordsDims[i] - 1; - } - else - { - extent[2 * i] = extent[(2 * i) + 1] = 0; - } - } - } -}; - -struct SetGlobalPointIndexStart -{ - template - void operator()(const vtkm::cont::CellSetStructured&, const vtkm::Id3& structuredCoordsDims, - const int extent[6], DynamicCellSetType& dcs) const - { - typename vtkm::cont::CellSetStructured::SchedulingRangeType extStart{}; - for (int i = 0, ii = 0; i < 3; ++i) - { - if (structuredCoordsDims[i] > 1) - { - vtkm::VecTraits::SetComponent(extStart, ii++, extent[2 * i]); - } - } - vtkm::cont::Cast >(dcs).SetGlobalPointIndexStart(extStart); - } -}; - -} // anonymous namespace - -namespace tovtkm -{ - -//------------------------------------------------------------------------------ -// convert an image data type -vtkm::cont::DataSet Convert(vtkImageData* input, FieldsFlag fields) -{ - int extent[6]; - input->GetExtent(extent); - double vorigin[3]; - input->GetOrigin(vorigin); - double vspacing[3]; - input->GetSpacing(vspacing); - int vdims[3]; - input->GetDimensions(vdims); - - vtkm::Vec origin( - static_cast((static_cast(extent[0]) * vspacing[0]) + vorigin[0]), - static_cast((static_cast(extent[2]) * vspacing[1]) + vorigin[1]), - static_cast((static_cast(extent[4]) * vspacing[2]) + vorigin[2])); - vtkm::Vec spacing(static_cast(vspacing[0]), - static_cast(vspacing[1]), static_cast(vspacing[2])); - vtkm::Id3 dims(vdims[0], vdims[1], vdims[2]); - - vtkm::cont::DataSet dataset = vtkm::cont::DataSetBuilderUniform::Create(dims, origin, spacing); - - using ListCellSetStructured = vtkm::List, - vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3> >; - auto cellSet = dataset.GetCellSet().ResetCellSetList(ListCellSetStructured{}); - vtkm::cont::CastAndCall(cellSet, SetGlobalPointIndexStart{}, dims, extent, dataset.GetCellSet()); - - ProcessFields(input, dataset, fields); - - return dataset; -} - -} // tovtkm - -namespace fromvtkm -{ - -bool Convert( - const vtkm::cont::DataSet& voutput, int extents[6], vtkImageData* output, vtkDataSet* input) -{ - vtkm::cont::CoordinateSystem cs = voutput.GetCoordinateSystem(); - if (!cs.GetData().IsType()) - { - return false; - } - - auto points = cs.GetData().Cast(); - auto portal = points.GetPortalConstControl(); - - auto origin = portal.GetOrigin(); - auto spacing = portal.GetSpacing(); - auto dim = portal.GetDimensions(); - VTKM_ASSERT((extents[1] - extents[0] + 1) == dim[0] && (extents[3] - extents[2] + 1) == dim[1] && - (extents[5] - extents[4] + 1) == dim[2]); - - origin[0] -= static_cast(extents[0]) * spacing[0]; - origin[1] -= static_cast(extents[2]) * spacing[1]; - origin[2] -= static_cast(extents[4]) * spacing[2]; - - output->SetExtent(extents); - output->SetOrigin(origin[0], origin[1], origin[2]); - output->SetSpacing(spacing[0], spacing[1], spacing[2]); - - // Next we need to convert any extra fields from vtkm over to vtk - bool arraysConverted = fromvtkm::ConvertArrays(voutput, output); - - // Pass information about attributes. - PassAttributesInformation(input->GetPointData(), output->GetPointData()); - PassAttributesInformation(input->GetCellData(), output->GetCellData()); - - return arraysConverted; -} - -bool Convert(const vtkm::cont::DataSet& voutput, vtkImageData* output, vtkDataSet* input) -{ - vtkm::cont::CoordinateSystem cs = voutput.GetCoordinateSystem(); - if (!cs.GetData().IsType()) - { - return false; - } - - auto points = cs.GetData().Cast(); - auto portal = points.GetPortalConstControl(); - - auto dim = portal.GetDimensions(); - int extents[6]; - using ListCellSetStructured = vtkm::List, - vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3> >; - auto cellSet = voutput.GetCellSet().ResetCellSetList(ListCellSetStructured{}); - vtkm::cont::CastAndCall(cellSet, ComputeExtents{}, dim, extents); - - return Convert(voutput, extents, output, input); -} - -} // fromvtkm diff --git a/Accelerators/Vtkm/vtkmlib/ImageDataConverter.h b/Accelerators/Vtkm/vtkmlib/ImageDataConverter.h deleted file mode 100644 index e174a2c32..000000000 --- a/Accelerators/Vtkm/vtkmlib/ImageDataConverter.h +++ /dev/null @@ -1,48 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: ImageDataConverter.h - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#ifndef vtkmlib_ImageDataConverter_h -#define vtkmlib_ImageDataConverter_h - -#include "vtkAcceleratorsVTKmModule.h" - -#include "ArrayConverters.h" // for FieldsFlag - -#include "vtkmConfig.h" //required for general vtkm setup - -#include - -class vtkImageData; -class vtkDataSet; - -namespace tovtkm -{ - -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::DataSet Convert(vtkImageData* input, FieldsFlag fields = FieldsFlag::None); - -} - -namespace fromvtkm -{ - -VTKACCELERATORSVTKM_EXPORT -bool Convert(const vtkm::cont::DataSet& voutput, vtkImageData* output, vtkDataSet* input); - -VTKACCELERATORSVTKM_EXPORT -bool Convert( - const vtkm::cont::DataSet& voutput, int extents[6], vtkImageData* output, vtkDataSet* input); - -} -#endif // vtkmlib_ImageDataConverter_h diff --git a/Accelerators/Vtkm/vtkmlib/ImplicitFunctionConverter.cxx b/Accelerators/Vtkm/vtkmlib/ImplicitFunctionConverter.cxx deleted file mode 100644 index 6be1b5573..000000000 --- a/Accelerators/Vtkm/vtkmlib/ImplicitFunctionConverter.cxx +++ /dev/null @@ -1,157 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "ImplicitFunctionConverter.h" - -#include "vtkmFilterPolicy.h" - -#include "vtkBox.h" -#include "vtkCylinder.h" -#include "vtkPlane.h" -#include "vtkSphere.h" - -#include - -namespace tovtkm -{ - -inline vtkm::Vec MakeFVec3(const double x[3]) -{ - return vtkm::Vec(static_cast(x[0]), - static_cast(x[1]), static_cast(x[2])); -} - -ImplicitFunctionConverter::ImplicitFunctionConverter() - : InFunction(nullptr) - , OutFunction() - , MTime(0) -{ -} - -void ImplicitFunctionConverter::Set(vtkImplicitFunction* function) -{ - vtkBox* box = nullptr; - vtkCylinder* cylinder = nullptr; - vtkPlane* plane = nullptr; - vtkSphere* sphere = nullptr; - - if ((box = vtkBox::SafeDownCast(function))) - { - double xmin[3], xmax[3]; - box->GetXMin(xmin); - box->GetXMax(xmax); - - auto b = new vtkm::Box(MakeFVec3(xmin), MakeFVec3(xmax)); - this->OutFunction.Reset(b, true); - } - else if ((cylinder = vtkCylinder::SafeDownCast(function))) - { - double center[3], axis[3], radius; - cylinder->GetCenter(center); - cylinder->GetAxis(axis); - radius = cylinder->GetRadius(); - - auto c = new vtkm::Cylinder( - MakeFVec3(center), MakeFVec3(axis), static_cast(radius)); - this->OutFunction.Reset(c, true); - } - else if ((plane = vtkPlane::SafeDownCast(function))) - { - double origin[3], normal[3]; - plane->GetOrigin(origin); - plane->GetNormal(normal); - - auto p = new vtkm::Plane(MakeFVec3(origin), MakeFVec3(normal)); - this->OutFunction.Reset(p, true); - } - else if ((sphere = vtkSphere::SafeDownCast(function))) - { - double center[3], radius; - sphere->GetCenter(center); - radius = sphere->GetRadius(); - - auto s = new vtkm::Sphere(MakeFVec3(center), static_cast(radius)); - this->OutFunction.Reset(s, true); - } - else - { - vtkGenericWarningMacro(<< "The implicit functions " << function->GetClassName() - << " is not supported by vtk-m."); - return; - } - - this->MTime = function->GetMTime(); - this->InFunction = function; -} - -const vtkm::cont::ImplicitFunctionHandle& ImplicitFunctionConverter::Get() const -{ - if (this->InFunction && (this->MTime < this->InFunction->GetMTime())) - { - vtkBox* box = nullptr; - vtkCylinder* cylinder = nullptr; - vtkPlane* plane = nullptr; - vtkSphere* sphere = nullptr; - - if ((box = vtkBox::SafeDownCast(this->InFunction))) - { - double xmin[3], xmax[3]; - box->GetXMin(xmin); - box->GetXMax(xmax); - - auto b = static_cast(this->OutFunction.Get()); - b->SetMinPoint(MakeFVec3(xmin)); - b->SetMaxPoint(MakeFVec3(xmax)); - } - else if ((cylinder = vtkCylinder::SafeDownCast(this->InFunction))) - { - double center[3], axis[3], radius; - cylinder->GetCenter(center); - cylinder->GetAxis(axis); - radius = cylinder->GetRadius(); - - auto c = static_cast(this->OutFunction.Get()); - c->SetCenter(MakeFVec3(center)); - c->SetAxis(MakeFVec3(axis)); - c->SetRadius(static_cast(radius)); - } - else if ((plane = vtkPlane::SafeDownCast(this->InFunction))) - { - double origin[3], normal[3]; - plane->GetOrigin(origin); - plane->GetNormal(normal); - - auto p = static_cast(this->OutFunction.Get()); - p->SetOrigin(MakeFVec3(origin)); - p->SetNormal(MakeFVec3(normal)); - } - else if ((sphere = vtkSphere::SafeDownCast(this->InFunction))) - { - double center[3], radius; - sphere->GetCenter(center); - radius = sphere->GetRadius(); - - auto s = static_cast(this->OutFunction.Get()); - s->SetCenter(MakeFVec3(center)); - s->SetRadius(static_cast(radius)); - } - - this->MTime = this->InFunction->GetMTime(); - } - - return this->OutFunction; -} - -} // tovtkm diff --git a/Accelerators/Vtkm/vtkmlib/ImplicitFunctionConverter.h b/Accelerators/Vtkm/vtkmlib/ImplicitFunctionConverter.h deleted file mode 100644 index c17f02dbf..000000000 --- a/Accelerators/Vtkm/vtkmlib/ImplicitFunctionConverter.h +++ /dev/null @@ -1,46 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#ifndef vtkmlib_ImplicitFunctionConverter_h -#define vtkmlib_ImplicitFunctionConverter_h - -#include "vtkAcceleratorsVTKmModule.h" -#include "vtkType.h" // For vtkMTimeType -#include "vtkmConfig.h" //required for general vtkm setup - -#include "vtkm/cont/ImplicitFunctionHandle.h" - -class vtkImplicitFunction; - -namespace tovtkm -{ - -class VTKACCELERATORSVTKM_EXPORT ImplicitFunctionConverter -{ -public: - ImplicitFunctionConverter(); - - void Set(vtkImplicitFunction*); - const vtkm::cont::ImplicitFunctionHandle& Get() const; - -private: - vtkImplicitFunction* InFunction; - vtkm::cont::ImplicitFunctionHandle OutFunction; - mutable vtkMTimeType MTime; -}; - -} - -#endif // vtkmlib_ImplicitFunctionConverter_h diff --git a/Accelerators/Vtkm/vtkmlib/PolyDataConverter.cxx b/Accelerators/Vtkm/vtkmlib/PolyDataConverter.cxx deleted file mode 100644 index e6f43fc06..000000000 --- a/Accelerators/Vtkm/vtkmlib/PolyDataConverter.cxx +++ /dev/null @@ -1,181 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= -#include "PolyDataConverter.h" - -#include "ArrayConverters.h" -#include "CellSetConverters.h" -#include "DataSetConverters.h" - -// datasets we support -#include "vtkCellArray.h" -#include "vtkCellData.h" -#include "vtkCellTypes.h" -#include "vtkDataObject.h" -#include "vtkDataObjectTypes.h" -#include "vtkDataSetAttributes.h" -#include "vtkImageData.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" -#include "vtkStructuredGrid.h" -#include "vtkUniformGrid.h" -#include "vtkUnstructuredGrid.h" - -#include -#include -#include - -namespace tovtkm -{ - -//------------------------------------------------------------------------------ -// convert an polydata type -vtkm::cont::DataSet Convert(vtkPolyData* input, FieldsFlag fields) -{ - // the poly data is an interesting issue with the fact that the - // vtk datastructure can contain multiple types. - // we should look at querying the cell types, so we can use single cell - // set where possible - vtkm::cont::DataSet dataset; - - // first step convert the points over to an array handle - vtkm::cont::CoordinateSystem coords = Convert(input->GetPoints()); - dataset.AddCoordinateSystem(coords); - - // first check if we only have polys/lines/verts - bool filled = false; - const bool onlyPolys = (input->GetNumberOfCells() == input->GetNumberOfPolys()); - const bool onlyLines = (input->GetNumberOfCells() == input->GetNumberOfLines()); - const bool onlyVerts = (input->GetNumberOfCells() == input->GetNumberOfVerts()); - - const vtkIdType numPoints = input->GetNumberOfPoints(); - if (onlyPolys) - { - vtkCellArray* cells = input->GetPolys(); - const vtkIdType homoSize = cells->IsHomogeneous(); - if (homoSize == 3) - { - // We are all triangles - vtkm::cont::DynamicCellSet dcells = ConvertSingleType(cells, VTK_TRIANGLE, numPoints); - dataset.SetCellSet(dcells); - filled = true; - } - else if (homoSize == 4) - { - // We are all quads - vtkm::cont::DynamicCellSet dcells = ConvertSingleType(cells, VTK_QUAD, numPoints); - dataset.SetCellSet(dcells); - filled = true; - } - else - { - // we have mixture of polygins/quads/triangles, we don't support that - // currently - vtkErrorWithObjectMacro(input, - "VTK-m currently only handles vtkPolyData " - "with only triangles or only quads."); - } - } - else if (onlyLines) - { - vtkCellArray* cells = input->GetLines(); - const vtkIdType homoSize = cells->IsHomogeneous(); - if (homoSize == 2) - { - // We are all lines - vtkm::cont::DynamicCellSet dcells = ConvertSingleType(cells, VTK_LINE, numPoints); - dataset.SetCellSet(dcells); - filled = true; - } - else - { - vtkErrorWithObjectMacro(input, - "VTK-m does not currently support " - "PolyLine cells."); - } - } - else if (onlyVerts) - { - vtkCellArray* cells = input->GetVerts(); - const vtkIdType homoSize = cells->IsHomogeneous(); - if (homoSize == 1) - { - // We are all single vertex - vtkm::cont::DynamicCellSet dcells = ConvertSingleType(cells, VTK_VERTEX, numPoints); - dataset.SetCellSet(dcells); - filled = true; - } - else - { - vtkErrorWithObjectMacro(input, - "VTK-m does not currently support " - "PolyVertex cells."); - } - } - else - { - vtkErrorWithObjectMacro(input, - "VTK-m does not currently support mixed " - "cell types or triangle strips in " - "vtkPolyData."); - } - - if (!filled) - { - // todo: we need to convert a mixed type which - } - - ProcessFields(input, dataset, fields); - - return dataset; -} - -} // namespace tovtkm - -namespace fromvtkm -{ - -//------------------------------------------------------------------------------ -bool Convert(const vtkm::cont::DataSet& voutput, vtkPolyData* output, vtkDataSet* input) -{ - vtkPoints* points = fromvtkm::Convert(voutput.GetCoordinateSystem()); - output->SetPoints(points); - points->FastDelete(); - - // this should be fairly easy as the cells are all a single cell type - // so we just need to determine what cell type it is and copy the results - // into a new array - vtkm::cont::DynamicCellSet outCells = voutput.GetCellSet(); - vtkNew cells; - const bool cellsConverted = fromvtkm::Convert(outCells, cells.GetPointer()); - if (!cellsConverted) - { - return false; - } - - output->SetPolys(cells.GetPointer()); - - // next we need to convert any extra fields from vtkm over to vtk - bool arraysConverted = ConvertArrays(voutput, output); - - // Pass information about attributes. - PassAttributesInformation(input->GetPointData(), output->GetPointData()); - PassAttributesInformation(input->GetCellData(), output->GetCellData()); - - return arraysConverted; -} - -} // namespace fromvtkm diff --git a/Accelerators/Vtkm/vtkmlib/PolyDataConverter.h b/Accelerators/Vtkm/vtkmlib/PolyDataConverter.h deleted file mode 100644 index 0d7062929..000000000 --- a/Accelerators/Vtkm/vtkmlib/PolyDataConverter.h +++ /dev/null @@ -1,43 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#ifndef vtkmlib_PolyDataConverter_h -#define vtkmlib_PolyDataConverter_h - -#include "vtkAcceleratorsVTKmModule.h" - -#include "ArrayConverters.h" // for FieldsFlag - -#include "vtkmConfig.h" //required for general vtkm setup - -#include - -class vtkPolyData; -class vtkDataSet; - -namespace tovtkm -{ -// convert an polydata type -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::DataSet Convert(vtkPolyData* input, FieldsFlag fields = FieldsFlag::None); -} - -namespace fromvtkm -{ -VTKACCELERATORSVTKM_EXPORT -bool Convert(const vtkm::cont::DataSet& voutput, vtkPolyData* output, vtkDataSet* input); -} -#endif // vtkmlib_PolyDataConverter_h diff --git a/Accelerators/Vtkm/vtkmlib/PortalTraits.h b/Accelerators/Vtkm/vtkmlib/PortalTraits.h deleted file mode 100644 index 5ad6df7f7..000000000 --- a/Accelerators/Vtkm/vtkmlib/PortalTraits.h +++ /dev/null @@ -1,147 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#ifndef vtkmlib_PortalTraits_h -#define vtkmlib_PortalTraits_h - -#include "vtkmConfig.h" //required for general vtkm setup - -#include -#include - -#include - -namespace tovtkm -{ - -struct vtkPortalOfVecOfVecValues; -struct vtkPortalOfVecOfValues; -struct vtkPortalOfScalarValues; - -template -struct vtkPortalTraits -{ - using TagType = vtkPortalOfScalarValues; - using ComponentType = typename std::remove_const::type; - using Type = ComponentType; - static constexpr vtkm::IdComponent NUM_COMPONENTS = 1; - - static inline void SetComponent(Type& t, vtkm::IdComponent, const ComponentType& v) { t = v; } - - static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent) { return t; } -}; - -template -struct vtkPortalTraits > -{ - using TagType = vtkPortalOfVecOfValues; - using ComponentType = typename std::remove_const::type; - using Type = vtkm::Vec; - static constexpr vtkm::IdComponent NUM_COMPONENTS = N; - - static inline void SetComponent(Type& t, vtkm::IdComponent i, const ComponentType& v) - { - VTKM_ASSUME((i >= 0 && i < N)); - t[i] = v; - } - - static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent i) - { - VTKM_ASSUME((i >= 0 && i < N)); - return t[i]; - } -}; - -template -struct vtkPortalTraits > -{ - using TagType = vtkPortalOfVecOfValues; - using ComponentType = typename std::remove_const::type; - using Type = vtkm::Vec; - static constexpr vtkm::IdComponent NUM_COMPONENTS = N; - - static inline void SetComponent(Type& t, vtkm::IdComponent i, const ComponentType& v) - { - VTKM_ASSUME((i >= 0 && i < N)); - t[i] = v; - } - - static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent i) - { - VTKM_ASSUME((i >= 0 && i < N)); - return t[i]; - } -}; - -template -struct vtkPortalTraits, M> > -{ - using TagType = vtkPortalOfVecOfVecValues; - using ComponentType = typename std::remove_const::type; - using Type = vtkm::Vec, M>; - static constexpr vtkm::IdComponent NUM_COMPONENTS = N * M; - - static constexpr vtkm::IdComponent NUM_COMPONENTS_OUTER = M; - static constexpr vtkm::IdComponent NUM_COMPONENTS_INNER = N; - - static inline void SetComponent(Type& t, vtkm::IdComponent i, const ComponentType& v) - { - VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS)); - // We need to convert i back to a 2d index - const vtkm::IdComponent j = i % N; - t[i / N][j] = v; - } - - static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent i) - { - VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS)); - // We need to convert i back to a 2d index - const vtkm::IdComponent j = i % N; - return t[i / N][j]; - } -}; - -template -struct vtkPortalTraits, M> > -{ - using TagType = vtkPortalOfVecOfVecValues; - using ComponentType = typename std::remove_const::type; - using Type = vtkm::Vec, M>; - static constexpr vtkm::IdComponent NUM_COMPONENTS = N * M; - - static constexpr vtkm::IdComponent NUM_COMPONENTS_OUTER = M; - static constexpr vtkm::IdComponent NUM_COMPONENTS_INNER = N; - - static inline void SetComponent(Type& t, vtkm::IdComponent i, const ComponentType& v) - { - VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS)); - // We need to convert i back to a 2d index - const vtkm::IdComponent j = i % N; - t[i / N][j] = v; - } - - static inline ComponentType GetComponent(const Type& t, vtkm::IdComponent i) - { - VTKM_ASSUME((i >= 0 && i < NUM_COMPONENTS)); - // We need to convert i back to a 2d index - const vtkm::IdComponent j = i % N; - return t[i / N][j]; - } -}; - -} // namespace vtkmlib - -#endif // vtkmlib_PortalsTraits_h diff --git a/Accelerators/Vtkm/vtkmlib/Portals.cxx b/Accelerators/Vtkm/vtkmlib/Portals.cxx deleted file mode 100644 index 9d1803802..000000000 --- a/Accelerators/Vtkm/vtkmlib/Portals.cxx +++ /dev/null @@ -1,29 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#define vtkmlib_Portals_cxx -#include "Portals.h" - -#include - -namespace tovtkm -{ -// T extern template instantiations -template class VTKACCELERATORSVTKM_EXPORT vtkPointsPortal const>; -template class VTKACCELERATORSVTKM_EXPORT vtkPointsPortal const>; -template class VTKACCELERATORSVTKM_EXPORT vtkPointsPortal >; -template class VTKACCELERATORSVTKM_EXPORT vtkPointsPortal >; -} diff --git a/Accelerators/Vtkm/vtkmlib/Portals.h b/Accelerators/Vtkm/vtkmlib/Portals.h deleted file mode 100644 index d1c9ec7cb..000000000 --- a/Accelerators/Vtkm/vtkmlib/Portals.h +++ /dev/null @@ -1,139 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#ifndef vtkmlib_Portals_h -#define vtkmlib_Portals_h - -#include "PortalTraits.h" -#include "vtkAcceleratorsVTKmModule.h" -#include "vtkmConfig.h" //required for general vtkm setup - -class vtkDataArray; -class vtkPoints; - -#include - -namespace tovtkm -{ - -template -class VTKM_ALWAYS_EXPORT vtkArrayPortal -{ - static const int NUM_COMPONENTS = vtkm::VecTraits::NUM_COMPONENTS; - -public: - typedef VTKDataArrayType_ VTKDataArrayType; - using ValueType = typename vtkPortalTraits::Type; - using ComponentType = typename vtkPortalTraits::ComponentType; - - VTKM_EXEC_CONT - vtkArrayPortal(); - - VTKM_CONT - vtkArrayPortal(VTKDataArrayType* array, vtkm::Id size); - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { return this->Size; } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - inline ValueType Get(vtkm::Id index) const; - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - inline void Set(vtkm::Id index, const ValueType& value) const; - - typedef vtkm::cont::internal::IteratorFromArrayPortal IteratorType; - - VTKM_CONT - IteratorType GetIteratorBegin() const { return IteratorType(*this, 0); } - - VTKM_CONT - IteratorType GetIteratorEnd() const { return IteratorType(*this, this->Size); } - - VTKM_CONT - VTKDataArrayType* GetVtkData() const { return this->VTKData; } - -private: - VTKDataArrayType* VTKData; - vtkm::Id Size; -}; - -template -class VTKM_ALWAYS_EXPORT vtkPointsPortal -{ - static const int NUM_COMPONENTS = vtkm::VecTraits::NUM_COMPONENTS; - -public: - using ValueType = typename vtkPortalTraits::Type; - using ComponentType = typename vtkPortalTraits::ComponentType; - - VTKM_EXEC_CONT - vtkPointsPortal(); - - VTKM_CONT - vtkPointsPortal(vtkPoints* points, vtkm::Id size); - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - vtkm::Id GetNumberOfValues() const { return this->Size; } - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - inline ValueType Get(vtkm::Id index) const; - - VTKM_SUPPRESS_EXEC_WARNINGS - VTKM_EXEC_CONT - inline void Set(vtkm::Id index, const ValueType& value) const; - - typedef vtkm::cont::internal::IteratorFromArrayPortal IteratorType; - - VTKM_CONT - IteratorType GetIteratorBegin() const { return IteratorType(*this, 0); } - - VTKM_CONT - IteratorType GetIteratorEnd() const { return IteratorType(*this, this->Size); } - - VTKM_CONT - vtkPoints* GetVtkData() const { return Points; } - -private: - vtkPoints* Points; - ComponentType* Array; - vtkm::Id Size; -}; -} - -#ifndef vtkmlib_Portals_cxx -#include -namespace tovtkm -{ -// T extern template instantiations -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT - vtkPointsPortal const>; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT - vtkPointsPortal const>; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT - vtkPointsPortal >; -extern template class VTKACCELERATORSVTKM_TEMPLATE_EXPORT - vtkPointsPortal >; -} - -#endif // defined vtkmlib_Portals_cxx - -#include "Portals.hxx" -#endif // vtkmlib_Portals_h diff --git a/Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.cxx b/Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.cxx deleted file mode 100644 index 593533797..000000000 --- a/Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.cxx +++ /dev/null @@ -1,122 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#include "UnstructuredGridConverter.h" - -#include "ArrayConverters.h" -#include "CellSetConverters.h" -#include "DataSetConverters.h" - -// datasets we support -#include "vtkCellArray.h" -#include "vtkCellData.h" -#include "vtkCellTypes.h" -#include "vtkDataObject.h" -#include "vtkDataObjectTypes.h" -#include "vtkDataSetAttributes.h" -#include "vtkImageData.h" -#include "vtkNew.h" -#include "vtkPointData.h" -#include "vtkPolyData.h" -#include "vtkStructuredGrid.h" -#include "vtkUniformGrid.h" -#include "vtkUnstructuredGrid.h" - -#include -#include -#include - -namespace tovtkm -{ - -//------------------------------------------------------------------------------ -// convert an unstructured grid type -vtkm::cont::DataSet Convert(vtkUnstructuredGrid* input, FieldsFlag fields) -{ - // This will need to use the custom storage and portals so that - // we can efficiently map between VTK and VTKm - vtkm::cont::DataSet dataset; - - // first step convert the points over to an array handle - vtkm::cont::CoordinateSystem coords = Convert(input->GetPoints()); - dataset.AddCoordinateSystem(coords); - // last - - // Use our custom explicit cell set to do the conversion - const vtkIdType numPoints = input->GetNumberOfPoints(); - if (input->IsHomogeneous()) - { - int cellType = input->GetCellType(0); // get the celltype - vtkm::cont::DynamicCellSet cells = ConvertSingleType(input->GetCells(), cellType, numPoints); - dataset.SetCellSet(cells); - } - else - { - vtkm::cont::DynamicCellSet cells = - Convert(input->GetCellTypesArray(), input->GetCells(), numPoints); - dataset.SetCellSet(cells); - } - - ProcessFields(input, dataset, fields); - - return dataset; -} - -} // namespace tovtkm - -namespace fromvtkm -{ - -//------------------------------------------------------------------------------ -bool Convert(const vtkm::cont::DataSet& voutput, vtkUnstructuredGrid* output, vtkDataSet* input) -{ - vtkPoints* points = fromvtkm::Convert(voutput.GetCoordinateSystem()); - // If this fails, it's likely a missing entry in tovtkm::PointListOutVTK: - if (!points) - { - return false; - } - output->SetPoints(points); - points->FastDelete(); - - // With unstructured grids we need to actually convert 3 arrays from - // vtkm to vtk - vtkNew cells; - vtkNew types; - vtkm::cont::DynamicCellSet outCells = voutput.GetCellSet(); - - const bool cellsConverted = fromvtkm::Convert(outCells, cells.GetPointer(), types.GetPointer()); - - if (!cellsConverted) - { - return false; - } - - output->SetCells(types.GetPointer(), cells.GetPointer()); - - // now have to set this info back to the unstructured grid - - // Next we need to convert any extra fields from vtkm over to vtk - const bool arraysConverted = fromvtkm::ConvertArrays(voutput, output); - - // Pass information about attributes. - PassAttributesInformation(input->GetPointData(), output->GetPointData()); - PassAttributesInformation(input->GetCellData(), output->GetCellData()); - - return arraysConverted; -} - -} // namespace fromvtkm diff --git a/Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.h b/Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.h deleted file mode 100644 index dbd82de74..000000000 --- a/Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.h +++ /dev/null @@ -1,44 +0,0 @@ -//============================================================================= -// -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -// -// Copyright 2012 Sandia Corporation. -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, -// the U.S. Government retains certain rights in this software. -// -//============================================================================= - -#ifndef vtkmlib_UnstructuredGridConverter_h -#define vtkmlib_UnstructuredGridConverter_h - -#include "vtkAcceleratorsVTKmModule.h" - -#include "ArrayConverters.h" // For FieldsFlag - -#include "vtkmConfig.h" //required for general vtkm setup - -#include - -class vtkUnstructuredGrid; -class vtkDataSet; - -namespace tovtkm -{ - -// convert an unstructured grid type -VTKACCELERATORSVTKM_EXPORT -vtkm::cont::DataSet Convert(vtkUnstructuredGrid* input, FieldsFlag fields = FieldsFlag::None); -} - -namespace fromvtkm -{ -VTKACCELERATORSVTKM_EXPORT -bool Convert(const vtkm::cont::DataSet& voutput, vtkUnstructuredGrid* output, vtkDataSet* input); -} -#endif // vtkmlib_UnstructuredGridConverter_h diff --git a/CMake/CTestCustom.cmake.in b/CMake/CTestCustom.cmake.in index 450d9e688..af39e24a9 100644 --- a/CMake/CTestCustom.cmake.in +++ b/CMake/CTestCustom.cmake.in @@ -1,3 +1,6 @@ +set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000) +set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000) + list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE # Issues in third party glut library VTK::RenderingExternalCxx-TestGLUTRenderWindow @@ -24,6 +27,12 @@ list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE # The key classes impacted are vtkPlotPoints and the # Draw calls in Context2D VTK::ChartsCoreCxx-TestLinePlotDouble + + # loguru looks like it leaks the thread name but apparently + # it eventually does free the memory. See + # https://github.com/emilk/loguru/issues/132 + # for some reason only this test seems to report it + VTK::FiltersParallelDIY2Cxx-TestRedistributeDataSetFilter ) list(APPEND CTEST_CUSTOM_WARNING_MATCH @@ -49,6 +58,10 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION # the main culprit here. "vcruntime_exception.h.*: note: see declaration of 'std::exception'" + # C4702 warning (unreachable code) caused by intentional abort() used + # in test which prevents the return statement from being called. + "TestLoggerDisableSignalHandler.*unreachable code" + # GetVersion is deprecated, but its use is OK. "sysinfoapi.h.*: note: see declaration of 'GetVersion'" @@ -74,21 +87,38 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "[Qq]t.*warning C4714" "[Qq]t.*note: see declaration of" + # Python notes triggered from MPI4Py Cython-generated code. + "include/python3.*: note:" + + # macOS warnings about dependencies htat are newer than the CI target + # version. + "ld: warning: dylib \\(/Applications/Xcode.*\\.app/Contents/Developer/Library/Frameworks/.*\\) was built for newer macOS version \\(.*\\) than being linked \\(.*\\)" + + # Warning notes from Xcode. + "/Applications/Xcode.*: note:" + # Ignore moc-generated code (and rcc and uic). "\\.dir[/\\\\][^/\\\\]*_autogen" - # Ignore diy2 warnings - "vtkdiy2" - # Intel compilers warn about large functions, but we don't usually care. "remark #11074: Inlining inhibited by limit (max-total-size|max-size)" # Ignore the suggestion line for more information too. "remark #11076: To get full report use" + + # clang-tidy ignores + "vtkParse.tab.c.*bugprone-sizeof-expression" + "vtkParse.tab.c.*bugprone-suspicious-include" + "mocs_compilation.cpp.*bugprone-suspicious-include" ) set(cdash_show_third_party_warnings "@VTK_ENABLE_CDASH_THIRD_PARTY_WARNINGS@") if (NOT cdash_show_third_party_warnings) list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION + # issue with exodus but exodus is not included in the note + # should these issues get fixed in exodus then remove this + # suppression + "note: '__builtin___snprintf_chk'" + # HDF5 lex/yacc sources compilation lacks the "ThirdParty" part of the path. "hl/src/H5LT(parse|analyze)" @@ -136,9 +166,15 @@ if (NOT cdash_show_third_party_warnings) # /source/Infovis/BoostGraphAlgorithms/Testing/Cxx/TestBoostAdapter.cxx:221:47: warning: '*((void*)(& ei)+32).__gnu_cxx::__normal_iterator >*, std::vector >, std::allocator > > > >::_M_current' may be used uninitialized in this function [-Wmaybe-uninitialized] "[Bb]oost[Gg]raph.*edge_property.*may be used uninitialized" + # Boost.Graph uses deprecated Boost headers internally. + "define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior" + # Warnings due to DIY "xmemory.*: warning C4996:.*Default Bounds constructor" + # vtkm uses deprecated TBB headers + "TBB Warning: tbb/task.h is deprecated" + # vtkm related warnings, someone working on vtkm shoudl fix these and once fixed # remove these suppressions "struct VTKM_DEPRECATED" @@ -156,10 +192,16 @@ if (NOT cdash_show_third_party_warnings) # if(NULL == (*full_name = (char *)H5MM_malloc(path1_len + path2_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */ "H5MM.*quiet GCC warning" + # Ignore diy2 warnings + "vtkdiy2" + # missing overrides may be suppressed, but the superclass shows up as a match on some systems # it makes no sense to suppress the offending class but report the superclass # vtkPolyDataAlgorithm.h:91:3: note: overridden virtual function is here "note: overridden virtual function is here" + + # Warnings from template instantiations. Remove once cmake/cmake!4766 is releasted. + "x(memory0|utility)\\([0-9]+\\): warning C4244" ) endif () diff --git a/CMake/CheckCXXSourceRuns.cmake b/CMake/CheckCXXSourceRuns.cmake deleted file mode 100644 index 7ffc40d40..000000000 --- a/CMake/CheckCXXSourceRuns.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# - Check if the source code provided in the SOURCE argument compiles. -# CHECK_CXX_SOURCE_COMPILES(SOURCE VAR) -# - macro which checks if the source code compiles\ -# SOURCE - source code to try to compile -# VAR - variable to store size if the type exists. -# -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link - -MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR COMMENT) - IF(NOT DEFINED "HAVE_${VAR}") - SET(MACRO_CHECK_FUNCTION_DEFINITIONS - "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") - IF(CMAKE_REQUIRED_LIBRARIES) - SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - ELSE() - SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES) - ENDIF() - IF(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES - "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") - ELSE() - SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES) - ENDIF() - SET(CMAKE_EMPTY_INPUT_FILE_CONTENT "${SOURCE}") - CONFIGURE_FILE("${vtk_cmake_dir}/CMakeEmptyInputFile.in" - "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx") - - MESSAGE(STATUS "Performing Test ${COMMENT}") - TRY_RUN(${VAR} HAVE_${VAR} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx - COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} - "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}" - "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}" - OUTPUT_VARIABLE OUTPUT) - IF(HAVE_${VAR}) - SET(${VAR} 1 CACHE INTERNAL "Test ${COMMENT}") - MESSAGE(STATUS "Performing Test ${COMMENT} - Success") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log - "Performing C++ SOURCE FILE Test ${COMMENT} succeeded with the following output:\n" - "${OUTPUT}\n" - "Source file was:\n${SOURCE}\n") - ELSE() - MESSAGE(STATUS "Performing Test ${COMMENT} - Failed") - SET(${VAR} "" CACHE INTERNAL "Test ${COMMENT}") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log - "Performing C++ SOURCE FILE Test ${COMMENT} failed with the following output:\n" - "${OUTPUT}\n" - "Source file was:\n${SOURCE}\n") - ENDIF() - ENDIF() -ENDMACRO() - - diff --git a/CMake/FindCGNS.cmake b/CMake/FindCGNS.cmake new file mode 100644 index 000000000..005f1afd9 --- /dev/null +++ b/CMake/FindCGNS.cmake @@ -0,0 +1,48 @@ +# +# Find the native CGNS includes and library +# +# CGNS_INCLUDE_DIR - where to find cgns.h, etc. +# CGNS_LIBRARIES - List of fully qualified libraries to link against when using CGNS. +# CGNS_FOUND - Do not attempt to use CGNS if "no" or undefined. + +find_path(CGNS_INCLUDE_DIR + NAMES + cgnslib.h + PATHS + /usr/local/include + /usr/include + DOC "CGNS include directory") +mark_as_advanced(CGNS_INCLUDE_DIR) + +find_library(CGNS_LIBRARY + NAMES + cgns + DOC "CGNS library") +mark_as_advanced(CGNS_LIBRARY) + +if (CGNS_INCLUDE_DIR) + file(STRINGS "${CGNS_INCLUDE_DIR}/cgnslib.h" version + REGEX "CGNS_DOTVERS") + string(REGEX REPLACE ".*CGNS_DOTVERS *\([0-9.]*\).*" "\\1" CGNS_VERSION "${version}") + unset(version) +else () + set(CGNS_VERSION CGNS_VERSION-NOTFOUND) +endif () + +# handle the QUIETLY and REQUIRED arguments and set CGNS_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(CGNS + REQUIRED_VARS CGNS_INCLUDE_DIR CGNS_LIBRARY + VERSION_VAR CGNS_VERSION) + +if (CGNS_FOUND) + set(CGNS_LIBRARIES "${CGNS_LIBRARY}") + set(CGNS_INCLUDE_DIRS "${CGNS_INCLUDE_DIR}") + if (NOT TARGET CGNS::CGNS) + add_library(CGNS::CGNS UNKNOWN IMPORTED) + set_target_properties(CGNS::CGNS PROPERTIES + IMPORTED_LOCATION "${CGNS_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CGNS_INCLUDE_DIR}") + endif () +endif () diff --git a/CMake/FindEXPAT.cmake b/CMake/FindEXPAT.cmake index 9d4c0801b..c0adc0ba0 100644 --- a/CMake/FindEXPAT.cmake +++ b/CMake/FindEXPAT.cmake @@ -2,7 +2,7 @@ # file Copyright.txt or https://cmake.org/licensing for details. # XXX: Copied from CMake, but includes vtkDetectLibraryType. -# See https://gitlab.kitware.com/cmake/cmake/issues/18564 +# See https://gitlab.kitware.com/cmake/cmake/-/issues/18564 #[=======================================================================[.rst: FindEXPAT diff --git a/CMake/FindExprTk.cmake b/CMake/FindExprTk.cmake new file mode 100644 index 000000000..b9a6f13a6 --- /dev/null +++ b/CMake/FindExprTk.cmake @@ -0,0 +1,43 @@ +# - Try to find ExprTk lib +# +# This module supports requiring a minimum version, e.g. you can do +# find_package(ExprTk 2.71828) +# to require version 2.71828 or newer of ExprTk. +# +# Once done this will define +# +# ExprTk_FOUND - system has eigen lib with correct version +# ExprTk_INCLUDE_DIRS - the eigen include directory +# ExprTk_VERSION - eigen version +# +# And the following imported target: +# +# ExprTk::ExprTk + +find_path(ExprTk_INCLUDE_DIR + NAMES exprtk.hpp + DOC "Path to ExprTk header") +mark_as_advanced(ExprTk_INCLUDE_DIR) + +if (ExprTk_INCLUDE_DIR) + file(STRINGS "${ExprTk_INCLUDE_DIR}/exprtk.hpp" _exprtk_version_header + REGEX "static const char\\* version") + string(REGEX MATCH "static const char\\* version = \"([0-9.]+)\"" _exprtk_version_match "${_exprtk_version_header}") + set(ExprTk_VERSION "${CMAKE_MATCH_1}") + unset(_exprtk_version_header) + unset(_exprtk_version_match) +endif () + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(ExprTk + REQUIRED_VARS ExprTk_INCLUDE_DIR + VERSION_VAR ExprTk_VERSION) + +if (ExprTk_FOUND) + set(ExprTk_INCLUDE_DIRS "${ExprTk_INCLUDE_DIR}") + if (NOT TARGET ExprTk::ExprTk) + add_library(ExprTk::ExprTk INTERFACE IMPORTED) + set_target_properties(ExprTk::ExprTk PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${ExprTk_INCLUDE_DIR}") + endif () +endif () diff --git a/CMake/FindFreetype.cmake b/CMake/FindFreetype.cmake index 7b3b80263..b4532735c 100644 --- a/CMake/FindFreetype.cmake +++ b/CMake/FindFreetype.cmake @@ -2,7 +2,7 @@ # file Copyright.txt or https://cmake.org/licensing for details. # XXX: Copied from CMake, but includes vtkDetectLibraryType. -# See https://gitlab.kitware.com/cmake/cmake/issues/18564 +# See https://gitlab.kitware.com/cmake/cmake/-/issues/18564 #[=======================================================================[.rst: FindFreetype diff --git a/CMake/FindLZMA.cmake b/CMake/FindLZMA.cmake index 0c8c7943c..0bdf4aa0f 100644 --- a/CMake/FindLZMA.cmake +++ b/CMake/FindLZMA.cmake @@ -2,7 +2,7 @@ find_path(LZMA_INCLUDE_DIR NAMES lzma.h DOC "lzma include directory") find_library(LZMA_LIBRARY - NAMES lzma + NAMES lzma liblzma DOC "lzma library") if (LZMA_INCLUDE_DIR) diff --git a/CMake/FindLibXml2.cmake b/CMake/FindLibXml2.cmake index 4b1b5cafd..c3e6cf850 100644 --- a/CMake/FindLibXml2.cmake +++ b/CMake/FindLibXml2.cmake @@ -2,7 +2,7 @@ # file Copyright.txt or https://cmake.org/licensing for details. # XXX: Copied from CMake, but includes vtkDetectLibraryType and the ICU dependency. -# See https://gitlab.kitware.com/cmake/cmake/issues/18564 +# See https://gitlab.kitware.com/cmake/cmake/-/issues/18564 #[=======================================================================[.rst: FindLibXml2 diff --git a/CMake/FindMEMKIND.cmake b/CMake/FindMEMKIND.cmake new file mode 100644 index 000000000..d1ec99435 --- /dev/null +++ b/CMake/FindMEMKIND.cmake @@ -0,0 +1,71 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindMEMKIND +--------- + +Find memkind's headers and library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``MEMKIND::MEMKIND`` + The memkind library, if found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``MEMKIND_INCLUDE_DIRS`` + where to find memkind.h, etc. +``MEMKIND_LIBRARIES`` + the libraries to link against to use memkind. +``MEMKIND_FOUND`` + true if the memkind headers and libraries were found. + +#]=======================================================================] +include(CMakeFindDependencyMacro) + +# Look for the header file. +find_path(MEMKIND_INCLUDE_DIR + NAMES memkind.h + DOC "memkind include directory") + +# Look for the library. +find_library(MEMKIND_LIBRARY + NAMES memkind libmemkind + DOC "memkind library") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(MEMKIND + REQUIRED_VARS MEMKIND_LIBRARY MEMKIND_INCLUDE_DIR) + +# Copy the results to the output variables and target. +if(MEMKIND_FOUND) + set(MEMKIND_LIBRARIES ${MEMKIND_LIBRARY}) + set(MEMKIND_INCLUDE_DIRS ${MEMKIND_INCLUDE_DIR}) + set(pkgconfigfile "${MEMKIND_INCLUDE_DIR}/../lib/pkgconfig/memkind.pc") + set(MEMKIND_VERSION_MINOR 0) + if(EXISTS "${pkgconfigfile}") + file(STRINGS "${pkgconfigfile}" MEMKIND_VERSION_LINE REGEX "Version: ") + string(SUBSTRING "${MEMKIND_VERSION_LINE}" 11 -1 MEMKIND_VERSION_STRING) # skip over "Version: ?.", I wouldn't expect >9 major versions + string(FIND "${MEMKIND_VERSION_STRING}" "." minorNumLen) + string(SUBSTRING "${MEMKIND_VERSION_STRING}" 0 ${minorNumLen} MEMKIND_VERSION_MINOR) + endif() + + if(NOT TARGET MEMKIND::MEMKIND) + add_library(MEMKIND::MEMKIND UNKNOWN IMPORTED) + set_target_properties(MEMKIND::MEMKIND PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${MEMKIND_LIBRARY}" + IMPORTED_IMPLIB "${MEMKIND_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${MEMKIND_INCLUDE_DIRS}" + MEMKIND_VERSION_MINOR "${MEMKIND_VERSION_MINOR}") + endif() +endif() + +mark_as_advanced(MEMKIND_INCLUDE_DIR MEMKIND_LIBRARY) diff --git a/CMake/FindNetCDF.cmake b/CMake/FindNetCDF.cmake index 4feff4959..194b1a0d3 100644 --- a/CMake/FindNetCDF.cmake +++ b/CMake/FindNetCDF.cmake @@ -6,8 +6,20 @@ Provides the following variables: * `NetCDF_LIBRARIES`: Libraries necessary to use NetCDF. * `NetCDF_VERSION`: The version of NetCDF found. * `NetCDF::NetCDF`: A target to use with `target_link_libraries`. + * `NetCDF_HAS_PARALLEL`: Whether or not NetCDF was found with parallel IO support. #]==] +function(FindNetCDF_get_is_parallel_aware include_dir) + file(STRINGS "${include_dir}/netcdf_meta.h" _netcdf_lines + REGEX "#define[ \t]+NC_HAS_PARALLEL[ \t]") + string(REGEX REPLACE ".*NC_HAS_PARALLEL[ \t]*([0-1]+).*" "\\1" _netcdf_has_parallel "${_netcdf_lines}") + if (_netcdf_has_parallel) + set(NetCDF_HAS_PARALLEL TRUE PARENT_SCOPE) + else() + set(NetCDF_HAS_PARALLEL FALSE PARENT_SCOPE) + endif() +endfunction() + # Try to find a CMake-built NetCDF. find_package(netCDF CONFIG QUIET) if (netCDF_FOUND) @@ -16,6 +28,12 @@ if (netCDF_FOUND) set(NetCDF_INCLUDE_DIRS "${netCDF_INCLUDE_DIR}") set(NetCDF_LIBRARIES "${netCDF_LIBRARIES}") set(NetCDF_VERSION "${NetCDFVersion}") + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(NetCDF + REQUIRED_VARS NetCDF_INCLUDE_DIRS NetCDF_LIBRARIES + VERSION_VAR NetCDF_VERSION) + if (NOT TARGET NetCDF::NetCDF) add_library(NetCDF::NetCDF INTERFACE IMPORTED) if (TARGET "netCDF::netcdf") @@ -30,6 +48,8 @@ if (netCDF_FOUND) INTERFACE_LINK_LIBRARIES "${netCDF_LIBRARIES}") endif () endif () + + FindNetCDF_get_is_parallel_aware("${NetCDF_INCLUDE_DIRS}") # Skip the rest of the logic in this file. return () endif () @@ -43,11 +63,24 @@ if (PkgConfig_FOUND) set(NetCDF_INCLUDE_DIRS "${_NetCDF_INCLUDE_DIRS}") set(NetCDF_LIBRARIES "${_NetCDF_LIBRARIES}") set(NetCDF_VERSION "${_NetCDF_VERSION}") + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(NetCDF + REQUIRED_VARS NetCDF_LIBRARIES + # This is not required because system-default include paths are not + # reported by `FindPkgConfig`, so this might be empty. Assume that if we + # have a library, the include directories are fine (if any) since + # PkgConfig reported that the package was found. + # NetCDF_INCLUDE_DIRS + VERSION_VAR NetCDF_VERSION) + if (NOT TARGET NetCDF::NetCDF) add_library(NetCDF::NetCDF INTERFACE IMPORTED) set_target_properties(NetCDF::NetCDF PROPERTIES INTERFACE_LINK_LIBRARIES "PkgConfig::_NetCDF") endif () + + FindNetCDF_get_is_parallel_aware("${_NetCDF_INCLUDEDIR}") # Skip the rest of the logic in this file. return () endif () @@ -76,6 +109,8 @@ if (NetCDF_INCLUDE_DIR) unset(_netcdf_version_patch) unset(_netcdf_version_note) unset(_netcdf_version_lines) + + FindNetCDF_get_is_parallel_aware("${NetCDF_INCLUDE_DIR}") endif () include(FindPackageHandleStandardArgs) diff --git a/CMake/FindODBC.cmake b/CMake/FindODBC.cmake index 6aba72724..438d958f0 100644 --- a/CMake/FindODBC.cmake +++ b/CMake/FindODBC.cmake @@ -9,7 +9,7 @@ Provides the following variables: # No .pc files are shipped with ODBC on Windows. set(_ODBC_use_pkgconfig 0) if (NOT WIN32) - find_package(PkgConfig) + find_package(PkgConfig QUIET) if (PkgConfig_FOUND) set(_ODBC_use_pkgconfig 1) endif () @@ -45,7 +45,7 @@ else () PATHS "C:/Program Files/ODBC" "C:/ODBC" - PATH_SUFFIXES include include/odbc + PATH_SUFFIXES include include/odbc libiodbc DOC "Location of sql.h") mark_as_advanced(ODBC_INCLUDE_DIR) find_library(ODBC_LIBRARY diff --git a/CMake/FindOGG.cmake b/CMake/FindOGG.cmake index 327d674ed..3121d17d4 100644 --- a/CMake/FindOGG.cmake +++ b/CMake/FindOGG.cmake @@ -14,7 +14,7 @@ include(FindPackageHandleStandardArgs) find_package_handle_standard_args(OGG REQUIRED_VARS OGG_LIBRARY OGG_INCLUDE_DIR) if (OGG_FOUND) - set(OGG_LIBRARIES "${OGG_LIBRRAY}") + set(OGG_LIBRARIES "${OGG_LIBRARY}") set(OGG_INCLUDE_DIRS "${OGG_INCLUDE_DIR}") if (NOT TARGET OGG::OGG) diff --git a/CMake/FindOpenMP.cmake b/CMake/FindOpenMP.cmake deleted file mode 100644 index c54eda5a8..000000000 --- a/CMake/FindOpenMP.cmake +++ /dev/null @@ -1,553 +0,0 @@ -##============================================================================= -## -## Copyright (c) Kitware, Inc. -## All rights reserved. -## See LICENSE.txt for details. -## -## This software is distributed WITHOUT ANY WARRANTY; without even -## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -## PURPOSE. See the above copyright notice for more information. -## -## Copyright 2018 National Technology & Engineering Solutions of Sandia, LLC (NTESS). -## Copyright 2018 UT-Battelle, LLC. -## Copyright 2018 Los Alamos National Security. -## -## Under the terms of Contract DE-NA0003525 with NTESS, -## the U.S. Government retains certain rights in this software. -## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National -## Laboratory (LANL), the U.S. Government retains certain rights in -## this software. -## -##============================================================================= - -#.rst: -# FindOpenMP -# ---------- -# -# Finds OpenMP support -# -# This module can be used to detect OpenMP support in a compiler. If -# the compiler supports OpenMP, the flags required to compile with -# OpenMP support are returned in variables for the different languages. -# The variables may be empty if the compiler does not need a special -# flag to support OpenMP. -# -# Variables -# ^^^^^^^^^ -# -# The module exposes the components ``C``, ``CXX``, and ``Fortran``. -# Each of these controls the various languages to search OpenMP support for. -# -# Depending on the enabled components the following variables will be set: -# -# ``OpenMP_FOUND`` -# Variable indicating that OpenMP flags for all requested languages have been found. -# If no components are specified, this is true if OpenMP settings for all enabled languages -# were detected. -# ``OpenMP_VERSION`` -# Minimal version of the OpenMP standard detected among the requested languages, -# or all enabled languages if no components were specified. -# -# This module will set the following variables per language in your -# project, where ```` is one of C, CXX, or Fortran: -# -# ``OpenMP__FOUND`` -# Variable indicating if OpenMP support for ```` was detected. -# ``OpenMP__FLAGS`` -# OpenMP compiler flags for ````, separated by spaces. -# -# For linking with OpenMP code written in ````, the following -# variables are provided: -# -# ``OpenMP__LIB_NAMES`` -# :ref:`;-list ` of libraries for OpenMP programs for ````. -# ``OpenMP__LIBRARY`` -# Location of the individual libraries needed for OpenMP support in ````. -# ``OpenMP__LIBRARIES`` -# A list of libraries needed to link with OpenMP code written in ````. -# -# Additionally, the module provides :prop_tgt:`IMPORTED` targets: -# -# ``OpenMP::OpenMP_`` -# Target for using OpenMP from ````. -# -# Specifically for Fortran, the module sets the following variables: -# -# ``OpenMP_Fortran_HAVE_OMPLIB_HEADER`` -# Boolean indicating if OpenMP is accessible through ``omp_lib.h``. -# ``OpenMP_Fortran_HAVE_OMPLIB_MODULE`` -# Boolean indicating if OpenMP is accessible through the ``omp_lib`` Fortran module. -# -# The module will also try to provide the OpenMP version variables: -# -# ``OpenMP__SPEC_DATE`` -# Date of the OpenMP specification implemented by the ```` compiler. -# ``OpenMP__VERSION_MAJOR`` -# Major version of OpenMP implemented by the ```` compiler. -# ``OpenMP__VERSION_MINOR`` -# Minor version of OpenMP implemented by the ```` compiler. -# ``OpenMP__VERSION`` -# OpenMP version implemented by the ```` compiler. -# -# The specification date is formatted as given in the OpenMP standard: -# ``yyyymm`` where ``yyyy`` and ``mm`` represents the year and month of -# the OpenMP specification implemented by the ```` compiler. - -cmake_minimum_required(VERSION 3.9) - -cmake_policy(PUSH) -cmake_policy(SET CMP0012 NEW) # if() recognizes numbers and booleans -cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced -cmake_policy(SET CMP0057 NEW) # if IN_LIST - -function(_OPENMP_FLAG_CANDIDATES LANG) - if(NOT OpenMP_${LANG}_FLAG) - unset(OpenMP_FLAG_CANDIDATES) - - set(OMP_FLAG_GNU "-fopenmp") - set(OMP_FLAG_Clang "-fopenmp=libomp" "-fopenmp=libiomp5" "-fopenmp") - set(OMP_FLAG_AppleClang "-Xclang -fopenmp") - set(OMP_FLAG_HP "+Oopenmp") - if(WIN32) - set(OMP_FLAG_Intel "-Qopenmp") - elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL "Intel" AND - "${CMAKE_${LANG}_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528") - set(OMP_FLAG_Intel "-openmp") - else() - set(OMP_FLAG_Intel "-qopenmp") - endif() - set(OMP_FLAG_MIPSpro "-mp") - set(OMP_FLAG_MSVC "-openmp") - set(OMP_FLAG_PathScale "-openmp") - set(OMP_FLAG_NAG "-openmp") - set(OMP_FLAG_Absoft "-openmp") - set(OMP_FLAG_PGI "-mp") - set(OMP_FLAG_Flang "-fopenmp") - set(OMP_FLAG_SunPro "-xopenmp") - set(OMP_FLAG_XL "-qsmp=omp") - # Cray compiler activate OpenMP with -h omp, which is enabled by default. - set(OMP_FLAG_Cray " " "-h omp") - - # If we know the correct flags, use those - if(DEFINED OMP_FLAG_${CMAKE_${LANG}_COMPILER_ID}) - set(OpenMP_FLAG_CANDIDATES "${OMP_FLAG_${CMAKE_${LANG}_COMPILER_ID}}") - # Fall back to reasonable default tries otherwise - else() - set(OpenMP_FLAG_CANDIDATES "-openmp" "-fopenmp" "-mp" " ") - endif() - set(OpenMP_${LANG}_FLAG_CANDIDATES "${OpenMP_FLAG_CANDIDATES}" PARENT_SCOPE) - else() - set(OpenMP_${LANG}_FLAG_CANDIDATES "${OpenMP_${LANG}_FLAG}" PARENT_SCOPE) - endif() -endfunction() - -# sample openmp source code to test -set(OpenMP_C_CXX_TEST_SOURCE -" -#include -int main() { -#ifdef _OPENMP - int n = omp_get_max_threads(); - return 0; -#else - breaks_on_purpose -#endif -} -") - -# in Fortran, an implementation may provide an omp_lib.h header -# or omp_lib module, or both (OpenMP standard, section 3.1) -# Furthmore !$ is the Fortran equivalent of #ifdef _OPENMP (OpenMP standard, 2.2.2) -# Without the conditional compilation, some compilers (e.g. PGI) might compile OpenMP code -# while not actually enabling OpenMP, building code sequentially -set(OpenMP_Fortran_TEST_SOURCE - " - program test - @OpenMP_Fortran_INCLUDE_LINE@ - !$ integer :: n - n = omp_get_num_threads() - end program test - " -) - -function(_OPENMP_WRITE_SOURCE_FILE LANG SRC_FILE_CONTENT_VAR SRC_FILE_NAME SRC_FILE_FULLPATH) - set(WORK_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindOpenMP) - if("${LANG}" STREQUAL "C") - set(SRC_FILE "${WORK_DIR}/${SRC_FILE_NAME}.c") - file(WRITE "${SRC_FILE}" "${OpenMP_C_CXX_${SRC_FILE_CONTENT_VAR}}") - elseif("${LANG}" STREQUAL "CXX") - set(SRC_FILE "${WORK_DIR}/${SRC_FILE_NAME}.cpp") - file(WRITE "${SRC_FILE}" "${OpenMP_C_CXX_${SRC_FILE_CONTENT_VAR}}") - elseif("${LANG}" STREQUAL "Fortran") - set(SRC_FILE "${WORK_DIR}/${SRC_FILE_NAME}.f90") - file(WRITE "${SRC_FILE}_in" "${OpenMP_Fortran_${SRC_FILE_CONTENT_VAR}}") - configure_file("${SRC_FILE}_in" "${SRC_FILE}" @ONLY) - endif() - set(${SRC_FILE_FULLPATH} "${SRC_FILE}" PARENT_SCOPE) -endfunction() - -include(CMakeParseImplicitLinkInfo) - -function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) - _OPENMP_FLAG_CANDIDATES("${LANG}") - _OPENMP_WRITE_SOURCE_FILE("${LANG}" "TEST_SOURCE" OpenMPTryFlag _OPENMP_TEST_SRC) - - unset(OpenMP_VERBOSE_COMPILE_OPTIONS) - separate_arguments(OpenMP_VERBOSE_OPTIONS NATIVE_COMMAND "${CMAKE_${LANG}_VERBOSE_FLAG}") - foreach(_VERBOSE_OPTION IN LISTS OpenMP_VERBOSE_OPTIONS) - if(NOT _VERBOSE_OPTION MATCHES "^-Wl,") - list(APPEND OpenMP_VERBOSE_COMPILE_OPTIONS ${_VERBOSE_OPTION}) - endif() - endforeach() - - foreach(OPENMP_FLAG IN LISTS OpenMP_${LANG}_FLAG_CANDIDATES) - set(OPENMP_FLAGS_TEST "${OPENMP_FLAG}") - if(OpenMP_VERBOSE_COMPILE_OPTIONS) - string(APPEND OPENMP_FLAGS_TEST " ${OpenMP_VERBOSE_COMPILE_OPTIONS}") - endif() - string(REGEX REPLACE "[-/=+]" "" OPENMP_PLAIN_FLAG "${OPENMP_FLAG}") - try_compile( OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG} ${CMAKE_BINARY_DIR} ${_OPENMP_TEST_SRC} - CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OPENMP_FLAGS_TEST}" - LINK_LIBRARIES ${CMAKE_${LANG}_VERBOSE_FLAG} - OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT - ) - - if(OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG}) - set("${OPENMP_FLAG_VAR}" "${OPENMP_FLAG}" PARENT_SCOPE) - - if(CMAKE_${LANG}_VERBOSE_FLAG) - unset(OpenMP_${LANG}_IMPLICIT_LIBRARIES) - unset(OpenMP_${LANG}_IMPLICIT_LINK_DIRS) - unset(OpenMP_${LANG}_IMPLICIT_FWK_DIRS) - unset(OpenMP_${LANG}_LOG_VAR) - - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Detecting ${LANG} OpenMP compiler ABI info compiled with the following output:\n${OpenMP_TRY_COMPILE_OUTPUT}\n\n") - - cmake_parse_implicit_link_info("${OpenMP_TRY_COMPILE_OUTPUT}" - OpenMP_${LANG}_IMPLICIT_LIBRARIES - OpenMP_${LANG}_IMPLICIT_LINK_DIRS - OpenMP_${LANG}_IMPLICIT_FWK_DIRS - OpenMP_${LANG}_LOG_VAR - "${CMAKE_${LANG}_IMPLICIT_OBJECT_REGEX}" - ) - - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Parsed ${LANG} OpenMP implicit link information from above output:\n${OpenMP_${LANG}_LOG_VAR}\n\n") - - unset(_OPENMP_LIB_NAMES) - foreach(_OPENMP_IMPLICIT_LIB IN LISTS OpenMP_${LANG}_IMPLICIT_LIBRARIES) - get_filename_component(_OPENMP_IMPLICIT_LIB_DIR "${_OPENMP_IMPLICIT_LIB}" DIRECTORY) - get_filename_component(_OPENMP_IMPLICIT_LIB_NAME "${_OPENMP_IMPLICIT_LIB}" NAME) - get_filename_component(_OPENMP_IMPLICIT_LIB_PLAIN "${_OPENMP_IMPLICIT_LIB}" NAME_WE) - string(REGEX REPLACE "([][+.*?()^$])" "\\\\\\1" _OPENMP_IMPLICIT_LIB_PLAIN_ESC "${_OPENMP_IMPLICIT_LIB_PLAIN}") - string(REGEX REPLACE "([][+.*?()^$])" "\\\\\\1" _OPENMP_IMPLICIT_LIB_PATH_ESC "${_OPENMP_IMPLICIT_LIB}") - if(NOT ( "${_OPENMP_IMPLICIT_LIB}" IN_LIST CMAKE_${LANG}_IMPLICIT_LINK_LIBRARIES - OR "${CMAKE_${LANG}_STANDARD_LIBRARIES}" MATCHES "(^| )(-Wl,)?(-l)?(${_OPENMP_IMPLICIT_LIB_PLAIN_ESC}|${_OPENMP_IMPLICIT_LIB_PATH_ESC})( |$)" - OR "${CMAKE_${LANG}_LINK_EXECUTABLE}" MATCHES "(^| )(-Wl,)?(-l)?(${_OPENMP_IMPLICIT_LIB_PLAIN_ESC}|${_OPENMP_IMPLICIT_LIB_PATH_ESC})( |$)" ) ) - if(_OPENMP_IMPLICIT_LIB_DIR) - set(OpenMP_${_OPENMP_IMPLICIT_LIB_PLAIN}_LIBRARY "${_OPENMP_IMPLICIT_LIB}" CACHE FILEPATH - "Path to the ${_OPENMP_IMPLICIT_LIB_PLAIN} library for OpenMP") - else() - find_library(OpenMP_${_OPENMP_IMPLICIT_LIB_PLAIN}_LIBRARY - NAMES "${_OPENMP_IMPLICIT_LIB_NAME}" - DOC "Path to the ${_OPENMP_IMPLICIT_LIB_PLAIN} library for OpenMP" - HINTS ${OpenMP_${LANG}_IMPLICIT_LINK_DIRS} - CMAKE_FIND_ROOT_PATH_BOTH - NO_DEFAULT_PATH - ) - endif() - mark_as_advanced(OpenMP_${_OPENMP_IMPLICIT_LIB_PLAIN}_LIBRARY) - list(APPEND _OPENMP_LIB_NAMES ${_OPENMP_IMPLICIT_LIB_PLAIN}) - endif() - endforeach() - set("${OPENMP_LIB_NAMES_VAR}" "${_OPENMP_LIB_NAMES}" PARENT_SCOPE) - else() - # We do not know how to extract implicit OpenMP libraries for this compiler. - # Assume that it handles them automatically, e.g. the Intel Compiler on - # Windows should put the dependency in its object files. - set("${OPENMP_LIB_NAMES_VAR}" "" PARENT_SCOPE) - endif() - break() - elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL "AppleClang" - AND CMAKE_${LANG}_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0") - - # Check for separate OpenMP library on AppleClang 7+ - find_library(OpenMP_libomp_LIBRARY - NAMES omp gomp iomp5 - HINTS ${CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES} - ) - mark_as_advanced(OpenMP_libomp_LIBRARY) - - if(OpenMP_libomp_LIBRARY) - try_compile( OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG} ${CMAKE_BINARY_DIR} ${_OPENMP_TEST_SRC} - CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OPENMP_FLAGS_TEST}" - LINK_LIBRARIES ${CMAKE_${LANG}_VERBOSE_FLAG} ${OpenMP_libomp_LIBRARY} - OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT - ) - if(OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG}) - set("${OPENMP_FLAG_VAR}" "${OPENMP_FLAG}" PARENT_SCOPE) - set("${OPENMP_LIB_NAMES_VAR}" "libomp" PARENT_SCOPE) - break() - endif() - endif() - endif() - set("${OPENMP_LIB_NAMES_VAR}" "NOTFOUND" PARENT_SCOPE) - set("${OPENMP_FLAG_VAR}" "NOTFOUND" PARENT_SCOPE) - endforeach() - - unset(OpenMP_VERBOSE_COMPILE_OPTIONS) -endfunction() - -set(OpenMP_C_CXX_CHECK_VERSION_SOURCE -" -#include -#include -const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', - 'P', '-', 'd', 'a', 't', 'e', '[', - ('0' + ((_OPENMP/100000)%10)), - ('0' + ((_OPENMP/10000)%10)), - ('0' + ((_OPENMP/1000)%10)), - ('0' + ((_OPENMP/100)%10)), - ('0' + ((_OPENMP/10)%10)), - ('0' + ((_OPENMP/1)%10)), - ']', '\\0' }; -int main() -{ - puts(ompver_str); - return 0; -} -") - -set(OpenMP_Fortran_CHECK_VERSION_SOURCE -" - program omp_ver - @OpenMP_Fortran_INCLUDE_LINE@ - integer, parameter :: zero = ichar('0') - integer, parameter :: ompv = openmp_version - character, dimension(24), parameter :: ompver_str =& - (/ 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', 'P', '-',& - 'd', 'a', 't', 'e', '[',& - char(zero + mod(ompv/100000, 10)),& - char(zero + mod(ompv/10000, 10)),& - char(zero + mod(ompv/1000, 10)),& - char(zero + mod(ompv/100, 10)),& - char(zero + mod(ompv/10, 10)),& - char(zero + mod(ompv/1, 10)), ']' /) - print *, ompver_str - end program omp_ver -") - -function(_OPENMP_GET_SPEC_DATE LANG SPEC_DATE) - _OPENMP_WRITE_SOURCE_FILE("${LANG}" "CHECK_VERSION_SOURCE" OpenMPCheckVersion _OPENMP_TEST_SRC) - - set(BIN_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindOpenMP/ompver_${LANG}.bin") - string(REGEX REPLACE "[-/=+]" "" OPENMP_PLAIN_FLAG "${OPENMP_FLAG}") - try_compile(OpenMP_SPECTEST_${LANG}_${OPENMP_PLAIN_FLAG} "${CMAKE_BINARY_DIR}" "${_OPENMP_TEST_SRC}" - CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OpenMP_${LANG}_FLAGS}" - COPY_FILE ${BIN_FILE}) - - if(${OpenMP_SPECTEST_${LANG}_${OPENMP_PLAIN_FLAG}}) - file(STRINGS ${BIN_FILE} specstr LIMIT_COUNT 1 REGEX "INFO:OpenMP-date") - set(regex_spec_date ".*INFO:OpenMP-date\\[0*([^]]*)\\].*") - if("${specstr}" MATCHES "${regex_spec_date}") - set(${SPEC_DATE} "${CMAKE_MATCH_1}" PARENT_SCOPE) - endif() - endif() -endfunction() - -macro(_OPENMP_SET_VERSION_BY_SPEC_DATE LANG) - set(OpenMP_SPEC_DATE_MAP - # Preview versions - "201611=5.0" # OpenMP 5.0 preview 1 - # Combined versions, 2.5 onwards - "201511=4.5" - "201307=4.0" - "201107=3.1" - "200805=3.0" - "200505=2.5" - # C/C++ version 2.0 - "200203=2.0" - # Fortran version 2.0 - "200011=2.0" - # Fortran version 1.1 - "199911=1.1" - # C/C++ version 1.0 (there's no 1.1 for C/C++) - "199810=1.0" - # Fortran version 1.0 - "199710=1.0" - ) - - if(OpenMP_${LANG}_SPEC_DATE) - string(REGEX MATCHALL "${OpenMP_${LANG}_SPEC_DATE}=([0-9]+)\\.([0-9]+)" _version_match "${OpenMP_SPEC_DATE_MAP}") - else() - set(_version_match "") - endif() - if(NOT _version_match STREQUAL "") - set(OpenMP_${LANG}_VERSION_MAJOR ${CMAKE_MATCH_1}) - set(OpenMP_${LANG}_VERSION_MINOR ${CMAKE_MATCH_2}) - set(OpenMP_${LANG}_VERSION "${OpenMP_${LANG}_VERSION_MAJOR}.${OpenMP_${LANG}_VERSION_MINOR}") - else() - unset(OpenMP_${LANG}_VERSION_MAJOR) - unset(OpenMP_${LANG}_VERSION_MINOR) - unset(OpenMP_${LANG}_VERSION) - endif() - unset(_version_match) - unset(OpenMP_SPEC_DATE_MAP) -endmacro() - -foreach(LANG IN ITEMS C CXX) - if(CMAKE_${LANG}_COMPILER_LOADED) - if(NOT DEFINED OpenMP_${LANG}_FLAGS OR "${OpenMP_${LANG}_FLAGS}" STREQUAL "NOTFOUND" - OR NOT DEFINED OpenMP_${LANG}_LIB_NAMES OR "${OpenMP_${LANG}_LIB_NAMES}" STREQUAL "NOTFOUND") - _OPENMP_GET_FLAGS("${LANG}" "${LANG}" OpenMP_${LANG}_FLAGS_WORK OpenMP_${LANG}_LIB_NAMES_WORK) - endif() - - set(OpenMP_${LANG}_FLAGS "${OpenMP_${LANG}_FLAGS_WORK}" - CACHE STRING "${LANG} compiler flags for OpenMP parallelization") - set(OpenMP_${LANG}_LIB_NAMES "${OpenMP_${LANG}_LIB_NAMES_WORK}" - CACHE STRING "${LANG} compiler libraries for OpenMP parallelization") - mark_as_advanced(OpenMP_${LANG}_FLAGS OpenMP_${LANG}_LIB_NAMES) - endif() -endforeach() - -if(CMAKE_Fortran_COMPILER_LOADED) - if(NOT DEFINED OpenMP_Fortran_FLAGS OR "${OpenMP_Fortran_FLAGS}" STREQUAL "NOTFOUND" - OR NOT DEFINED OpenMP_Fortran_LIB_NAMES OR "${OpenMP_Fortran_LIB_NAMES}" STREQUAL "NOTFOUND" - OR NOT DEFINED OpenMP_Fortran_HAVE_OMPLIB_MODULE) - set(OpenMP_Fortran_INCLUDE_LINE "use omp_lib\n implicit none") - _OPENMP_GET_FLAGS("Fortran" "FortranHeader" OpenMP_Fortran_FLAGS_WORK OpenMP_Fortran_LIB_NAMES_WORK) - if(OpenMP_Fortran_FLAGS_WORK) - set(OpenMP_Fortran_HAVE_OMPLIB_MODULE TRUE CACHE BOOL INTERNAL "") - endif() - - set(OpenMP_Fortran_FLAGS "${OpenMP_Fortran_FLAGS_WORK}" - CACHE STRING "Fortran compiler flags for OpenMP parallelization") - set(OpenMP_Fortran_LIB_NAMES "${OpenMP_Fortran_LIB_NAMES_WORK}" - CACHE STRING "Fortran compiler libraries for OpenMP parallelization") - mark_as_advanced(OpenMP_Fortran_FLAGS OpenMP_Fortran_LIB_NAMES) - endif() - - if(NOT DEFINED OpenMP_Fortran_FLAGS OR "${OpenMP_Fortran_FLAGS}" STREQUAL "NOTFOUND" - OR NOT DEFINED OpenMP_Fortran_LIB_NAMES OR "${OpenMP_Fortran_LIB_NAMES}" STREQUAL "NOTFOUND" - OR NOT DEFINED OpenMP_Fortran_HAVE_OMPLIB_HEADER) - set(OpenMP_Fortran_INCLUDE_LINE "implicit none\n include 'omp_lib.h'") - _OPENMP_GET_FLAGS("Fortran" "FortranModule" OpenMP_Fortran_FLAGS_WORK OpenMP_Fortran_LIB_NAMES_WORK) - if(OpenMP_Fortran_FLAGS_WORK) - set(OpenMP_Fortran_HAVE_OMPLIB_HEADER TRUE CACHE BOOL INTERNAL "") - endif() - - set(OpenMP_Fortran_FLAGS "${OpenMP_Fortran_FLAGS_WORK}" - CACHE STRING "Fortran compiler flags for OpenMP parallelization") - - set(OpenMP_Fortran_LIB_NAMES "${OpenMP_Fortran_LIB_NAMES}" - CACHE STRING "Fortran compiler libraries for OpenMP parallelization") - endif() - - if(OpenMP_Fortran_HAVE_OMPLIB_MODULE) - set(OpenMP_Fortran_INCLUDE_LINE "use omp_lib\n implicit none") - else() - set(OpenMP_Fortran_INCLUDE_LINE "implicit none\n include 'omp_lib.h'") - endif() -endif() - -if(NOT OpenMP_FIND_COMPONENTS) - set(OpenMP_FINDLIST C CXX Fortran) -else() - set(OpenMP_FINDLIST ${OpenMP_FIND_COMPONENTS}) -endif() - -unset(_OpenMP_MIN_VERSION) - -include(FindPackageHandleStandardArgs) - -foreach(LANG IN LISTS OpenMP_FINDLIST) - if(CMAKE_${LANG}_COMPILER_LOADED) - if (NOT OpenMP_${LANG}_SPEC_DATE AND OpenMP_${LANG}_FLAGS) - _OPENMP_GET_SPEC_DATE("${LANG}" OpenMP_${LANG}_SPEC_DATE_INTERNAL) - set(OpenMP_${LANG}_SPEC_DATE "${OpenMP_${LANG}_SPEC_DATE_INTERNAL}" CACHE - INTERNAL "${LANG} compiler's OpenMP specification date") - _OPENMP_SET_VERSION_BY_SPEC_DATE("${LANG}") - endif() - - set(OpenMP_${LANG}_FIND_QUIETLY ${OpenMP_FIND_QUIETLY}) - set(OpenMP_${LANG}_FIND_REQUIRED ${OpenMP_FIND_REQUIRED}) - set(OpenMP_${LANG}_FIND_VERSION ${OpenMP_FIND_VERSION}) - set(OpenMP_${LANG}_FIND_VERSION_EXACT ${OpenMP_FIND_VERSION_EXACT}) - - set(_OPENMP_${LANG}_REQUIRED_VARS OpenMP_${LANG}_FLAGS) - if("${OpenMP_${LANG}_LIB_NAMES}" STREQUAL "NOTFOUND") - set(_OPENMP_${LANG}_REQUIRED_LIB_VARS OpenMP_${LANG}_LIB_NAMES) - else() - foreach(_OPENMP_IMPLICIT_LIB IN LISTS OpenMP_${LANG}_LIB_NAMES) - list(APPEND _OPENMP_${LANG}_REQUIRED_LIB_VARS OpenMP_${_OPENMP_IMPLICIT_LIB}_LIBRARY) - endforeach() - endif() - - find_package_handle_standard_args(OpenMP_${LANG} - REQUIRED_VARS OpenMP_${LANG}_FLAGS ${_OPENMP_${LANG}_REQUIRED_LIB_VARS} - VERSION_VAR OpenMP_${LANG}_VERSION - ) - - if(OpenMP_${LANG}_FOUND) - if(DEFINED OpenMP_${LANG}_VERSION) - if(NOT _OpenMP_MIN_VERSION OR _OpenMP_MIN_VERSION VERSION_GREATER OpenMP_${LANG}_VERSION) - set(_OpenMP_MIN_VERSION OpenMP_${LANG}_VERSION) - endif() - endif() - set(OpenMP_${LANG}_LIBRARIES "") - foreach(_OPENMP_IMPLICIT_LIB IN LISTS OpenMP_${LANG}_LIB_NAMES) - list(APPEND OpenMP_${LANG}_LIBRARIES "${OpenMP_${_OPENMP_IMPLICIT_LIB}_LIBRARY}") - endforeach() - - if(NOT TARGET OpenMP::OpenMP_${LANG}) - add_library(OpenMP::OpenMP_${LANG} INTERFACE IMPORTED) - endif() - if(OpenMP_${LANG}_FLAGS) - separate_arguments(_OpenMP_${LANG}_OPTIONS NATIVE_COMMAND "${OpenMP_${LANG}_FLAGS}") - set_property(TARGET OpenMP::OpenMP_${LANG} PROPERTY - INTERFACE_COMPILE_OPTIONS "$<$:${_OpenMP_${LANG}_OPTIONS}>") - unset(_OpenMP_${LANG}_OPTIONS) - endif() - if(OpenMP_${LANG}_LIBRARIES) - set_property(TARGET OpenMP::OpenMP_${LANG} PROPERTY - INTERFACE_LINK_LIBRARIES "${OpenMP_${LANG}_LIBRARIES}") - endif() - endif() - endif() -endforeach() - -unset(_OpenMP_REQ_VARS) -foreach(LANG IN ITEMS C CXX Fortran) - if((NOT OpenMP_FIND_COMPONENTS AND CMAKE_${LANG}_COMPILER_LOADED) OR LANG IN_LIST OpenMP_FIND_COMPONENTS) - list(APPEND _OpenMP_REQ_VARS "OpenMP_${LANG}_FOUND") - endif() -endforeach() - -find_package_handle_standard_args(OpenMP - REQUIRED_VARS ${_OpenMP_REQ_VARS} - VERSION_VAR ${_OpenMP_MIN_VERSION} - HANDLE_COMPONENTS) - -set(OPENMP_FOUND ${OpenMP_FOUND}) - -if(CMAKE_Fortran_COMPILER_LOADED AND OpenMP_Fortran_FOUND) - if(NOT DEFINED OpenMP_Fortran_HAVE_OMPLIB_MODULE) - set(OpenMP_Fortran_HAVE_OMPLIB_MODULE FALSE CACHE BOOL INTERNAL "") - endif() - if(NOT DEFINED OpenMP_Fortran_HAVE_OMPLIB_HEADER) - set(OpenMP_Fortran_HAVE_OMPLIB_HEADER FALSE CACHE BOOL INTERNAL "") - endif() -endif() - -if(NOT ( CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED )) - message(SEND_ERROR "FindOpenMP requires the C, CXX or Fortran languages to be enabled") -endif() - -unset(OpenMP_C_CXX_TEST_SOURCE) -unset(OpenMP_Fortran_TEST_SOURCE) -unset(OpenMP_C_CXX_CHECK_VERSION_SOURCE) -unset(OpenMP_Fortran_CHECK_VERSION_SOURCE) -unset(OpenMP_Fortran_INCLUDE_LINE) - -cmake_policy(POP) diff --git a/CMake/FindOpenSlide.cmake b/CMake/FindOpenSlide.cmake index 85b0c67d1..13e4bbb9a 100644 --- a/CMake/FindOpenSlide.cmake +++ b/CMake/FindOpenSlide.cmake @@ -14,25 +14,27 @@ find_path(OPENSLIDE_INCLUDE_DIR openslide/openslide.h PATHS /usr/local/include - /usr/include) - -mark_as_advanced( OPENSLIDE_INCLUDE_DIR ) + /usr/include + DOC "OpenSlide include directory") +mark_as_advanced(OPENSLIDE_INCLUDE_DIR) # Look for the library. -find_library( OPENSLIDE_LIBRARY NAMES openslide ) -mark_as_advanced( OPENSLIDE_LIBRARY ) - -# Handle the QUIETLY and REQUIRED arguments and set OPENSLIDE_FOUND true if all -# the listed variables are TRUE. +find_library(OPENSLIDE_LIBRARY + NAMES openslide + DOC "OpenSlide library") +mark_as_advanced(OPENSLIDE_LIBRARY) -find_package( PackageHandleStandardArgs ) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSlide DEFAULT_MSG OPENSLIDE_LIBRARY OPENSLIDE_INCLUDE_DIR ) +find_package(PackageHandleStandardArgs) +find_package_handle_standard_args(OpenSlide + REQUIRED_VARS OPENSLIDE_LIBRARY OPENSLIDE_INCLUDE_DIR) -if( OPENSLIDE_FOUND ) - set( OPENSLIDE_LIBRARIES ${OPENSLIDE_LIBRARY} ) - set( OPENSLIDE_INCLUDE_DIRS ${OPENSLIDE_INCLUDE_DIR} ) - add_library(OpenSlide::OpenSlide UNKNOWN IMPORTED) - set_target_properties(OpenSlide::OpenSlide PROPERTIES - IMPORTED_LOCATION "${OPENSLIDE_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${OPENSLIDE_INCLUDE_DIR}") -endif() +if (OPENSLIDE_FOUND) + set(OPENSLIDE_LIBRARIES "${OPENSLIDE_LIBRARY}") + set(OPENSLIDE_INCLUDE_DIRS "${OPENSLIDE_INCLUDE_DIR}") + if (NOT TARGET OpenSlide::OpenSlide) + add_library(OpenSlide::OpenSlide UNKNOWN IMPORTED) + set_target_properties(OpenSlide::OpenSlide PROPERTIES + IMPORTED_LOCATION "${OPENSLIDE_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${OPENSLIDE_INCLUDE_DIR}") + endif () +endif () diff --git a/CMake/FindOpenVR.cmake b/CMake/FindOpenVR.cmake index 7ff4ce624..a8e452ce1 100644 --- a/CMake/FindOpenVR.cmake +++ b/CMake/FindOpenVR.cmake @@ -24,8 +24,9 @@ endif () find_path(OpenVR_INCLUDE_DIR NAMES - openvr_driver.h + openvr.h PATH_SUFFIXES + openvr headers public/headers steam @@ -34,7 +35,7 @@ find_path(OpenVR_INCLUDE_DIR mark_as_advanced(OpenVR_INCLUDE_DIR) find_library(OpenVR_LIBRARY - NAMES openvr_api + NAMES openvr_api64 openvr_api PATH_SUFFIXES "${OpenVR_PLATFORM}" "bin/${OpenVR_PLATFORM}" diff --git a/CMake/FindSDL2.cmake b/CMake/FindSDL2.cmake new file mode 100644 index 000000000..eda3829d1 --- /dev/null +++ b/CMake/FindSDL2.cmake @@ -0,0 +1,31 @@ +#[==[ +Provides the following variables: + + * `SDL2_FOUND`: Whether SDL2 was found or not. + * `SDL2::SDL2`: A target to use with `target_link_libraries`. +#]==] + +if (EMSCRIPTEN) + # Create imported target SDL2::SDL2 + if (NOT TARGET SDL2::SDL2) + add_library(SDL2::SDL2 INTERFACE IMPORTED) + set_target_properties(SDL2::SDL2 PROPERTIES + INTERFACE_COMPILE_OPTIONS "SHELL:-s USE_SDL=2" + INTERFACE_LINK_OPTIONS "SHELL:-s USE_SDL=2" + ) + endif() + set(SDL2_FOUND TRUE) + return() +endif() + +set(_FindSDL2_args) +if (SDL2_FIND_PACKAGE_QUIETLY) + list(APPEND _FindSDL2_args QUIET) +endif () +if (SDL2_FIND_PACKAGE_REQUIRED) + list(APPEND _FindSDL2_args REQUIRED) +endif () + +# More argument forwarding if `find_package(SDL2)` supports components (mixer, ttf, etc.). +find_package(SDL2 CONFIG ${_FindSDL2_args}) +unset(_FindSDL2_args) diff --git a/CMake/FindTBB.cmake b/CMake/FindTBB.cmake index 27576a5cc..bd7563131 100644 --- a/CMake/FindTBB.cmake +++ b/CMake/FindTBB.cmake @@ -68,6 +68,32 @@ # FindTBB helper functions and macros # +# Use TBBConfig.cmake if possible. + +set(_tbb_find_quiet) +if (TBB_FIND_QUIETLY) + set(_tbb_find_quiet QUIET) +endif () +set(_tbb_find_components) +set(_tbb_find_optional_components) +foreach (_tbb_find_component IN LISTS TBB_FIND_COMPONENTS) + if (TBB_FIND_REQUIRED_${_tbb_find_component}) + list(APPEND _tbb_find_components "${_tbb_find_component}") + else () + list(APPEND _tbb_find_optional_components "${_tbb_find_component}") + endif () +endforeach () +unset(_tbb_find_component) +find_package(TBB CONFIG ${_tbb_find_quiet} + COMPONENTS ${_tbb_find_components} + OPTIONAL_COMPONENTS ${_tbb_find_optional_components}) +unset(_tbb_find_quiet) +unset(_tbb_find_components) +unset(_tbb_find_optional_components) +if (TBB_FOUND) + return () +endif () + #==================================================== # Fix the library path in case it is a linker script #==================================================== @@ -398,12 +424,18 @@ findpkg_finish(TBB_MALLOC_PROXY tbbmalloc_proxy) #============================================================================= #parse all the version numbers from tbb if(NOT TBB_VERSION) - - #only read the start of the file - file(STRINGS + if (EXISTS "${TBB_INCLUDE_DIR}/oneapi/tbb/version.h") + file(STRINGS + "${TBB_INCLUDE_DIR}/oneapi/tbb/version.h" + TBB_VERSION_CONTENTS + REGEX "VERSION") + else() + #only read the start of the file + file(STRINGS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" TBB_VERSION_CONTENTS REGEX "VERSION") + endif() string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" diff --git a/CMake/NewCMake/CMakeParseArguments.cmake b/CMake/NewCMake/CMakeParseArguments.cmake deleted file mode 100644 index fc64ab9a2..000000000 --- a/CMake/NewCMake/CMakeParseArguments.cmake +++ /dev/null @@ -1,21 +0,0 @@ -#.rst: -# CMakeParseArguments -# ------------------- -# -# This module once implemented the :command:`cmake_parse_arguments` command -# that is now implemented natively by CMake. It is now an empty placeholder -# for compatibility with projects that include it to get the command from -# CMake 3.4 and lower. - -#============================================================================= -# Copyright 2010 Alexander Neundorf -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) diff --git a/CMake/NewCMake/FindPackageHandleStandardArgs.cmake b/CMake/NewCMake/FindPackageHandleStandardArgs.cmake deleted file mode 100644 index f39a605c1..000000000 --- a/CMake/NewCMake/FindPackageHandleStandardArgs.cmake +++ /dev/null @@ -1,395 +0,0 @@ -#.rst: -# FindPackageHandleStandardArgs -# ----------------------------- -# -# This module provides a function intended to be used in :ref:`Find Modules` -# implementing :command:`find_package()` calls. It handles the -# ``REQUIRED``, ``QUIET`` and version-related arguments of ``find_package``. -# It also sets the ``_FOUND`` variable. The package is -# considered found if all variables listed contain valid results, e.g. -# valid filepaths. -# -# .. command:: find_package_handle_standard_args -# -# There are two signatures:: -# -# find_package_handle_standard_args( -# (DEFAULT_MSG|) -# ... -# ) -# -# find_package_handle_standard_args( -# [FOUND_VAR ] -# [REQUIRED_VARS ...] -# [VERSION_VAR ] -# [HANDLE_COMPONENTS] -# [CONFIG_MODE] -# [FAIL_MESSAGE ] -# ) -# -# The ``_FOUND`` variable will be set to ``TRUE`` if all -# the variables ``...`` are valid and any optional -# constraints are satisfied, and ``FALSE`` otherwise. A success or -# failure message may be displayed based on the results and on -# whether the ``REQUIRED`` and/or ``QUIET`` option was given to -# the :command:`find_package` call. -# -# The options are: -# -# ``(DEFAULT_MSG|)`` -# In the simple signature this specifies the failure message. -# Use ``DEFAULT_MSG`` to ask for a default message to be computed -# (recommended). Not valid in the full signature. -# -# ``FOUND_VAR `` -# Obsolete. Specifies either ``_FOUND`` or -# ``_FOUND`` as the result variable. This exists only -# for compatibility with older versions of CMake and is now ignored. -# Result variables of both names are always set for compatibility. -# -# ``REQUIRED_VARS ...`` -# Specify the variables which are required for this package. -# These may be named in the generated failure message asking the -# user to set the missing variable values. Therefore these should -# typically be cache entries such as ``FOO_LIBRARY`` and not output -# variables like ``FOO_LIBRARIES``. -# -# ``VERSION_VAR `` -# Specify the name of a variable that holds the version of the package -# that has been found. This version will be checked against the -# (potentially) specified required version given to the -# :command:`find_package` call, including its ``EXACT`` option. -# The default messages include information about the required -# version and the version which has been actually found, both -# if the version is ok or not. -# -# ``HANDLE_COMPONENTS`` -# Enable handling of package components. In this case, the command -# will report which components have been found and which are missing, -# and the ``_FOUND`` variable will be set to ``FALSE`` -# if any of the required components (i.e. not the ones listed after -# the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are -# missing. -# -# ``CONFIG_MODE`` -# Specify that the calling find module is a wrapper around a -# call to ``find_package( NO_MODULE)``. This implies -# a ``VERSION_VAR`` value of ``_VERSION``. The command -# will automatically check whether the package configuration file -# was found. -# -# ``FAIL_MESSAGE `` -# Specify a custom failure message instead of using the default -# generated message. Not recommended. -# -# Example for the simple signature: -# -# .. code-block:: cmake -# -# find_package_handle_standard_args(LibXml2 DEFAULT_MSG -# LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) -# -# The ``LibXml2`` package is considered to be found if both -# ``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid. -# Then also ``LibXml2_FOUND`` is set to ``TRUE``. If it is not found -# and ``REQUIRED`` was used, it fails with a -# :command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was -# used or not. If it is found, success will be reported, including -# the content of the first ````. On repeated CMake runs, -# the same message will not be printed again. -# -# Example for the full signature: -# -# .. code-block:: cmake -# -# find_package_handle_standard_args(LibArchive -# REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR -# VERSION_VAR LibArchive_VERSION) -# -# In this case, the ``LibArchive`` package is considered to be found if -# both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid. -# Also the version of ``LibArchive`` will be checked by using the version -# contained in ``LibArchive_VERSION``. Since no ``FAIL_MESSAGE`` is given, -# the default messages will be printed. -# -# Another example for the full signature: -# -# .. code-block:: cmake -# -# find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) -# find_package_handle_standard_args(Automoc4 CONFIG_MODE) -# -# In this case, a ``FindAutmoc4.cmake`` module wraps a call to -# ``find_package(Automoc4 NO_MODULE)`` and adds an additional search -# directory for ``automoc4``. Then the call to -# ``find_package_handle_standard_args`` produces a proper success/failure -# message. -# -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - -# internal helper macro -macro(_FPHSA_FAILURE_MESSAGE _msg) - if (${_NAME}_FIND_REQUIRED) - message(FATAL_ERROR "${_msg}") - else () - if (NOT ${_NAME}_FIND_QUIETLY) - message(STATUS "${_msg}") - endif () - endif () -endmacro() - - -# internal helper macro to generate the failure message when used in CONFIG_MODE: -macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) - # _CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found: - if(${_NAME}_CONFIG) - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})") - else() - # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version. - # List them all in the error message: - if(${_NAME}_CONSIDERED_CONFIGS) - set(configsText "") - list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount) - math(EXPR configsCount "${configsCount} - 1") - foreach(currentConfigIndex RANGE ${configsCount}) - list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename) - list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version) - set(configsText "${configsText} ${filename} (version ${version})\n") - endforeach() - if (${_NAME}_NOT_FOUND_MESSAGE) - set(configsText "${configsText} Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n") - endif() - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}") - - else() - # Simple case: No Config-file was found at all: - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}") - endif() - endif() -endmacro() - - -function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) - -# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in -# new extended or in the "old" mode: - set(options CONFIG_MODE HANDLE_COMPONENTS) - set(oneValueArgs FAIL_MESSAGE VERSION_VAR FOUND_VAR) - set(multiValueArgs REQUIRED_VARS) - set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} ) - list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX) - - if(${INDEX} EQUAL -1) - set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG}) - set(FPHSA_REQUIRED_VARS ${ARGN}) - set(FPHSA_VERSION_VAR) - else() - - CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN}) - - if(FPHSA_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"") - endif() - - if(NOT FPHSA_FAIL_MESSAGE) - set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG") - endif() - endif() - -# now that we collected all arguments, process them - - if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG") - set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") - endif() - - # In config-mode, we rely on the variable _CONFIG, which is set by find_package() - # when it successfully found the config-file, including version checking: - if(FPHSA_CONFIG_MODE) - list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG) - list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS) - set(FPHSA_VERSION_VAR ${_NAME}_VERSION) - endif() - - if(NOT FPHSA_REQUIRED_VARS) - message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()") - endif() - - list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR) - - string(TOUPPER ${_NAME} _NAME_UPPER) - string(TOLOWER ${_NAME} _NAME_LOWER) - - if(FPHSA_FOUND_VAR) - if(FPHSA_FOUND_VAR MATCHES "^${_NAME}_FOUND$" OR FPHSA_FOUND_VAR MATCHES "^${_NAME_UPPER}_FOUND$") - set(_FOUND_VAR ${FPHSA_FOUND_VAR}) - else() - message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_NAME}_FOUND\" and \"${_NAME_UPPER}_FOUND\" are valid names.") - endif() - else() - set(_FOUND_VAR ${_NAME_UPPER}_FOUND) - endif() - - # collect all variables which were not found, so they can be printed, so the - # user knows better what went wrong (#6375) - set(MISSING_VARS "") - set(DETAILS "") - # check if all passed variables are valid - set(FPHSA_FOUND_${_NAME} TRUE) - foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) - if(NOT ${_CURRENT_VAR}) - set(FPHSA_FOUND_${_NAME} FALSE) - set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}") - else() - set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]") - endif() - endforeach() - if(FPHSA_FOUND_${_NAME}) - set(${_NAME}_FOUND TRUE) - set(${_NAME_UPPER}_FOUND TRUE) - else() - set(${_NAME}_FOUND FALSE) - set(${_NAME_UPPER}_FOUND FALSE) - endif() - - # component handling - unset(FOUND_COMPONENTS_MSG) - unset(MISSING_COMPONENTS_MSG) - - if(FPHSA_HANDLE_COMPONENTS) - foreach(comp ${${_NAME}_FIND_COMPONENTS}) - if(${_NAME}_${comp}_FOUND) - - if(NOT DEFINED FOUND_COMPONENTS_MSG) - set(FOUND_COMPONENTS_MSG "found components: ") - endif() - set(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}") - - else() - - if(NOT DEFINED MISSING_COMPONENTS_MSG) - set(MISSING_COMPONENTS_MSG "missing components: ") - endif() - set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}") - - if(${_NAME}_FIND_REQUIRED_${comp}) - set(${_NAME}_FOUND FALSE) - set(MISSING_VARS "${MISSING_VARS} ${comp}") - endif() - - endif() - endforeach() - set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}") - set(DETAILS "${DETAILS}[c${COMPONENT_MSG}]") - endif() - - # version handling: - set(VERSION_MSG "") - set(VERSION_OK TRUE) - set(VERSION ${${FPHSA_VERSION_VAR}}) - - # check with DEFINED here as the requested or found version may be "0" - if (DEFINED ${_NAME}_FIND_VERSION) - if(DEFINED ${FPHSA_VERSION_VAR}) - - if(${_NAME}_FIND_VERSION_EXACT) # exact version required - # count the dots in the version string - string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${VERSION}") - # add one dot because there is one dot more than there are components - string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS) - if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT) - # Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT - # is at most 4 here. Therefore a simple lookup table is used. - if (${_NAME}_FIND_VERSION_COUNT EQUAL 1) - set(_VERSION_REGEX "[^.]*") - elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2) - set(_VERSION_REGEX "[^.]*\\.[^.]*") - elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3) - set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*") - else () - set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*") - endif () - string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${VERSION}") - unset(_VERSION_REGEX) - if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD) - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") - endif () - unset(_VERSION_HEAD) - else () - if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL VERSION) - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") - endif () - endif () - unset(_VERSION_DOTS) - - else() # minimum version specified: - if (${_NAME}_FIND_VERSION VERSION_GREATER VERSION) - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable version \"${VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")") - endif () - endif() - - else() - - # if the package was not found, but a version was given, add that to the output: - if(${_NAME}_FIND_VERSION_EXACT) - set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")") - else() - set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")") - endif() - - endif() - else () - if(VERSION) - set(VERSION_MSG "(found version \"${VERSION}\")") - endif() - endif () - - if(VERSION_OK) - set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]") - else() - set(${_NAME}_FOUND FALSE) - endif() - - - # print the result: - if (${_NAME}_FOUND) - FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}") - else () - - if(FPHSA_CONFIG_MODE) - _FPHSA_HANDLE_FAILURE_CONFIG_MODE() - else() - if(NOT VERSION_OK) - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})") - else() - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}") - endif() - endif() - - endif () - - set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE) - set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE) -endfunction() diff --git a/CMake/NewCMake/FindPackageMessage.cmake b/CMake/NewCMake/FindPackageMessage.cmake deleted file mode 100644 index a0349d3db..000000000 --- a/CMake/NewCMake/FindPackageMessage.cmake +++ /dev/null @@ -1,57 +0,0 @@ -#.rst: -# FindPackageMessage -# ------------------ -# -# -# -# FIND_PACKAGE_MESSAGE( "message for user" "find result details") -# -# This macro is intended to be used in FindXXX.cmake modules files. It -# will print a message once for each unique find result. This is useful -# for telling the user where a package was found. The first argument -# specifies the name (XXX) of the package. The second argument -# specifies the message to display. The third argument lists details -# about the find result so that if they change the message will be -# displayed again. The macro also obeys the QUIET argument to the -# find_package command. -# -# Example: -# -# :: -# -# if(X11_FOUND) -# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}" -# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]") -# else() -# ... -# endif() - -#============================================================================= -# Copyright 2008-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -function(FIND_PACKAGE_MESSAGE pkg msg details) - # Avoid printing a message repeatedly for the same find result. - if(NOT ${pkg}_FIND_QUIETLY) - string(REPLACE "\n" "" details "${details}") - set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg}) - if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}") - # The message has not yet been printed. - message(STATUS "${msg}") - - # Save the find details in the cache to avoid printing the same - # message again. - set("${DETAILS_VAR}" "${details}" - CACHE INTERNAL "Details about finding ${pkg}") - endif() - endif() -endfunction() diff --git a/CMake/NewCMake/SelectLibraryConfigurations.cmake b/CMake/NewCMake/SelectLibraryConfigurations.cmake deleted file mode 100644 index d7108562b..000000000 --- a/CMake/NewCMake/SelectLibraryConfigurations.cmake +++ /dev/null @@ -1,81 +0,0 @@ -#.rst: -# SelectLibraryConfigurations -# --------------------------- -# -# -# -# select_library_configurations( basename ) -# -# This macro takes a library base name as an argument, and will choose -# good values for basename_LIBRARY, basename_LIBRARIES, -# basename_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE depending on what -# has been found and set. If only basename_LIBRARY_RELEASE is defined, -# basename_LIBRARY will be set to the release value, and -# basename_LIBRARY_DEBUG will be set to basename_LIBRARY_DEBUG-NOTFOUND. -# If only basename_LIBRARY_DEBUG is defined, then basename_LIBRARY will -# take the debug value, and basename_LIBRARY_RELEASE will be set to -# basename_LIBRARY_RELEASE-NOTFOUND. -# -# If the generator supports configuration types, then basename_LIBRARY -# and basename_LIBRARIES will be set with debug and optimized flags -# specifying the library to be used for the given configuration. If no -# build type has been set or the generator in use does not support -# configuration types, then basename_LIBRARY and basename_LIBRARIES will -# take only the release value, or the debug value if the release one is -# not set. - -#============================================================================= -# Copyright 2009 Will Dicharry -# Copyright 2005-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# This macro was adapted from the FindQt4 CMake module and is maintained by Will -# Dicharry . - -macro( select_library_configurations basename ) - if(NOT ${basename}_LIBRARY_RELEASE) - set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.") - endif() - if(NOT ${basename}_LIBRARY_DEBUG) - set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.") - endif() - - if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND - NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND - ( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) ) - # if the generator supports configuration types or CMAKE_BUILD_TYPE - # is set, then set optimized and debug options. - set( ${basename}_LIBRARY "" ) - foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE ) - list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) - endforeach() - foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG ) - list( APPEND ${basename}_LIBRARY debug "${_libname}" ) - endforeach() - elseif( ${basename}_LIBRARY_RELEASE ) - set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) - elseif( ${basename}_LIBRARY_DEBUG ) - set( ${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG} ) - else() - set( ${basename}_LIBRARY "${basename}_LIBRARY-NOTFOUND") - endif() - - set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" ) - - if( ${basename}_LIBRARY ) - set( ${basename}_FOUND TRUE ) - endif() - - mark_as_advanced( ${basename}_LIBRARY_RELEASE - ${basename}_LIBRARY_DEBUG - ) -endmacro() diff --git a/CMake/RasterizeSVG.cmake b/CMake/RasterizeSVG.cmake index b92503ec7..2c336a9f0 100644 --- a/CMake/RasterizeSVG.cmake +++ b/CMake/RasterizeSVG.cmake @@ -85,10 +85,9 @@ execute_process( RESULT_VARIABLE EXITCODE OUTPUT_VARIABLE ERRORSTR) - if(NOT ${EXITCODE} EQUAL 0) - message(FATAL_ERROR "SVG->PNG conversion exited with status ${EXITCODE}:\n" - "${ERRORSTR}") - endif() +if(NOT ${EXITCODE} EQUAL 0) + message(FATAL_ERROR "SVG->PNG conversion exited with status ${EXITCODE}:\n" + "${ERRORSTR}") endif() if(REMOVESVG) diff --git a/CMake/VTKDetermineVersion.cmake b/CMake/VTKDetermineVersion.cmake new file mode 100644 index 000000000..3a4d80096 --- /dev/null +++ b/CMake/VTKDetermineVersion.cmake @@ -0,0 +1,106 @@ +#========================================================================= +# +# Program: VTK +# +# Copyright (c) Kitware, Inc. +# All rights reserved. +# See Copyright.txt or http://www.VTK.org/HTML/Copyright.html for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even +# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the above copyright notice for more information. +# +#========================================================================= + +# Used to determine the version for VTK source using "git describe", if git +# is found. On success sets following variables in caller's scope: +# ${var_prefix}_VERSION +# ${var_prefix}_MAJOR_VERSION +# ${var_prefix}_MINOR_VERSION +# ${var_prefix}_BUILD_VERSION +# ${var_prefix}_BUILD_VERSION_EXTRA +# ${var_prefix}_VERSION_FULL +# ${var_prefix}_VERSION_IS_RELEASE is true, if patch-extra is empty. +# +# If git is not found, or git describe cannot be run successfully, then these +# variables are left unchanged and status message is printed. +# +# Arguments are: +# source_dir : Source directory +# git_command : git executable +# var_prefix : prefix for variables e.g. "VTK". +function(determine_version source_dir git_command var_prefix) + if ("$Format:$" STREQUAL "") + # We are in an exported tarball and should use the shipped version + # information. Just return here to avoid the warning message at the end of + # this function. + return () + elseif (NOT VTK_GIT_DESCRIBE AND + EXISTS ${git_command} AND + EXISTS ${source_dir}/.git) + execute_process( + COMMAND ${git_command} describe + WORKING_DIRECTORY ${source_dir} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE) + if (NOT result EQUAL "0") + # git describe failed (bad return code). + set(output "") + endif() + else () + # note, output may be set to empty if VTK_GIT_DESCRIBE is not defined. + set(output "${VTK_GIT_DESCRIBE}") + endif() + + unset(tmp_VERSION) + extract_version_components("${output}" tmp) + if(DEFINED tmp_VERSION) + if (${var_prefix}_BUILD_VERSION GREATER "20200101") + if (NOT tmp_MAJOR_VERSION STREQUAL ${var_prefix}_MAJOR_VERSION OR + NOT tmp_MINOR_VERSION STREQUAL ${var_prefix}_MINOR_VERSION) + message(WARNING + "Version from git (${tmp_VERSION}) disagrees with hard coded version (${${var_prefix}_VERSION}). Either update the git tags or version.txt.") + endif () + elseif (NOT "${tmp_VERSION}" STREQUAL "${${var_prefix}_VERSION}") + message(WARNING + "Version from git (${tmp_VERSION}) disagrees with hard coded version (${${var_prefix}_VERSION}). Either update the git tags or version.txt.") + endif() + foreach(suffix VERSION VERSION_MAJOR VERSION_MINOR VERSION_PATCH + VERSION_PATCH_EXTRA VERSION_FULL VERSION_IS_RELEASE) + set(${var_prefix}_${suffix} ${tmp_${suffix}} PARENT_SCOPE) + endforeach() + else() + message(STATUS + "Could not use git to determine source version, using version ${${var_prefix}_VERSION_FULL}") + endif() +endfunction() + +# Extracts components from a version string. See determine_version() for usage. +function(extract_version_components version_string var_prefix) + string(REGEX MATCH "^v?(([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*))$" + version_matches "${version_string}") + if(CMAKE_MATCH_0) + # note, we don't use CMAKE_MATCH_0 for `full` since it may or may not have + # the `v` prefix. + set(full ${CMAKE_MATCH_1}) + set(major ${CMAKE_MATCH_2}) + set(minor ${CMAKE_MATCH_3}) + set(patch ${CMAKE_MATCH_4}) + set(patch_extra ${CMAKE_MATCH_5}) + + set(${var_prefix}_VERSION "${major}.${minor}.${patch}" PARENT_SCOPE) + set(${var_prefix}_MAJOR_VERSION ${major} PARENT_SCOPE) + set(${var_prefix}_MINOR_VERSION ${minor} PARENT_SCOPE) + set(${var_prefix}_BUILD_VERSION ${patch} PARENT_SCOPE) + set(${var_prefix}_BUILD_VERSION_EXTRA ${patch_extra} PARENT_SCOPE) + set(${var_prefix}_VERSION_FULL ${full} PARENT_SCOPE) + if("${major}.${minor}.${patch}" VERSION_EQUAL "${full}") + set(${var_prefix}_VERSION_IS_RELEASE TRUE PARENT_SCOPE) + else() + set(${var_prefix}_VERSION_IS_RELEASE FALSE PARENT_SCOPE) + endif() + endif() +endfunction() diff --git a/CMake/VTKcppcheckSuppressions.txt b/CMake/VTKcppcheckSuppressions.txt index ebafb3a34..96a29cb10 100644 --- a/CMake/VTKcppcheckSuppressions.txt +++ b/CMake/VTKcppcheckSuppressions.txt @@ -13,7 +13,7 @@ //========================================================================= // This file contains enough suppressions to result in no cppcheck warnings, -// at least on macOS with cppcheck 1.90 with the flags below. +// at least on macOS with cppcheck 2.4 with the flags below. // To run: // cd /path/to/VTK/ @@ -641,18 +641,28 @@ constParameter:*/Rendering/RayTracing/RTWrapper/VisRTX/Object.h // False positive: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? uselessAssignmentPtrArg:*/Wrapping/Tools/vtkParse.tab.c -// False positives: https://trac.cppcheck.net/ticket/9223#comment:3 -nullPointerRedundantCheck,*/Wrapping/Tools/vtkWrapPython.c -nullPointerRedundantCheck,*/Wrapping/Tools/vtkParsePreprocess.c +// False positive +nullPointerArithmeticRedundantCheck:*/Wrapping/Tools/vtkParse.tab.c + +// False positive: Either the condition 'm+1>outputsize' is redundant or the array 'output[16]' is accessed at index 16, which is out of bounds. +arrayIndexOutOfBoundsCond:*/Wrapping/Tools/vtkParsePreprocess.c + +// False positives +knownConditionTrueFalse:*/Wrapping/Tools/vtkWrapJava.c +knownConditionTrueFalse:*/Wrapping/Tools/vtkParseJava.c +objectIndex:*/Wrapping/Tools/vtkParsePreprocess.c +objectIndex:*/Wrapping/Tools/vtkParseMain.c // Not technically false positives, but there's no bug here and no clear way to rework the code in a better way constArgument:*/Wrapping/Tools/vtkParsePreprocess.c duplicateCondition:*/Wrapping/Tools/vtkParse.tab.c +knownConditionTrueFalse:*/Utilities/KWIML/vtkkwiml/test/test.c +knownConditionTrueFalse:*/Wrapping/Tools/vtkParsePreprocess.c redundantAssignment:*/Wrapping/Tools/lex.yy.c redundantAssignment:*/Wrapping/Tools/vtkParsePreprocess.c redundantInitialization:*/Wrapping/Tools/lex.yy.c syntaxError:*/CMake/patches/3.10/FindMPI/test_mpi.c -constArgument:*/Wrapping/Tools/vtkParsePreprocess.c +unreachableCode:*/Wrapping/Tools/vtkParse.tab.c unreadVariable:*/Wrapping/Tools/lex.yy.c unreadVariable:*/Wrapping/Tools/vtkParse.tab.c unreadVariable:*/Wrapping/Tools/vtkParseExtras.c @@ -666,7 +676,6 @@ unreadVariable:*/Wrapping/Tools/vtkWrapHierarchy.c unreadVariable:*/Wrapping/Tools/vtkWrapJava.c unreadVariable:*/Wrapping/Tools/vtkWrapPythonMethodDef.c unreadVariable:*/Wrapping/Tools/vtkWrapText.c -nullPointerRedundantCheck:*/Wrapping/Tools/lex.yy.c // 4 warnings, should fix! invalidPointerCast:*/Rendering/GL2PSOpenGL2/vtkOpenGLGL2PSHelperImpl.cxx @@ -700,3 +709,4 @@ syntaxError:*/Examples/GUI/Win32/vtkBorland/ProjectDemo/Project_vtkDemo.cpp memleak:*/Wrapping/Tools/vtkParsePreprocess.c duplicateAssignExpression:*/Wrapping/Tools/vtkWrapText.c nullPointer:*/Wrapping/Tools/lex.yy.c +nullPointerArithmeticRedundantCheck:*/Wrapping/Tools/vtkParse.tab.c:7649,warning,Either the condition '!yynewItems' is redundant or there is pointer arithmetic with NULL pointer. diff --git a/CMake/patches/3.11/BasicConfigVersion-AnyNewerVersion.cmake.in b/CMake/patches/3.11/BasicConfigVersion-AnyNewerVersion.cmake.in deleted file mode 100644 index afffc047f..000000000 --- a/CMake/patches/3.11/BasicConfigVersion-AnyNewerVersion.cmake.in +++ /dev/null @@ -1,37 +0,0 @@ -# This is a basic version file for the Config-mode of find_package(). -# It is used by write_basic_package_version_file() as input file for configure_file() -# to create a version-file which can be installed along a config.cmake file. -# -# The created file sets PACKAGE_VERSION_EXACT if the current version string and -# the requested version string are exactly the same and it sets -# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. -# The variable CVF_VERSION must be set before calling configure_file(). - -set(PACKAGE_VERSION "@CVF_VERSION@") - -if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() - - -# if the installed project requested no architecture check, don't perform the check -if("@CVF_ARCH_INDEPENDENT@") - return() -endif() - -# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: -if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") - return() -endif() - -# check that the installed version has the same 32/64bit-ness as the one which is currently searching: -if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@") - math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") - set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_UNSUITABLE TRUE) -endif() diff --git a/CMake/patches/3.11/BasicConfigVersion-ExactVersion.cmake.in b/CMake/patches/3.11/BasicConfigVersion-ExactVersion.cmake.in deleted file mode 100644 index fe5c2e5a8..000000000 --- a/CMake/patches/3.11/BasicConfigVersion-ExactVersion.cmake.in +++ /dev/null @@ -1,52 +0,0 @@ -# This is a basic version file for the Config-mode of find_package(). -# It is used by write_basic_package_version_file() as input file for configure_file() -# to create a version-file which can be installed along a config.cmake file. -# -# The created file sets PACKAGE_VERSION_EXACT if the current version string and -# the requested version string are exactly the same and it sets -# PACKAGE_VERSION_COMPATIBLE if the current version is equal to the requested version. -# The tweak version component is ignored. -# The variable CVF_VERSION must be set before calling configure_file(). - - -set(PACKAGE_VERSION "@CVF_VERSION@") - -if("@CVF_VERSION@" MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\.") # strip the tweak version - set(CVF_VERSION_NO_TWEAK "${CMAKE_MATCH_1}") -else() - set(CVF_VERSION_NO_TWEAK "@CVF_VERSION@") -endif() - -if(PACKAGE_FIND_VERSION MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\.") # strip the tweak version - set(REQUESTED_VERSION_NO_TWEAK "${CMAKE_MATCH_1}") -else() - set(REQUESTED_VERSION_NO_TWEAK "${PACKAGE_FIND_VERSION}") -endif() - -if(REQUESTED_VERSION_NO_TWEAK STREQUAL CVF_VERSION_NO_TWEAK) - set(PACKAGE_VERSION_COMPATIBLE TRUE) -else() - set(PACKAGE_VERSION_COMPATIBLE FALSE) -endif() - -if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) - set(PACKAGE_VERSION_EXACT TRUE) -endif() - - -# if the installed project requested no architecture check, don't perform the check -if("@CVF_ARCH_INDEPENDENT@") - return() -endif() - -# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: -if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") - return() -endif() - -# check that the installed version has the same 32/64bit-ness as the one which is currently searching: -if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@") - math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") - set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_UNSUITABLE TRUE) -endif() diff --git a/CMake/patches/3.11/BasicConfigVersion-SameMajorVersion.cmake.in b/CMake/patches/3.11/BasicConfigVersion-SameMajorVersion.cmake.in deleted file mode 100644 index d885c0f93..000000000 --- a/CMake/patches/3.11/BasicConfigVersion-SameMajorVersion.cmake.in +++ /dev/null @@ -1,51 +0,0 @@ -# This is a basic version file for the Config-mode of find_package(). -# It is used by write_basic_package_version_file() as input file for configure_file() -# to create a version-file which can be installed along a config.cmake file. -# -# The created file sets PACKAGE_VERSION_EXACT if the current version string and -# the requested version string are exactly the same and it sets -# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, -# but only if the requested major version is the same as the current one. -# The variable CVF_VERSION must be set before calling configure_file(). - - -set(PACKAGE_VERSION "@CVF_VERSION@") - -if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - - if("@CVF_VERSION@" MATCHES "^([0-9]+)\\.") - set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") - else() - set(CVF_VERSION_MAJOR "@CVF_VERSION@") - endif() - - if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) - set(PACKAGE_VERSION_COMPATIBLE TRUE) - else() - set(PACKAGE_VERSION_COMPATIBLE FALSE) - endif() - - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() - - -# if the installed project requested no architecture check, don't perform the check -if("@CVF_ARCH_INDEPENDENT@") - return() -endif() - -# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: -if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") - return() -endif() - -# check that the installed version has the same 32/64bit-ness as the one which is currently searching: -if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@") - math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") - set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_UNSUITABLE TRUE) -endif() diff --git a/CMake/patches/3.11/BasicConfigVersion-SameMinorVersion.cmake.in b/CMake/patches/3.11/BasicConfigVersion-SameMinorVersion.cmake.in deleted file mode 100644 index bf055e8d4..000000000 --- a/CMake/patches/3.11/BasicConfigVersion-SameMinorVersion.cmake.in +++ /dev/null @@ -1,55 +0,0 @@ -# This is a basic version file for the Config-mode of find_package(). -# It is used by write_basic_package_version_file() as input file for configure_file() -# to create a version-file which can be installed along a config.cmake file. -# -# The created file sets PACKAGE_VERSION_EXACT if the current version string and -# the requested version string are exactly the same and it sets -# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, -# but only if the requested major and minor versions are the same as the current -# one. -# The variable CVF_VERSION must be set before calling configure_file(). - - -set(PACKAGE_VERSION "@CVF_VERSION@") - -if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - - if("@CVF_VERSION@" MATCHES "^([0-9]+)\\.([0-9]+)") - set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") - set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}") - else() - set(CVF_VERSION_MAJOR "@CVF_VERSION@") - set(CVF_VERSION_MINOR "") - endif() - - if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND - (PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR)) - set(PACKAGE_VERSION_COMPATIBLE TRUE) - else() - set(PACKAGE_VERSION_COMPATIBLE FALSE) - endif() - - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() - - -# if the installed project requested no architecture check, don't perform the check -if("@CVF_ARCH_INDEPENDENT@") - return() -endif() - -# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: -if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") - return() -endif() - -# check that the installed version has the same 32/64bit-ness as the one which is currently searching: -if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@") - math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") - set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_UNSUITABLE TRUE) -endif() diff --git a/CMake/patches/3.11/CMakePackageConfigHelpers.cmake b/CMake/patches/3.11/CMakePackageConfigHelpers.cmake deleted file mode 100644 index 22fc95366..000000000 --- a/CMake/patches/3.11/CMakePackageConfigHelpers.cmake +++ /dev/null @@ -1,332 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -CMakePackageConfigHelpers -------------------------- - -Helpers functions for creating config files that can be included by other -projects to find and use a package. - -Adds the :command:`configure_package_config_file()` and -:command:`write_basic_package_version_file()` commands. - -Generating a Package Configuration File -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. command:: configure_package_config_file - - Create a config file for a project:: - - configure_package_config_file( - INSTALL_DESTINATION - [PATH_VARS ... ] - [NO_SET_AND_CHECK_MACRO] - [NO_CHECK_REQUIRED_COMPONENTS_MACRO] - [INSTALL_PREFIX ] - ) - -``configure_package_config_file()`` should be used instead of the plain -:command:`configure_file()` command when creating the ``Config.cmake`` -or ``-config.cmake`` file for installing a project or library. -It helps making the resulting package relocatable by avoiding hardcoded paths -in the installed ``Config.cmake`` file. - -In a ``FooConfig.cmake`` file there may be code like this to make the install -destinations know to the using project: - -.. code-block:: cmake - - set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" ) - set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" ) - set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" ) - #...logic to determine installedPrefix from the own location... - set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" ) - -All 4 options shown above are not sufficient, since the first 3 hardcode the -absolute directory locations, and the 4th case works only if the logic to -determine the ``installedPrefix`` is correct, and if ``CONFIG_INSTALL_DIR`` -contains a relative path, which in general cannot be guaranteed. This has the -effect that the resulting ``FooConfig.cmake`` file would work poorly under -Windows and OSX, where users are used to choose the install location of a -binary package at install time, independent from how -:variable:`CMAKE_INSTALL_PREFIX` was set at build/cmake time. - -Using ``configure_package_config_file`` helps. If used correctly, it makes -the resulting ``FooConfig.cmake`` file relocatable. Usage: - -1. write a ``FooConfig.cmake.in`` file as you are used to -2. insert a line containing only the string ``@PACKAGE_INIT@`` -3. instead of ``set(FOO_DIR "@SOME_INSTALL_DIR@")``, use - ``set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")`` (this must be after the - ``@PACKAGE_INIT@`` line) -4. instead of using the normal :command:`configure_file()`, use - ``configure_package_config_file()`` - - - -The ```` and ```` arguments are the input and output file, the -same way as in :command:`configure_file()`. - -The ```` given to ``INSTALL_DESTINATION`` must be the destination where -the ``FooConfig.cmake`` file will be installed to. This path can either be -absolute, or relative to the ``INSTALL_PREFIX`` path. - -The variables ```` to ```` given as ``PATH_VARS`` are the -variables which contain install destinations. For each of them the macro will -create a helper variable ``PACKAGE_``. These helper variables must be -used in the ``FooConfig.cmake.in`` file for setting the installed location. -They are calculated by ``configure_package_config_file`` so that they are -always relative to the installed location of the package. This works both for -relative and also for absolute locations. For absolute locations it works -only if the absolute location is a subdirectory of ``INSTALL_PREFIX``. - -If the ``INSTALL_PREFIX`` argument is passed, this is used as base path to -calculate all the relative paths. The ```` argument must be an absolute -path. If this argument is not passed, the :variable:`CMAKE_INSTALL_PREFIX` -variable will be used instead. The default value is good when generating a -FooConfig.cmake file to use your package from the install tree. When -generating a FooConfig.cmake file to use your package from the build tree this -option should be used. - -By default ``configure_package_config_file`` also generates two helper macros, -``set_and_check()`` and ``check_required_components()`` into the -``FooConfig.cmake`` file. - -``set_and_check()`` should be used instead of the normal ``set()`` command for -setting directories and file locations. Additionally to setting the variable -it also checks that the referenced file or directory actually exists and fails -with a ``FATAL_ERROR`` otherwise. This makes sure that the created -``FooConfig.cmake`` file does not contain wrong references. -When using the ``NO_SET_AND_CHECK_MACRO``, this macro is not generated -into the ``FooConfig.cmake`` file. - -``check_required_components()`` should be called at the end of -the ``FooConfig.cmake`` file. This macro checks whether all requested, -non-optional components have been found, and if this is not the case, sets -the ``Foo_FOUND`` variable to ``FALSE``, so that the package is considered to -be not found. It does that by testing the ``Foo__FOUND`` -variables for all requested required components. This macro should be -called even if the package doesn't provide any components to make sure -users are not specifying components erroneously. When using the -``NO_CHECK_REQUIRED_COMPONENTS_MACRO`` option, this macro is not generated -into the ``FooConfig.cmake`` file. - -For an example see below the documentation for -:command:`write_basic_package_version_file()`. - -Generating a Package Version File -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. command:: write_basic_package_version_file - - Create a version file for a project:: - - write_basic_package_version_file( - [VERSION ] - COMPATIBILITY - [ARCH_INDEPENDENT] ) - - -Writes a file for use as ``ConfigVersion.cmake`` file to -````. See the documentation of :command:`find_package()` for -details on this. - -```` is the output filename, it should be in the build tree. -```` is the version number of the project to be installed. - -If no ``VERSION`` is given, the :variable:`PROJECT_VERSION` variable is used. -If this hasn't been set, it errors out. - -The ``COMPATIBILITY`` mode ``AnyNewerVersion`` means that the installed -package version will be considered compatible if it is newer or exactly the -same as the requested version. This mode should be used for packages which -are fully backward compatible, also across major versions. -If ``SameMajorVersion`` is used instead, then the behaviour differs from -``AnyNewerVersion`` in that the major version number must be the same as -requested, e.g. version 2.0 will not be considered compatible if 1.0 is -requested. This mode should be used for packages which guarantee backward -compatibility within the same major version. -If ``SameMinorVersion`` is used, the behaviour is the same as -``SameMajorVersion``, but both major and minor version must be the same as -requested, e.g version 0.2 will not be compatible if 0.1 is requested. -If ``ExactVersion`` is used, then the package is only considered compatible if -the requested version matches exactly its own version number (not considering -the tweak version). For example, version 1.2.3 of a package is only -considered compatible to requested version 1.2.3. This mode is for packages -without compatibility guarantees. -If your project has more elaborated version matching rules, you will need to -write your own custom ``ConfigVersion.cmake`` file instead of using this -macro. - -If ``ARCH_INDEPENDENT`` is given, the installed package version will be -considered compatible even if it was built for a different architecture than -the requested architecture. Otherwise, an architecture check will be performed, -and the package will be considered compatible only if the architecture matches -exactly. For example, if the package is built for a 32-bit architecture, the -package is only considered compatible if it is used on a 32-bit architecture, -unless ``ARCH_INDEPENDENT`` is given, in which case the package is considered -compatible on any architecture. - -.. note:: ``ARCH_INDEPENDENT`` is intended for header-only libraries or similar - packages with no binaries. - -Internally, this macro executes :command:`configure_file()` to create the -resulting version file. Depending on the ``COMPATIBILITY``, the corresponding -``BasicConfigVersion-.cmake.in`` file is used. -Please note that these files are internal to CMake and you should not call -:command:`configure_file()` on them yourself, but they can be used as starting -point to create more sophisticted custom ``ConfigVersion.cmake`` files. - -Example Generating Package Files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Example using both :command:`configure_package_config_file` and -``write_basic_package_version_file()``: - -``CMakeLists.txt``: - -.. code-block:: cmake - - set(INCLUDE_INSTALL_DIR include/ ... CACHE ) - set(LIB_INSTALL_DIR lib/ ... CACHE ) - set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE ) - #... - include(CMakePackageConfigHelpers) - configure_package_config_file(FooConfig.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake - INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake - PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR) - write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake - VERSION 1.2.3 - COMPATIBILITY SameMajorVersion ) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake - DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake ) - -``FooConfig.cmake.in``: - -:: - - set(FOO_VERSION x.y.z) - ... - @PACKAGE_INIT@ - ... - set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") - set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@") - - check_required_components(Foo) -#]=======================================================================] - -include(WriteBasicConfigVersionFile) - -macro(WRITE_BASIC_PACKAGE_VERSION_FILE) - write_basic_config_version_file(${ARGN}) -endmacro() - -function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) - set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO) - set(oneValueArgs INSTALL_DESTINATION INSTALL_PREFIX) - set(multiValueArgs PATH_VARS ) - - cmake_parse_arguments(CCF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(CCF_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown keywords given to CONFIGURE_PACKAGE_CONFIG_FILE(): \"${CCF_UNPARSED_ARGUMENTS}\"") - endif() - - if(NOT CCF_INSTALL_DESTINATION) - message(FATAL_ERROR "No INSTALL_DESTINATION given to CONFIGURE_PACKAGE_CONFIG_FILE()") - endif() - - if(DEFINED CCF_INSTALL_PREFIX) - if(IS_ABSOLUTE "${CCF_INSTALL_PREFIX}") - set(installPrefix "${CCF_INSTALL_PREFIX}") - else() - message(FATAL_ERROR "INSTALL_PREFIX must be an absolute path") - endif() - elseif(IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}") - set(installPrefix "${CMAKE_INSTALL_PREFIX}") - else() - get_filename_component(installPrefix "${CMAKE_INSTALL_PREFIX}" ABSOLUTE) - endif() - - if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}") - set(absInstallDir "${CCF_INSTALL_DESTINATION}") - else() - set(absInstallDir "${installPrefix}/${CCF_INSTALL_DESTINATION}") - endif() - - file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${installPrefix}" ) - - foreach(var ${CCF_PATH_VARS}) - if(NOT DEFINED ${var}) - message(FATAL_ERROR "Variable ${var} does not exist") - else() - if(IS_ABSOLUTE "${${var}}") - string(REPLACE "${installPrefix}" "\${PACKAGE_PREFIX_DIR}" - PACKAGE_${var} "${${var}}") - else() - set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}") - endif() - endif() - endforeach() - - get_filename_component(inputFileName "${_inputFile}" NAME) - - set(PACKAGE_INIT " -####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### -####### Any changes to this file will be overwritten by the next CMake run #### -####### The input file was ${inputFileName} ######## - -get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE) -") - - if("${absInstallDir}" MATCHES "^(/usr)?/lib(64)?/.+") - # Handle "/usr move" symlinks created by some Linux distros. - string(APPEND PACKAGE_INIT " -# Use original install prefix when loaded through a \"/usr move\" -# cross-prefix symbolic link such as /lib -> /usr/lib. -get_filename_component(_realCurr \"\${CMAKE_CURRENT_LIST_DIR}\" REALPATH) -get_filename_component(_realOrig \"${absInstallDir}\" REALPATH) -if(_realCurr STREQUAL _realOrig) - set(PACKAGE_PREFIX_DIR \"${installPrefix}\") -endif() -unset(_realOrig) -unset(_realCurr) -") - endif() - - if(NOT CCF_NO_SET_AND_CHECK_MACRO) - string(APPEND PACKAGE_INIT " -macro(set_and_check _var _file) - set(\${_var} \"\${_file}\") - if(NOT EXISTS \"\${_file}\") - message(FATAL_ERROR \"File or directory \${_file} referenced by variable \${_var} does not exist !\") - endif() -endmacro() -") - endif() - - - if(NOT CCF_NO_CHECK_REQUIRED_COMPONENTS_MACRO) - string(APPEND PACKAGE_INIT " -macro(check_required_components _NAME) - foreach(comp \${\${_NAME}_FIND_COMPONENTS}) - if(NOT \${_NAME}_\${comp}_FOUND) - if(\${_NAME}_FIND_REQUIRED_\${comp}) - set(\${_NAME}_FOUND FALSE) - endif() - endif() - endforeach() -endmacro() -") - endif() - - string(APPEND PACKAGE_INIT " -####################################################################################") - - configure_file("${_inputFile}" "${_outputFile}" @ONLY) - -endfunction() diff --git a/CMake/patches/3.11/WriteBasicConfigVersionFile.cmake b/CMake/patches/3.11/WriteBasicConfigVersionFile.cmake deleted file mode 100644 index 4d7ff3d25..000000000 --- a/CMake/patches/3.11/WriteBasicConfigVersionFile.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -WriteBasicConfigVersionFile ---------------------------- - -.. deprecated:: 3.0 - - Use the identical command :command:`write_basic_package_version_file()` - from module :module:`CMakePackageConfigHelpers`. - -:: - - WRITE_BASIC_CONFIG_VERSION_FILE( filename - [VERSION major.minor.patch] - COMPATIBILITY (AnyNewerVersion|SameMajorVersion|SameMinorVersion|ExactVersion) - [ARCH_INDEPENDENT] - ) - - -#]=======================================================================] - -set(_WriteBasicConfigVersionFile_DIR "${CMAKE_CURRENT_LIST_DIR}") - -function(WRITE_BASIC_CONFIG_VERSION_FILE _filename) - - set(options ARCH_INDEPENDENT ) - set(oneValueArgs VERSION COMPATIBILITY ) - set(multiValueArgs ) - - cmake_parse_arguments(CVF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(CVF_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown keywords given to WRITE_BASIC_CONFIG_VERSION_FILE(): \"${CVF_UNPARSED_ARGUMENTS}\"") - endif() - - set(versionTemplateFile "${_WriteBasicConfigVersionFile_DIR}/BasicConfigVersion-${CVF_COMPATIBILITY}.cmake.in") - if(NOT EXISTS "${versionTemplateFile}") - message(FATAL_ERROR "Bad COMPATIBILITY value used for WRITE_BASIC_CONFIG_VERSION_FILE(): \"${CVF_COMPATIBILITY}\"") - endif() - - if("${CVF_VERSION}" STREQUAL "") - if ("${PROJECT_VERSION}" STREQUAL "") - message(FATAL_ERROR "No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()") - else() - set(CVF_VERSION "${PROJECT_VERSION}") - endif() - endif() - - configure_file("${versionTemplateFile}" "${_filename}" @ONLY) - -endfunction() diff --git a/CMake/patches/3.16/FindMPI.cmake b/CMake/patches/3.16/FindMPI.cmake deleted file mode 100644 index ce0d51df1..000000000 --- a/CMake/patches/3.16/FindMPI.cmake +++ /dev/null @@ -1,1780 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindMPI -------- - -Find a Message Passing Interface (MPI) implementation. - -The Message Passing Interface (MPI) is a library used to write -high-performance distributed-memory parallel applications, and is -typically deployed on a cluster. MPI is a standard interface (defined -by the MPI forum) for which many implementations are available. - -Variables for using MPI -^^^^^^^^^^^^^^^^^^^^^^^ - -The module exposes the components ``C``, ``CXX``, ``MPICXX`` and ``Fortran``. -Each of these controls the various MPI languages to search for. -The difference between ``CXX`` and ``MPICXX`` is that ``CXX`` refers to the -MPI C API being usable from C++, whereas ``MPICXX`` refers to the MPI-2 C++ API -that was removed again in MPI-3. - -Depending on the enabled components the following variables will be set: - -``MPI_FOUND`` - Variable indicating that MPI settings for all requested languages have been found. - If no components are specified, this is true if MPI settings for all enabled languages - were detected. Note that the ``MPICXX`` component does not affect this variable. -``MPI_VERSION`` - Minimal version of MPI detected among the requested languages, or all enabled languages - if no components were specified. - -This module will set the following variables per language in your -project, where ```` is one of C, CXX, or Fortran: - -``MPI__FOUND`` - Variable indicating the MPI settings for ```` were found and that - simple MPI test programs compile with the provided settings. -``MPI__COMPILER`` - MPI compiler for ```` if such a program exists. -``MPI__COMPILE_OPTIONS`` - Compilation options for MPI programs in ````, given as a :ref:`;-list `. -``MPI__COMPILE_DEFINITIONS`` - Compilation definitions for MPI programs in ````, given as a :ref:`;-list `. -``MPI__INCLUDE_DIRS`` - Include path(s) for MPI header. -``MPI__LINK_FLAGS`` - Linker flags for MPI programs. -``MPI__LIBRARIES`` - All libraries to link MPI programs against. - -Additionally, the following :prop_tgt:`IMPORTED` targets are defined: - -``MPI::MPI_`` - Target for using MPI from ````. - -The following variables indicating which bindings are present will be defined: - -``MPI_MPICXX_FOUND`` - Variable indicating whether the MPI-2 C++ bindings are present (introduced in MPI-2, removed with MPI-3). -``MPI_Fortran_HAVE_F77_HEADER`` - True if the Fortran 77 header ``mpif.h`` is available. -``MPI_Fortran_HAVE_F90_MODULE`` - True if the Fortran 90 module ``mpi`` can be used for accessing MPI (MPI-2 and higher only). -``MPI_Fortran_HAVE_F08_MODULE`` - True if the Fortran 2008 ``mpi_f08`` is available to MPI programs (MPI-3 and higher only). - -If possible, the MPI version will be determined by this module. The facilities to detect the MPI version -were introduced with MPI-1.2, and therefore cannot be found for older MPI versions. - -``MPI__VERSION_MAJOR`` - Major version of MPI implemented for ```` by the MPI distribution. -``MPI__VERSION_MINOR`` - Minor version of MPI implemented for ```` by the MPI distribution. -``MPI__VERSION`` - MPI version implemented for ```` by the MPI distribution. - -Note that there's no variable for the C bindings being accessible through ``mpi.h``, since the MPI standards -always have required this binding to work in both C and C++ code. - -For running MPI programs, the module sets the following variables - -``MPIEXEC_EXECUTABLE`` - Executable for running MPI programs, if such exists. -``MPIEXEC_NUMPROC_FLAG`` - Flag to pass to ``mpiexec`` before giving it the number of processors to run on. -``MPIEXEC_MAX_NUMPROCS`` - Number of MPI processors to utilize. Defaults to the number - of processors detected on the host system. -``MPIEXEC_PREFLAGS`` - Flags to pass to ``mpiexec`` directly before the executable to run. -``MPIEXEC_POSTFLAGS`` - Flags to pass to ``mpiexec`` after other flags. - -Variables for locating MPI -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This module performs a three step search for an MPI implementation: - -1. Check if the compiler has MPI support built-in. This is the case if the user passed a - compiler wrapper as ``CMAKE__COMPILER`` or if they're on a Cray system. -2. Attempt to find an MPI compiler wrapper and determine the compiler information from it. -3. Try to find an MPI implementation that does not ship such a wrapper by guessing settings. - Currently, only Microsoft MPI and MPICH2 on Windows are supported. - -For controlling the second step, the following variables may be set: - -``MPI__COMPILER`` - Search for the specified compiler wrapper and use it. -``MPI__COMPILER_FLAGS`` - Flags to pass to the MPI compiler wrapper during interrogation. Some compiler wrappers - support linking debug or tracing libraries if a specific flag is passed and this variable - may be used to obtain them. -``MPI_COMPILER_FLAGS`` - Used to initialize ``MPI__COMPILER_FLAGS`` if no language specific flag has been given. - Empty by default. -``MPI_EXECUTABLE_SUFFIX`` - A suffix which is appended to all names that are being looked for. For instance you may set this - to ``.mpich`` or ``.openmpi`` to prefer the one or the other on Debian and its derivatives. - -In order to control the guessing step, the following variable may be set: - -``MPI_GUESS_LIBRARY_NAME`` - Valid values are ``MSMPI`` and ``MPICH2``. If set, only the given library will be searched for. - By default, ``MSMPI`` will be preferred over ``MPICH2`` if both are available. - This also sets ``MPI_SKIP_COMPILER_WRAPPER`` to ``true``, which may be overridden. - -Each of the search steps may be skipped with the following control variables: - -``MPI_ASSUME_NO_BUILTIN_MPI`` - If true, the module assumes that the compiler itself does not provide an MPI implementation and - skips to step 2. -``MPI_SKIP_COMPILER_WRAPPER`` - If true, no compiler wrapper will be searched for. -``MPI_SKIP_GUESSING`` - If true, the guessing step will be skipped. - -Additionally, the following control variable is available to change search behavior: - -``MPI_CXX_SKIP_MPICXX`` - Add some definitions that will disable the MPI-2 C++ bindings. - Currently supported are MPICH, Open MPI, Platform MPI and derivatives thereof, - for example MVAPICH or Intel MPI. - -If the find procedure fails for a variable ``MPI__WORKS``, then the settings detected by or passed to -the module did not work and even a simple MPI test program failed to compile. - -If all of these parameters were not sufficient to find the right MPI implementation, a user may -disable the entire autodetection process by specifying both a list of libraries in ``MPI__LIBRARIES`` -and a list of include directories in ``MPI__ADDITIONAL_INCLUDE_DIRS``. -Any other variable may be set in addition to these two. The module will then validate the MPI settings and store the -settings in the cache. - -Cache variables for MPI -^^^^^^^^^^^^^^^^^^^^^^^ - -The variable ``MPI__INCLUDE_DIRS`` will be assembled from the following variables. -For C and CXX: - -``MPI__HEADER_DIR`` - Location of the ``mpi.h`` header on disk. - -For Fortran: - -``MPI_Fortran_F77_HEADER_DIR`` - Location of the Fortran 77 header ``mpif.h``, if it exists. -``MPI_Fortran_MODULE_DIR`` - Location of the ``mpi`` or ``mpi_f08`` modules, if available. - -For all languages the following variables are additionally considered: - -``MPI__ADDITIONAL_INCLUDE_DIRS`` - A :ref:`;-list ` of paths needed in addition to the normal include directories. -``MPI__INCLUDE_DIR`` - Path variables for include folders referred to by ````. -``MPI__ADDITIONAL_INCLUDE_VARS`` - A :ref:`;-list ` of ```` that will be added to the include locations of ````. - -The variable ``MPI__LIBRARIES`` will be assembled from the following variables: - -``MPI__LIBRARY`` - The location of a library called ```` for use with MPI. -``MPI__LIB_NAMES`` - A :ref:`;-list ` of ```` that will be added to the include locations of ````. - -Usage of mpiexec -^^^^^^^^^^^^^^^^ - -When using ``MPIEXEC_EXECUTABLE`` to execute MPI applications, you should typically -use all of the ``MPIEXEC_EXECUTABLE`` flags as follows: - -:: - - ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} - ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS - -where ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to -pass to the MPI program. - -Advanced variables for using MPI -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The module can perform some advanced feature detections upon explicit request. - -**Important notice:** The following checks cannot be performed without *executing* an MPI test program. -Consider the special considerations for the behavior of :command:`try_run` during cross compilation. -Moreover, running an MPI program can cause additional issues, like a firewall notification on some systems. -You should only enable these detections if you absolutely need the information. - -If the following variables are set to true, the respective search will be performed: - -``MPI_DETERMINE_Fortran_CAPABILITIES`` - Determine for all available Fortran bindings what the values of ``MPI_SUBARRAYS_SUPPORTED`` and - ``MPI_ASYNC_PROTECTS_NONBLOCKING`` are and make their values available as ``MPI_Fortran__SUBARRAYS`` - and ``MPI_Fortran__ASYNCPROT``, where ```` is one of ``F77_HEADER``, ``F90_MODULE`` and - ``F08_MODULE``. -``MPI_DETERMINE_LIBRARY_VERSION`` - For each language, find the output of ``MPI_Get_library_version`` and make it available as ``MPI__LIBRARY_VERSION_STRING``. - This information is usually tied to the runtime component of an MPI implementation and might differ depending on ````. - Note that the return value is entirely implementation defined. This information might be used to identify - the MPI vendor and for example pick the correct one of multiple third party binaries that matches the MPI vendor. - -Backward Compatibility -^^^^^^^^^^^^^^^^^^^^^^ - -For backward compatibility with older versions of FindMPI, these -variables are set, but deprecated: - -:: - - MPI_COMPILER MPI_LIBRARY MPI_EXTRA_LIBRARY - MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_LINK_FLAGS - MPI_LIBRARIES - -In new projects, please use the ``MPI__XXX`` equivalents. -Additionally, the following variables are deprecated: - -``MPI__COMPILE_FLAGS`` - Use ``MPI__COMPILE_OPTIONS`` and ``MPI__COMPILE_DEFINITIONS`` instead. -``MPI__INCLUDE_PATH`` - For consumption use ``MPI__INCLUDE_DIRS`` and for specifying folders use ``MPI__ADDITIONAL_INCLUDE_DIRS`` instead. -``MPIEXEC`` - Use ``MPIEXEC_EXECUTABLE`` instead. -#]=======================================================================] - -cmake_policy(PUSH) -cmake_policy(SET CMP0057 NEW) # if IN_LIST - -include(FindPackageHandleStandardArgs) - -# Generic compiler names -set(_MPI_C_GENERIC_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r) -set(_MPI_CXX_GENERIC_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++ - mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r) -set(_MPI_Fortran_GENERIC_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r - mpif90 mpif90_r mpf90 mpf90_r - mpif77 mpif77_r mpf77 mpf77_r - mpifc) - -# GNU compiler names -set(_MPI_GNU_C_COMPILER_NAMES mpigcc mpgcc mpigcc_r mpgcc_r) -set(_MPI_GNU_CXX_COMPILER_NAMES mpig++ mpg++ mpig++_r mpg++_r mpigxx) -set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r mpgfortran_r - mpig77 mpig77_r mpg77 mpg77_r) - -# Intel MPI compiler names on Windows -if(WIN32) - list(APPEND _MPI_C_GENERIC_COMPILER_NAMES mpicc.bat) - list(APPEND _MPI_CXX_GENERIC_COMPILER_NAMES mpicxx.bat) - list(APPEND _MPI_Fortran_GENERIC_COMPILER_NAMES mpifc.bat) - - # Intel MPI compiler names - set(_MPI_Intel_C_COMPILER_NAMES mpiicc.bat) - set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc.bat) - set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort.bat mpif77.bat mpif90.bat) - - # Intel MPI compiler names for MSMPI - set(_MPI_MSVC_C_COMPILER_NAMES mpicl.bat) - set(_MPI_MSVC_CXX_COMPILER_NAMES mpicl.bat) -else() - # Intel compiler names - set(_MPI_Intel_C_COMPILER_NAMES mpiicc) - set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++) - set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77) -endif() - -# PGI compiler names -set(_MPI_PGI_C_COMPILER_NAMES mpipgcc mppgcc) -set(_MPI_PGI_CXX_COMPILER_NAMES mpipgCC mppgCC) -set(_MPI_PGI_Fortran_COMPILER_NAMES mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77) - -# XLC MPI Compiler names -set(_MPI_XL_C_COMPILER_NAMES mpxlc mpxlc_r mpixlc mpixlc_r) -set(_MPI_XL_CXX_COMPILER_NAMES mpixlcxx mpixlC mpixlc++ mpxlcxx mpxlc++ mpixlc++ mpxlCC - mpixlcxx_r mpixlC_r mpixlc++_r mpxlcxx_r mpxlc++_r mpixlc++_r mpxlCC_r) -set(_MPI_XL_Fortran_COMPILER_NAMES mpixlf95 mpixlf95_r mpxlf95 mpxlf95_r - mpixlf90 mpixlf90_r mpxlf90 mpxlf90_r - mpixlf77 mpixlf77_r mpxlf77 mpxlf77_r - mpixlf mpixlf_r mpxlf mpxlf_r) - -# XXX(cmake-3.9.0): Support CMake 3.8.0 `separate_arguments` signature. -if (CMAKE_VERSION VERSION_LESS "3.9.0") -if (WIN32 AND NOT CYGWIN) - set(_MPI_parse_kind WINDOWS_COMMAND) -else () - set(_MPI_parse_kind UNIX_COMMAND) -endif () -else () -set(_MPI_parse_kind NATIVE_COMMAND) -endif () - -# Prepend vendor-specific compiler wrappers to the list. If we don't know the compiler, -# attempt all of them. -# By attempting vendor-specific compiler names first, we should avoid situations where the compiler wrapper -# stems from a proprietary MPI and won't know which compiler it's being used for. For instance, Intel MPI -# controls its settings via the I_MPI_CC environment variables if the generic name is being used. -# If we know which compiler we're working with, we can use the most specialized wrapper there is in order to -# pick up the right settings for it. -foreach (LANG IN ITEMS C CXX Fortran) - set(_MPI_${LANG}_COMPILER_NAMES "") - foreach (id IN ITEMS GNU Intel MSVC PGI XL) - if (NOT CMAKE_${LANG}_COMPILER_ID OR CMAKE_${LANG}_COMPILER_ID STREQUAL id) - list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_MPI_${id}_${LANG}_COMPILER_NAMES}${MPI_EXECUTABLE_SUFFIX}) - endif() - unset(_MPI_${id}_${LANG}_COMPILER_NAMES) - endforeach() - list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_MPI_${LANG}_GENERIC_COMPILER_NAMES}${MPI_EXECUTABLE_SUFFIX}) - unset(_MPI_${LANG}_GENERIC_COMPILER_NAMES) -endforeach() - -# Names to try for mpiexec -# Only mpiexec commands are guaranteed to behave as described in the standard, -# mpirun commands are not covered by the standard in any way whatsoever. -# lamexec is the executable for LAM/MPI, srun is for SLURM or Open MPI with SLURM support. -# srun -n X is however a valid command, so it behaves 'like' mpiexec. -set(_MPIEXEC_NAMES_BASE mpiexec mpiexec.hydra mpiexec.mpd mpirun lamexec srun) - -unset(_MPIEXEC_NAMES) -foreach(_MPIEXEC_NAME IN LISTS _MPIEXEC_NAMES_BASE) - list(APPEND _MPIEXEC_NAMES "${_MPIEXEC_NAME}${MPI_EXECUTABLE_SUFFIX}") -endforeach() -unset(_MPIEXEC_NAMES_BASE) - -function (_MPI_check_compiler LANG QUERY_FLAG OUTPUT_VARIABLE RESULT_VARIABLE) - if(DEFINED MPI_${LANG}_COMPILER_FLAGS) - separate_arguments(_MPI_COMPILER_WRAPPER_OPTIONS ${_MPI_parse_kind} "${MPI_${LANG}_COMPILER_FLAGS}") - else() - separate_arguments(_MPI_COMPILER_WRAPPER_OPTIONS ${_MPI_parse_kind} "${MPI_COMPILER_FLAGS}") - endif() - execute_process( - COMMAND ${MPI_${LANG}_COMPILER} ${_MPI_COMPILER_WRAPPER_OPTIONS} ${QUERY_FLAG} - OUTPUT_VARIABLE WRAPPER_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE WRAPPER_OUTPUT ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE WRAPPER_RETURN) - # Some compiler wrappers will yield spurious zero return values, for example - # Intel MPI tolerates unknown arguments and if the MPI wrappers loads a shared - # library that has invalid or missing version information there would be warning - # messages emitted by ld.so in the compiler output. In either case, we'll treat - # the output as invalid. - if("${WRAPPER_OUTPUT}" MATCHES "undefined reference|unrecognized|need to set|no version information available|command not found") - set(WRAPPER_RETURN 255) - endif() - # Ensure that no error output might be passed upwards. - if(NOT WRAPPER_RETURN EQUAL 0) - unset(WRAPPER_OUTPUT) - else() - # Strip leading whitespace - string(REGEX REPLACE "^ +" "" WRAPPER_OUTPUT "${WRAPPER_OUTPUT}") - endif() - set(${OUTPUT_VARIABLE} "${WRAPPER_OUTPUT}" PARENT_SCOPE) - set(${RESULT_VARIABLE} "${WRAPPER_RETURN}" PARENT_SCOPE) -endfunction() - -macro(_MPI_env_set_ifnot VAR VALUE) - if(NOT DEFINED ENV{${VAR}}) - set(_MPI_${VAR}_WAS_SET FALSE) - set(ENV{${VAR}} ${${VALUE}}) - else() - set(_MPI_${VAR}_WAS_SET TRUE) - endif() -endmacro() - -macro(_MPI_env_unset_ifnot VAR) - if(NOT _MPI_${VAR}_WAS_SET) - unset(ENV{${VAR}}) - endif() -endmacro() - -function (_MPI_interrogate_compiler LANG) - unset(MPI_COMPILE_CMDLINE) - unset(MPI_LINK_CMDLINE) - - unset(MPI_COMPILE_OPTIONS_WORK) - unset(MPI_COMPILE_DEFINITIONS_WORK) - unset(MPI_INCLUDE_DIRS_WORK) - unset(MPI_LINK_FLAGS_WORK) - unset(MPI_LIB_NAMES_WORK) - unset(MPI_LIB_FULLPATHS_WORK) - - # Define the MPICH and Intel MPI compiler variables to the compilers set in CMake. - # It's possible to have a per-compiler configuration in these MPI implementations and - # a particular MPICH derivate might check compiler interoperability. - # Intel MPI in particular does this with I_MPI_CHECK_COMPILER. - file(TO_NATIVE_PATH "${CMAKE_${LANG}_COMPILER}" _MPI_UNDERLAYING_COMPILER) - # On Windows, the Intel MPI batch scripts can only work with filnames - Full paths will break them. - # Due to the lack of other MPICH-based wrappers for Visual C++, we may treat this as default. - if(MSVC) - get_filename_component(_MPI_UNDERLAYING_COMPILER "${_MPI_UNDERLAYING_COMPILER}" NAME) - endif() - if("${LANG}" STREQUAL "C") - _MPI_env_set_ifnot(I_MPI_CC _MPI_UNDERLAYING_COMPILER) - _MPI_env_set_ifnot(MPICH_CC _MPI_UNDERLAYING_COMPILER) - elseif("${LANG}" STREQUAL "CXX") - _MPI_env_set_ifnot(I_MPI_CXX _MPI_UNDERLAYING_COMPILER) - _MPI_env_set_ifnot(MPICH_CXX _MPI_UNDERLAYING_COMPILER) - elseif("${LANG}" STREQUAL "Fortran") - _MPI_env_set_ifnot(I_MPI_FC _MPI_UNDERLAYING_COMPILER) - _MPI_env_set_ifnot(MPICH_FC _MPI_UNDERLAYING_COMPILER) - _MPI_env_set_ifnot(I_MPI_F77 _MPI_UNDERLAYING_COMPILER) - _MPI_env_set_ifnot(MPICH_F77 _MPI_UNDERLAYING_COMPILER) - _MPI_env_set_ifnot(I_MPI_F90 _MPI_UNDERLAYING_COMPILER) - _MPI_env_set_ifnot(MPICH_F90 _MPI_UNDERLAYING_COMPILER) - endif() - - # Set these two variables for Intel MPI: - # - I_MPI_DEBUG_INFO_STRIP: It adds 'objcopy' lines to the compiler output. We support stripping them - # (see below), but if we can avoid them in the first place, we should. - # - I_MPI_FORT_BIND: By default Intel MPI makes the C/C++ compiler wrappers link Fortran bindings. - # This is so that mixed-language code doesn't require additional libraries when linking with mpicc. - # For our purposes, this makes little sense, since correct MPI usage from CMake already circumvenes this. - set(_MPI_ENV_VALUE "disable") - _MPI_env_set_ifnot(I_MPI_DEBUG_INFO_STRIP _MPI_ENV_VALUE) - _MPI_env_set_ifnot(I_MPI_FORT_BIND _MPI_ENV_VALUE) - - # Check whether the -showme:compile option works. This indicates that we have either Open MPI - # or a newer version of LAM/MPI, and implies that -showme:link will also work. - # Open MPI also supports -show, but separates linker and compiler information - _MPI_check_compiler(${LANG} "-showme:compile" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) - if (MPI_COMPILER_RETURN EQUAL 0) - _MPI_check_compiler(${LANG} "-showme:link" MPI_LINK_CMDLINE MPI_COMPILER_RETURN) - - if (NOT MPI_COMPILER_RETURN EQUAL 0) - unset(MPI_COMPILE_CMDLINE) - endif() - endif() - - # MPICH and MVAPICH offer -compile-info and -link-info. - # For modern versions, both do the same as -show. However, for old versions, they do differ - # when called for mpicxx and mpif90 and it's necessary to use them over -show in order to find the - # removed MPI C++ bindings. - if (NOT MPI_COMPILER_RETURN EQUAL 0) - _MPI_check_compiler(${LANG} "-compile-info" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) - - if (MPI_COMPILER_RETURN EQUAL 0) - _MPI_check_compiler(${LANG} "-link-info" MPI_LINK_CMDLINE MPI_COMPILER_RETURN) - - if (NOT MPI_COMPILER_RETURN EQUAL 0) - unset(MPI_COMPILE_CMDLINE) - endif() - endif() - endif() - - # MPICH, MVAPICH2 and Intel MPI just use "-show". Open MPI also offers this, but the - # -showme commands are more specialized. - if (NOT MPI_COMPILER_RETURN EQUAL 0) - _MPI_check_compiler(${LANG} "-show" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) - endif() - - # Older versions of LAM/MPI have "-showme". Open MPI also supports this. - # Unknown to MPICH, MVAPICH and Intel MPI. - if (NOT MPI_COMPILER_RETURN EQUAL 0) - _MPI_check_compiler(${LANG} "-showme" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) - endif() - - if (MPI_COMPILER_RETURN EQUAL 0 AND DEFINED MPI_COMPILE_CMDLINE) - # Intel MPI can be run with -compchk or I_MPI_CHECK_COMPILER set to 1. - # In this case, -show will be prepended with a line to the compiler checker. This is a script that performs - # compatibility checks and returns a non-zero exit code together with an error if something fails. - # It has to be called as "compchk.sh ". Here, is one out of 32 (i686), 64 (ia64) or 32e (x86_64). - # The compiler is identified by filename, and can be either the MPI compiler or the underlying compiler. - # NOTE: It is vital to run this script while the environment variables are set up, otherwise it can check the wrong compiler. - if("${MPI_COMPILE_CMDLINE}" MATCHES "^([^\" ]+/compchk.sh|\"[^\"]+/compchk.sh\") +([^ ]+)") - # Now CMAKE_MATCH_1 contains the path to the compchk.sh file and CMAKE_MATCH_2 the architecture flag. - unset(COMPILER_CHECKER_OUTPUT) - execute_process( - COMMAND ${CMAKE_MATCH_1} ${CMAKE_MATCH_2} ${MPI_${LANG}_COMPILER} - OUTPUT_VARIABLE COMPILER_CHECKER_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE COMPILER_CHECKER_OUTPUT ERROR_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE MPI_COMPILER_RETURN) - # If it returned a non-zero value, the check below will fail and cause the interrogation to be aborted. - if(NOT MPI_COMPILER_RETURN EQUAL 0) - if(NOT MPI_FIND_QUIETLY) - message(STATUS "Intel MPI compiler check failed: ${COMPILER_CHECKER_OUTPUT}") - endif() - else() - # Since the check passed, we can remove the compchk.sh script. - string(REGEX REPLACE "^([^\" ]+|\"[^\"]+\")/compchk.sh.*\n" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") - endif() - endif() - endif() - - # Revert changes to the environment made previously - if("${LANG}" STREQUAL "C") - _MPI_env_unset_ifnot(I_MPI_CC) - _MPI_env_unset_ifnot(MPICH_CC) - elseif("${LANG}" STREQUAL "CXX") - _MPI_env_unset_ifnot(I_MPI_CXX) - _MPI_env_unset_ifnot(MPICH_CXX) - elseif("${LANG}" STREQUAL "Fortran") - _MPI_env_unset_ifnot(I_MPI_FC) - _MPI_env_unset_ifnot(MPICH_FC) - _MPI_env_unset_ifnot(I_MPI_F77) - _MPI_env_unset_ifnot(MPICH_F77) - _MPI_env_unset_ifnot(I_MPI_F90) - _MPI_env_unset_ifnot(MPICH_F90) - endif() - - _MPI_env_unset_ifnot(I_MPI_DEBUG_INFO_STRIP) - _MPI_env_unset_ifnot(I_MPI_FORT_BIND) - - if (NOT (MPI_COMPILER_RETURN EQUAL 0) OR NOT (DEFINED MPI_COMPILE_CMDLINE)) - # Cannot interrogate this compiler, so exit. - set(MPI_${LANG}_WRAPPER_FOUND FALSE PARENT_SCOPE) - return() - endif() - unset(MPI_COMPILER_RETURN) - - # We have our command lines, but we might need to copy MPI_COMPILE_CMDLINE - # into MPI_LINK_CMDLINE, if we didn't find the link line. - if (NOT DEFINED MPI_LINK_CMDLINE) - set(MPI_LINK_CMDLINE "${MPI_COMPILE_CMDLINE}") - endif() - - # Visual Studio parsers permit each flag prefixed by either / or -. - # We'll normalize this to the - syntax we use for CMake purposes anyways. - if(MSVC) - foreach(_MPI_VARIABLE IN ITEMS COMPILE LINK) - # The Intel MPI wrappers on Windows prefix their output with some copyright boilerplate. - # To prevent possible problems, we discard this text before proceeding with any further matching. - string(REGEX REPLACE "^[^ ]+ for the Intel\\(R\\) MPI Library [^\n]+ for Windows\\*\nCopyright\\(C\\) [^\n]+, Intel Corporation\\. All rights reserved\\.\n\n" "" - MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") - string(REGEX REPLACE "(^| )/" "\\1-" MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") - string(REPLACE "-libpath:" "-LIBPATH:" MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") - endforeach() - endif() - - # For MSVC and cl-compatible compilers, the keyword /link indicates a point after which - # everything following is passed to the linker. In this case, we drop all prior information - # from the link line and treat any unknown extra flags as linker flags. - set(_MPI_FILTERED_LINK_INFORMATION FALSE) - if(MSVC) - if(MPI_LINK_CMDLINE MATCHES " -(link|LINK) ") - string(REGEX REPLACE ".+-(link|LINK) +" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") - set(_MPI_FILTERED_LINK_INFORMATION TRUE) - endif() - string(REGEX REPLACE " +-(link|LINK) .+" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") - endif() - - if(UNIX) - # At this point, we obtained some output from a compiler wrapper that works. - # We'll now try to parse it into variables with meaning to us. - if("${LANG}" STREQUAL "Fortran") - # If MPICH (and derivates) didn't recognize the Fortran compiler include flag during configuration, - # they'll return a set of three commands, consisting out of a symlink command for mpif.h, - # the actual compiler command and deletion of the created symlink. - # Especially with M(VA)PICH-1, this appears to happen erroneously, and therefore we should translate - # this output into an additional include directory and then drop it from the output. - if("${MPI_COMPILE_CMDLINE}" MATCHES "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h") - get_filename_component(MPI_INCLUDE_DIRS_WORK "${CMAKE_MATCH_1}" DIRECTORY) - string(REGEX REPLACE "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h\n" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") - string(REGEX REPLACE "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h\n" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") - string(REGEX REPLACE "\nrm -f mpif.h$" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") - string(REGEX REPLACE "\nrm -f mpif.h$" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") - endif() - endif() - - # If Intel MPI was configured for static linkage with -static_mpi, the wrapper will by default strip - # debug information from resulting binaries (see I_MPI_DEBUG_INFO_STRIP). - # Since we cannot process this information into CMake logic, we need to discard the resulting objcopy - # commands from the output. - string(REGEX REPLACE "(^|\n)objcopy[^\n]+(\n|$)" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") - string(REGEX REPLACE "(^|\n)objcopy[^\n]+(\n|$)" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") - endif() - - # For Visual C++, extracting compiler options in a generic fashion isn't easy. However, no MPI implementation - # on Windows seems to require any specific ones, either. - if(NOT MSVC) - # Extract compile options from the compile command line. - string(REGEX MATCHALL "(^| )-f([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_OPTIONS "${MPI_COMPILE_CMDLINE}") - - foreach(_MPI_COMPILE_OPTION IN LISTS MPI_ALL_COMPILE_OPTIONS) - string(REGEX REPLACE "^ " "" _MPI_COMPILE_OPTION "${_MPI_COMPILE_OPTION}") - - # Ignore -fstack-protector directives: These occur on MPICH and MVAPICH when the libraries - # themselves were built with this flag. However, this flag is unrelated to using MPI, and - # we won't match the accompanying --param-ssp-size and -Wp,-D_FORTIFY_SOURCE flags and therefore - # produce inconsistent results with the regularly flags. - # Similarly, aliasing flags do not belong into our flag array. - if(NOT "${_MPI_COMPILE_OPTION}" MATCHES "^-f((no-|)(stack-protector|strict-aliasing)|PI[CE]|pi[ce])") - list(APPEND MPI_COMPILE_OPTIONS_WORK "${_MPI_COMPILE_OPTION}") - endif() - endforeach() - endif() - - # For GNU-style compilers, it's possible to prefix includes and definitions with certain flags to pass them - # only to the preprocessor. For CMake purposes, we need to treat, but ignore such scopings. - # Note that we do not support spaces between the arguments, i.e. -Wp,-I -Wp,/opt/mympi will not be parsed - # correctly. This form does not seem to occur in any common MPI implementation, however. - if(NOT MSVC) - set(_MPI_PREPROCESSOR_FLAG_REGEX "(-Wp,|-Xpreprocessor )?") - else() - set(_MPI_PREPROCESSOR_FLAG_REGEX "") - endif() - - # Same deal as above, for the definitions. - string(REGEX MATCHALL "(^| )${_MPI_PREPROCESSOR_FLAG_REGEX}-D *([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_DEFINITIONS "${MPI_COMPILE_CMDLINE}") - - foreach(_MPI_COMPILE_DEFINITION IN LISTS MPI_ALL_COMPILE_DEFINITIONS) - string(REGEX REPLACE "^ ?${_MPI_PREPROCESSOR_FLAG_REGEX}-D *" "" _MPI_COMPILE_DEFINITION "${_MPI_COMPILE_DEFINITION}") - string(REPLACE "\"" "" _MPI_COMPILE_DEFINITION "${_MPI_COMPILE_DEFINITION}") - if(NOT "${_MPI_COMPILE_DEFINITION}" MATCHES "^_FORTIFY_SOURCE.*") - list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${_MPI_COMPILE_DEFINITION}") - endif() - endforeach() - - # Extract include paths from compile command line - string(REGEX MATCHALL "(^| )${_MPI_PREPROCESSOR_FLAG_REGEX}${CMAKE_INCLUDE_FLAG_${LANG}} *([^\" ]+|\"[^\"]+\")" - MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}") - - # If extracting failed to work, we'll try using -showme:incdirs. - # Unlike before, we do this without the environment variables set up, but since only MPICH derivates are affected by any of them, and - # -showme:... is only supported by Open MPI and LAM/MPI, this isn't a concern. - if (NOT MPI_ALL_INCLUDE_PATHS) - _MPI_check_compiler(${LANG} "-showme:incdirs" MPI_INCDIRS_CMDLINE MPI_INCDIRS_COMPILER_RETURN) - if(MPI_INCDIRS_COMPILER_RETURN) - separate_arguments(MPI_ALL_INCLUDE_PATHS ${_MPI_parse_kind} "${MPI_INCDIRS_CMDLINE}") - endif() - endif() - - foreach(_MPI_INCLUDE_PATH IN LISTS MPI_ALL_INCLUDE_PATHS) - string(REGEX REPLACE "^ ?${_MPI_PREPROCESSOR_FLAG_REGEX}${CMAKE_INCLUDE_FLAG_${LANG}} *" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") - string(REPLACE "\"" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") - get_filename_component(_MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}" REALPATH) - list(APPEND MPI_INCLUDE_DIRS_WORK "${_MPI_INCLUDE_PATH}") - endforeach() - - # The next step are linker flags and library directories. Here, we first take the flags given in raw -L or -LIBPATH: syntax. - string(REGEX MATCHALL "(^| )${CMAKE_LIBRARY_PATH_FLAG} *([^\" ]+|\"[^\"]+\")" MPI_DIRECT_LINK_PATHS "${MPI_LINK_CMDLINE}") - foreach(_MPI_LPATH IN LISTS MPI_DIRECT_LINK_PATHS) - string(REGEX REPLACE "(^| )${CMAKE_LIBRARY_PATH_FLAG} *" "" _MPI_LPATH "${_MPI_LPATH}") - list(APPEND MPI_ALL_LINK_PATHS "${_MPI_LPATH}") - endforeach() - - # If the link commandline hasn't been filtered (e.g. when using MSVC and /link), we need to extract the relevant parts first. - if(NOT _MPI_FILTERED_LINK_INFORMATION) - string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker +)([^\" ]+|\"[^\"]+\")" MPI_LINK_FLAGS "${MPI_LINK_CMDLINE}") - - # In this case, we could also find some indirectly given linker paths, e.g. prefixed by -Xlinker or -Wl, - # Since syntaxes like -Wl,-L -Wl,/my/path/to/lib are also valid, we parse these paths by first removing -Wl, and -Xlinker - # from the list of filtered flags and then parse the remainder of the output. - string(REGEX REPLACE "(-Wl,|-Xlinker +)" "" MPI_LINK_FLAGS_RAW "${MPI_LINK_FLAGS}") - - # Now we can parse the leftover output. Note that spaces can now be handled since the above example would reduce to - # -L /my/path/to/lib and can be extracted correctly. - string(REGEX MATCHALL "^(${CMAKE_LIBRARY_PATH_FLAG},? *|--library-path=)([^\" ]+|\"[^\"]+\")" - MPI_INDIRECT_LINK_PATHS "${MPI_LINK_FLAGS_RAW}") - - foreach(_MPI_LPATH IN LISTS MPI_INDIRECT_LINK_PATHS) - string(REGEX REPLACE "^(${CMAKE_LIBRARY_PATH_FLAG},? *|--library-path=)" "" _MPI_LPATH "${_MPI_LPATH}") - list(APPEND MPI_ALL_LINK_PATHS "${_MPI_LPATH}") - endforeach() - - # We need to remove the flags we extracted from the linker flag list now. - string(REGEX REPLACE "(^| )(-Wl,|-Xlinker +)(${CMAKE_LIBRARY_PATH_FLAG},? *(-Wl,|-Xlinker +)?|--library-path=)([^\" ]+|\"[^\"]+\")" "" - MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE}") - - # Some MPI implementations pass on options they themselves were built with. Since -z,noexecstack is a common - # hardening, we should strip it. In general, the -z options should be undesirable. - string(REGEX REPLACE "(^| )-Wl,-z(,[^ ]+| +-Wl,[^ ]+)" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE_FILTERED}") - string(REGEX REPLACE "(^| )-Xlinker +-z +-Xlinker +[^ ]+" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE_FILTERED}") - - # We only consider options of the form -Wl or -Xlinker: - string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker +)([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE_FILTERED}") - - # As a next step, we assemble the linker flags extracted in a preliminary flags string - foreach(_MPI_LINK_FLAG IN LISTS MPI_ALL_LINK_FLAGS) - string(STRIP "${_MPI_LINK_FLAG}" _MPI_LINK_FLAG) - if (MPI_LINK_FLAGS_WORK) - string(APPEND MPI_LINK_FLAGS_WORK " ${_MPI_LINK_FLAG}") - else() - set(MPI_LINK_FLAGS_WORK "${_MPI_LINK_FLAG}") - endif() - endforeach() - else() - # In the filtered case, we obtain the link time flags by just stripping the library paths. - string(REGEX REPLACE "(^| )${CMAKE_LIBRARY_PATH_FLAG} *([^\" ]+|\"[^\"]+\")" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE}") - endif() - - # If we failed to extract any linker paths, we'll try using the -showme:libdirs option with the MPI compiler. - # This will return a list of folders, not a set of flags! - if (NOT MPI_ALL_LINK_PATHS) - _MPI_check_compiler(${LANG} "-showme:libdirs" MPI_LIBDIRS_CMDLINE MPI_LIBDIRS_COMPILER_RETURN) - if(MPI_LIBDIRS_COMPILER_RETURN) - separate_arguments(MPI_ALL_LINK_PATHS ${_MPI_parse_kind} "${MPI_LIBDIRS_CMDLINE}") - endif() - endif() - - # We need to remove potential quotes and convert the paths to CMake syntax while resolving them, too. - foreach(_MPI_LPATH IN LISTS MPI_ALL_LINK_PATHS) - string(REPLACE "\"" "" _MPI_LPATH "${_MPI_LPATH}") - get_filename_component(_MPI_LPATH "${_MPI_LPATH}" REALPATH) - list(APPEND MPI_LINK_DIRECTORIES_WORK "${_MPI_LPATH}") - endforeach() - - # Extract the set of libraries to link against from the link command line - # This only makes sense if CMAKE_LINK_LIBRARY_FLAG is defined, i.e. a -lxxxx syntax is supported by the compiler. - if(CMAKE_LINK_LIBRARY_FLAG) - string(REGEX MATCHALL "(^| )${CMAKE_LINK_LIBRARY_FLAG}([^\" ]+|\"[^\"]+\")" - MPI_LIBNAMES "${MPI_LINK_CMDLINE}") - - foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) - string(REGEX REPLACE "^ ?${CMAKE_LINK_LIBRARY_FLAG}" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") - string(REPLACE "\"" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") - list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") - endforeach() - endif() - - # Treat linker objects given by full path, for example static libraries, import libraries - # or shared libraries if there aren't any import libraries in use on the system. - # Note that we do not consider CMAKE__LIBRARY_PREFIX intentionally here: The linker will for a given file - # decide how to link it based on file type, not based on a prefix like 'lib'. - set(_MPI_LIB_SUFFIX_REGEX "${CMAKE_STATIC_LIBRARY_SUFFIX}") - if(DEFINED CMAKE_IMPORT_LIBRARY_SUFFIX) - if(NOT ("${CMAKE_IMPORT_LIBRARY_SUFFIX}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")) - string(APPEND _MPI_SUFFIX_REGEX "|${CMAKE_IMPORT_LIBRARY_SUFFIX}") - endif() - else() - string(APPEND _MPI_LIB_SUFFIX_REGEX "|${CMAKE_SHARED_LIBRARY_SUFFIX}") - endif() - set(_MPI_LIB_NAME_REGEX "(([^\" ]+(${_MPI_LIB_SUFFIX_REGEX}))|(\"[^\"]+(${_MPI_LIB_SUFFIX_REGEX})\"))( +|$)") - string(REPLACE "." "\\." _MPI_LIB_NAME_REGEX "${_MPI_LIB_NAME_REGEX}") - - string(REGEX MATCHALL "${_MPI_LIB_NAME_REGEX}" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") - foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) - string(REGEX REPLACE "^ +\"?|\"? +$" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") - get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_NAME}" DIRECTORY) - if(NOT "${_MPI_LIB_PATH}" STREQUAL "") - list(APPEND MPI_LIB_FULLPATHS_WORK "${_MPI_LIB_NAME}") - else() - list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") - endif() - endforeach() - - # Save the explicitly given link directories - set(MPI_LINK_DIRECTORIES_LEFTOVER "${MPI_LINK_DIRECTORIES_WORK}") - - # An MPI compiler wrapper could have its MPI libraries in the implictly - # linked directories of the compiler itself. - if(DEFINED CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) - list(APPEND MPI_LINK_DIRECTORIES_WORK "${CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES}") - endif() - - # Determine full path names for all of the libraries that one needs - # to link against in an MPI program - unset(MPI_PLAIN_LIB_NAMES_WORK) - foreach(_MPI_LIB_NAME IN LISTS MPI_LIB_NAMES_WORK) - get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB_NAME}" NAME_WE) - list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") - find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY - NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" - HINTS ${MPI_LINK_DIRECTORIES_WORK} - DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" - ) - mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) - # Remove the directory from the remainder list. - if(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) - get_filename_component(_MPI_TAKEN_DIRECTORY "${MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY}" DIRECTORY) - list(REMOVE_ITEM MPI_LINK_DIRECTORIES_LEFTOVER "${_MPI_TAKEN_DIRECTORY}") - endif() - endforeach() - - # Add the link directories given explicitly that we haven't used back as linker directories. - if(NOT WIN32) - foreach(_MPI_LINK_DIRECTORY IN LISTS MPI_LINK_DIRECTORIES_LEFTOVER) - file(TO_NATIVE_PATH "${_MPI_LINK_DIRECTORY}" _MPI_LINK_DIRECTORY_ACTUAL) - string(FIND "${_MPI_LINK_DIRECTORY_ACTUAL}" " " _MPI_LINK_DIRECTORY_CONTAINS_SPACE) - if(NOT _MPI_LINK_DIRECTORY_CONTAINS_SPACE EQUAL -1) - set(_MPI_LINK_DIRECTORY_ACTUAL "\"${_MPI_LINK_DIRECTORY_ACTUAL}\"") - endif() - if(MPI_LINK_FLAGS_WORK) - string(APPEND MPI_LINK_FLAGS_WORK " ${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}") - else() - set(MPI_LINK_FLAGS_WORK "${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}") - endif() - endforeach() - endif() - - # Deal with the libraries given with full path next - unset(MPI_DIRECT_LIB_NAMES_WORK) - foreach(_MPI_LIB_FULLPATH IN LISTS MPI_LIB_FULLPATHS_WORK) - get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB_FULLPATH}" NAME_WE) - list(APPEND MPI_DIRECT_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") - set(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY "${_MPI_LIB_FULLPATH}" CACHE FILEPATH "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI") - mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) - endforeach() - # Directly linked objects should be linked first in case some generic linker flags are needed for them. - if(MPI_DIRECT_LIB_NAMES_WORK) - set(MPI_PLAIN_LIB_NAMES_WORK "${MPI_DIRECT_LIB_NAMES_WORK};${MPI_PLAIN_LIB_NAMES_WORK}") - endif() - - # MPI might require pthread to work. The above mechanism wouldn't detect it, but we need to - # link it in that case. -lpthread is covered by the normal library treatment on the other hand. - if("${MPI_COMPILE_CMDLINE}" MATCHES "-pthread") - list(APPEND MPI_COMPILE_OPTIONS_WORK "-pthread") - if(MPI_LINK_FLAGS_WORK) - string(APPEND MPI_LINK_FLAGS_WORK " -pthread") - else() - set(MPI_LINK_FLAGS_WORK "-pthread") - endif() - endif() - - if(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) - list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS}") - endif() - if(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) - list(APPEND MPI_COMPILE_OPTIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_OPTIONS}") - endif() - if(MPI_${LANG}_EXTRA_LIB_NAMES) - list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") - endif() - - # If we found MPI, set up all of the appropriate cache entries - if(NOT MPI_${LANG}_COMPILE_OPTIONS) - set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_COMPILE_OPTIONS_WORK} CACHE STRING "MPI ${LANG} compilation options" FORCE) - endif() - if(NOT MPI_${LANG}_COMPILE_DEFINITIONS) - set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_COMPILE_DEFINITIONS_WORK} CACHE STRING "MPI ${LANG} compilation definitions" FORCE) - endif() - if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_INCLUDE_DIRS_WORK} CACHE STRING "MPI ${LANG} additional include directories" FORCE) - endif() - if(NOT MPI_${LANG}_LINK_FLAGS) - set(MPI_${LANG}_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI ${LANG} linker flags" FORCE) - endif() - if(NOT MPI_${LANG}_LIB_NAMES) - set(MPI_${LANG}_LIB_NAMES ${MPI_PLAIN_LIB_NAMES_WORK} CACHE STRING "MPI ${LANG} libraries to link against" FORCE) - endif() - set(MPI_${LANG}_WRAPPER_FOUND TRUE PARENT_SCOPE) -endfunction() - -function(_MPI_guess_settings LANG) - set(MPI_GUESS_FOUND FALSE) - # Currently only MSMPI and MPICH2 on Windows are supported, so we can skip this search if we're not targeting that. - if(WIN32) - # MSMPI - - # The environment variables MSMPI_INC and MSMPILIB32/64 are the only ways of locating the MSMPI_SDK, - # which is installed separately from the runtime. Thus it's possible to have mpiexec but not MPI headers - # or import libraries and vice versa. - if(NOT MPI_GUESS_LIBRARY_NAME OR "${MPI_GUESS_LIBRARY_NAME}" STREQUAL "MSMPI") - # We first attempt to locate the msmpi.lib. Should be find it, we'll assume that the MPI present is indeed - # Microsoft MPI. - if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) - set(MPI_MSMPI_LIB_PATH "$ENV{MSMPI_LIB64}") - set(MPI_MSMPI_INC_PATH_EXTRA "$ENV{MSMPI_INC}/x64") - else() - set(MPI_MSMPI_LIB_PATH "$ENV{MSMPI_LIB32}") - set(MPI_MSMPI_INC_PATH_EXTRA "$ENV{MSMPI_INC}/x86") - endif() - - find_library(MPI_msmpi_LIBRARY - NAMES msmpi - HINTS ${MPI_MSMPI_LIB_PATH} - DOC "Location of the msmpi library for Microsoft MPI") - mark_as_advanced(MPI_msmpi_LIBRARY) - - if(MPI_msmpi_LIBRARY) - # Next, we attempt to locate the MPI header. Note that for Fortran we know that mpif.h is a way - # MSMPI can be used and therefore that header has to be present. - if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) - get_filename_component(MPI_MSMPI_INC_DIR "$ENV{MSMPI_INC}" REALPATH) - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_MSMPI_INC_DIR}" CACHE STRING "MPI ${LANG} additional include directories" FORCE) - unset(MPI_MSMPI_INC_DIR) - endif() - - # For MSMPI, one can compile the MPI module by building the mpi.f90 shipped with the MSMPI SDK, - # thus it might be present or provided by the user. Figuring out which is supported is done later on. - # The PGI Fortran compiler for instance ships a prebuilt set of modules in its own include folder. - # Should a user be employing PGI or have built its own set and provided it via cache variables, the - # splitting routine would have located the module files. - - # For C and C++, we're done here (MSMPI does not ship the MPI-2 C++ bindings) - however, for Fortran - # we need some extra library to glue Fortran support together: - # MSMPI ships 2-4 Fortran libraries, each for different Fortran compiler behaviors. The library names - # ending with a c are using the cdecl calling convention, whereas those ending with an s are for Fortran - # implementations using stdcall. Therefore, the 64-bit MSMPI only ships those ending in 'c', whereas the 32-bit - # has both variants available. - # The second difference is the last but one letter, if it's an e(nd), the length of a string argument is - # passed by the Fortran compiler after all other arguments on the parameter list, if it's an m(ixed), - # it's passed immediately after the string address. - - # To summarize: - # - msmpifec: CHARACTER length passed after the parameter list and using cdecl calling convention - # - msmpifmc: CHARACTER length passed directly after string address and using cdecl calling convention - # - msmpifes: CHARACTER length passed after the parameter list and using stdcall calling convention - # - msmpifms: CHARACTER length passed directly after string address and using stdcall calling convention - # 32-bit MSMPI ships all four libraries, 64-bit MSMPI ships only the first two. - - # As is, Intel Fortran and PGI Fortran both use the 'ec' variant of the calling convention, whereas - # the old Compaq Visual Fortran compiler defaulted to the 'ms' version. It's possible to make Intel Fortran - # use the CVF calling convention using /iface:cvf, but we assume - and this is also assumed in FortranCInterface - - # this isn't the case. It's also possible to make CVF use the 'ec' variant, using /iface=(cref,nomixed_str_len_arg). - - # Our strategy is now to locate all libraries, but enter msmpifec into the LIB_NAMES array. - # Should this not be adequate it's a straightforward way for a user to change the LIB_NAMES array and - # have his library found. Still, this should not be necessary outside of exceptional cases, as reasoned. - if ("${LANG}" STREQUAL "Fortran") - set(MPI_MSMPI_CALLINGCONVS c) - if("${CMAKE_SIZEOF_VOID_P}" EQUAL 4) - list(APPEND MPI_MSMPI_CALLINGCONVS s) - endif() - foreach(mpistrlenpos IN ITEMS e m) - foreach(mpicallingconv IN LISTS MPI_MSMPI_CALLINGCONVS) - find_library(MPI_msmpif${mpistrlenpos}${mpicallingconv}_LIBRARY - NAMES msmpif${mpistrlenpos}${mpicallingconv} - HINTS "${MPI_MSMPI_LIB_PATH}" - DOC "Location of the msmpi${mpistrlenpos}${mpicallingconv} library for Microsoft MPI") - mark_as_advanced(MPI_msmpif${mpistrlenpos}${mpicallingconv}_LIBRARY) - endforeach() - endforeach() - if(NOT MPI_${LANG}_LIB_NAMES) - set(MPI_${LANG}_LIB_NAMES "msmpi;msmpifec" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) - endif() - - # At this point we're *not* done. MSMPI requires an additional include file for Fortran giving the value - # of MPI_AINT. This file is called mpifptr.h located in the x64 and x86 subfolders, respectively. - find_path(MPI_mpifptr_INCLUDE_DIR - NAMES "mpifptr.h" - HINTS "${MPI_MSMPI_INC_PATH_EXTRA}" - DOC "Location of the mpifptr.h extra header for Microsoft MPI") - if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - set(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS "mpifptr" CACHE STRING "MPI ${LANG} additional include directory variables, given in the form MPI__INCLUDE_DIR." FORCE) - endif() - mark_as_advanced(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS MPI_mpifptr_INCLUDE_DIR) - else() - if(NOT MPI_${LANG}_LIB_NAMES) - set(MPI_${LANG}_LIB_NAMES "msmpi" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) - endif() - endif() - mark_as_advanced(MPI_${LANG}_LIB_NAMES) - set(MPI_GUESS_FOUND TRUE) - - if(_MPIEXEC_NOT_GIVEN) - unset(MPIEXEC_EXECUTABLE CACHE) - endif() - - find_program(MPIEXEC_EXECUTABLE - NAMES mpiexec - HINTS $ENV{MSMPI_BIN} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin" - DOC "Executable for running MPI programs.") - endif() - endif() - - # At this point there's not many MPIs that we could still consider. - # OpenMPI 1.6.x and below supported Windows, but these ship compiler wrappers that still work. - # The only other relevant MPI implementation without a wrapper is MPICH2, which had Windows support in 1.4.1p1 and older. - if(NOT MPI_GUESS_FOUND AND (NOT MPI_GUESS_LIBRARY_NAME OR "${MPI_GUESS_LIBRARY_NAME}" STREQUAL "MPICH2")) - set(MPI_MPICH_PREFIX_PATHS - "$ENV{ProgramW6432}/MPICH2/lib" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/../lib" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]/lib" - ) - - # All of C, C++ and Fortran will need mpi.lib, so we'll look for this first - find_library(MPI_mpi_LIBRARY - NAMES mpi - HINTS ${MPI_MPICH_PREFIX_PATHS}) - mark_as_advanced(MPI_mpi_LIBRARY) - # If we found mpi.lib, we detect the rest of MPICH2 - if(MPI_mpi_LIBRARY) - set(MPI_MPICH_LIB_NAMES "mpi") - # If MPI-2 C++ bindings are requested, we need to locate cxx.lib as well. - # Otherwise, MPICH_SKIP_MPICXX will be defined and these bindings aren't needed. - if("${LANG}" STREQUAL "CXX" AND NOT MPI_CXX_SKIP_MPICXX) - find_library(MPI_cxx_LIBRARY - NAMES cxx - HINTS ${MPI_MPICH_PREFIX_PATHS}) - mark_as_advanced(MPI_cxx_LIBRARY) - list(APPEND MPI_MPICH_LIB_NAMES "cxx") - # For Fortran, MPICH2 provides three different libraries: - # fmpich2.lib which uses uppercase symbols and cdecl, - # fmpich2s.lib which uses uppercase symbols and stdcall (32-bit only), - # fmpich2g.lib which uses lowercase symbols with double underscores and cdecl. - # fmpich2s.lib would be useful for Compaq Visual Fortran, fmpich2g.lib has to be used with GNU g77 and is also - # provided in the form of an .a archive for MinGW and Cygwin. From our perspective, fmpich2.lib is the only one - # we need to try, and if it doesn't work with the given Fortran compiler we'd find out later on during validation - elseif("${LANG}" STREQUAL "Fortran") - find_library(MPI_fmpich2_LIBRARY - NAMES fmpich2 - HINTS ${MPI_MPICH_PREFIX_PATHS}) - find_library(MPI_fmpich2s_LIBRARY - NAMES fmpich2s - HINTS ${MPI_MPICH_PREFIX_PATHS}) - find_library(MPI_fmpich2g_LIBRARY - NAMES fmpich2g - HINTS ${MPI_MPICH_PREFIX_PATHS}) - mark_as_advanced(MPI_fmpich2_LIBRARY MPI_fmpich2s_LIBRARY MPI_fmpich2g_LIBRARY) - list(APPEND MPI_MPICH_LIB_NAMES "fmpich2") - endif() - - if(NOT MPI_${LANG}_LIB_NAMES) - set(MPI_${LANG}_LIB_NAMES "${MPI_MPICH_LIB_NAMES}" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) - endif() - unset(MPI_MPICH_LIB_NAMES) - - if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) - # For MPICH2, the include folder would be in ../include relative to the library folder. - get_filename_component(MPI_MPICH_ROOT_DIR "${MPI_mpi_LIBRARY}" DIRECTORY) - get_filename_component(MPI_MPICH_ROOT_DIR "${MPI_MPICH_ROOT_DIR}" DIRECTORY) - if(IS_DIRECTORY "${MPI_MPICH_ROOT_DIR}/include") - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_MPICH_ROOT_DIR}/include" CACHE STRING "MPI ${LANG} additional include directory variables, given in the form MPI__INCLUDE_DIR." FORCE) - endif() - unset(MPI_MPICH_ROOT_DIR) - endif() - set(MPI_GUESS_FOUND TRUE) - - if(_MPIEXEC_NOT_GIVEN) - unset(MPIEXEC_EXECUTABLE CACHE) - endif() - - find_program(MPIEXEC_EXECUTABLE - NAMES ${_MPIEXEC_NAMES} - HINTS "$ENV{ProgramW6432}/MPICH2/bin" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]/bin" - DOC "Executable for running MPI programs.") - endif() - unset(MPI_MPICH_PREFIX_PATHS) - endif() - endif() - set(MPI_${LANG}_GUESS_FOUND "${MPI_GUESS_FOUND}" PARENT_SCOPE) -endfunction() - -function(_MPI_adjust_compile_definitions LANG) - if("${LANG}" STREQUAL "CXX") - # To disable the C++ bindings, we need to pass some definitions since the mpi.h header has to deal with both C and C++ - # bindings in MPI-2. - if(MPI_CXX_SKIP_MPICXX AND NOT MPI_${LANG}_COMPILE_DEFINITIONS MATCHES "SKIP_MPICXX") - # MPICH_SKIP_MPICXX is being used in MPICH and derivatives like MVAPICH or Intel MPI - # OMPI_SKIP_MPICXX is being used in Open MPI - # _MPICC_H is being used for IBM Platform MPI - list(APPEND MPI_${LANG}_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX" "OMPI_SKIP_MPICXX" "_MPICC_H") - set(MPI_${LANG}_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}" CACHE STRING "MPI ${LANG} compilation definitions" FORCE) - endif() - endif() -endfunction() - -macro(_MPI_assemble_libraries LANG) - set(MPI_${LANG}_LIBRARIES "") - # Only for libraries do we need to check whether the compiler's linking stage is separate. - if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS_IMPLICIT) - foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) - list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) - endforeach() - endif() -endmacro() - -macro(_MPI_assemble_include_dirs LANG) - if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") - set(MPI_${LANG}_INCLUDE_DIRS "") - else() - set(MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS}") - if("${LANG}" MATCHES "(C|CXX)") - if(MPI_${LANG}_HEADER_DIR) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") - endif() - else() # Fortran - if(MPI_${LANG}_F77_HEADER_DIR) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") - endif() - if(MPI_${LANG}_MODULE_DIR AND NOT "${MPI_${LANG}_MODULE_DIR}" IN_LIST MPI_${LANG}_INCLUDE_DIRS) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") - endif() - endif() - if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - foreach(MPI_ADDITIONAL_INC_DIR IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${MPI_ADDITIONAL_INC_DIR}_INCLUDE_DIR}") - endforeach() - endif() - endif() -endmacro() - -function(_MPI_split_include_dirs LANG) - if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") - return() - endif() - # Backwards compatibility: Search INCLUDE_PATH if given. - if(MPI_${LANG}_INCLUDE_PATH) - list(APPEND MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_INCLUDE_PATH}") - endif() - - # We try to find the headers/modules among those paths (and system paths) - # For C/C++, we just need to have a look for mpi.h. - if("${LANG}" MATCHES "(C|CXX)") - find_path(MPI_${LANG}_HEADER_DIR "mpi.h" - HINTS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} - ) - mark_as_advanced(MPI_${LANG}_HEADER_DIR) - if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) - list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") - endif() - # Fortran is more complicated here: An implementation could provide - # any of the Fortran 77/90/2008 APIs for MPI. For example, MSMPI - # only provides Fortran 77 and - if mpi.f90 is built - potentially - # a Fortran 90 module. - elseif("${LANG}" STREQUAL "Fortran") - find_path(MPI_${LANG}_F77_HEADER_DIR "mpif.h" - HINTS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} - ) - find_path(MPI_${LANG}_MODULE_DIR - NAMES "mpi.mod" "mpi_f08.mod" - HINTS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} - ) - if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) - list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS - "${MPI_${LANG}_F77_HEADER_DIR}" - "${MPI_${LANG}_MODULE_DIR}" - ) - endif() - mark_as_advanced(MPI_${LANG}_F77_HEADER_DIR MPI_${LANG}_MODULE_DIR) - endif() - # Remove duplicates and default system directories from the list. - if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) - list(REMOVE_DUPLICATES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) - foreach(MPI_IMPLICIT_INC_DIR IN LISTS CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) - list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_IMPLICIT_INC_DIR}) - endforeach() - endif() - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories" FORCE) -endfunction() - -macro(_MPI_create_imported_target LANG) - if(NOT TARGET MPI::MPI_${LANG}) - add_library(MPI::MPI_${LANG} INTERFACE IMPORTED) - endif() - - # When this is consumed for compiling CUDA, use '-Xcompiler' to wrap '-pthread'. - if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12 OR CMAKE_CUDA_COMPILER_LOADED) - string(REPLACE "-pthread" "$<$:SHELL:-Xcompiler >-pthread" - _MPI_${LANG}_COMPILE_OPTIONS "${MPI_${LANG}_COMPILE_OPTIONS}") - else() - set(_MPI_${LANG}_COMPILE_OPTIONS "${MPI_${LANG}_COMPILE_OPTIONS}") - endif() - set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_${LANG}_COMPILE_OPTIONS}") - unset(_MPI_${LANG}_COMPILE_OPTIONS) - - set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}") - - set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "") - if(MPI_${LANG}_LINK_FLAGS) - separate_arguments(_MPI_${LANG}_LINK_FLAGS ${_MPI_parse_kind} "${MPI_${LANG}_LINK_FLAGS}") - set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${_MPI_${LANG}_LINK_FLAGS}") - unset(_MPI_${LANG}_LINK_FLAGS) - endif() - # If the compiler links MPI implicitly, no libraries will be found as they're contained within - # CMAKE__IMPLICIT_LINK_LIBRARIES already. - if(MPI_${LANG}_LIBRARIES) - set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LIBRARIES}") - endif() - # Given the new design of FindMPI, INCLUDE_DIRS will always be located, even under implicit linking. - set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${MPI_${LANG}_INCLUDE_DIRS}") -endmacro() - -get_filename_component(_FindMPI_MODULE_DIR - "${CMAKE_CURRENT_LIST_FILE}" PATH) - -function(_MPI_try_staged_settings LANG MPI_TEST_FILE_NAME MODE RUN_BINARY SUPPRESS_ERRORS) - set(WORK_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI") - set(SRC_DIR "${_FindMPI_MODULE_DIR}/FindMPI") - set(BIN_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI/${MPI_TEST_FILE_NAME}_${LANG}.bin") - unset(MPI_TEST_COMPILE_DEFINITIONS) - if("${LANG}" STREQUAL "Fortran") - if("${MODE}" STREQUAL "F90_MODULE") - set(MPI_Fortran_INCLUDE_LINE "use mpi\n implicit none") - elseif("${MODE}" STREQUAL "F08_MODULE") - set(MPI_Fortran_INCLUDE_LINE "use mpi_f08\n implicit none") - else() # F77 header - set(MPI_Fortran_INCLUDE_LINE "implicit none\n include 'mpif.h'") - endif() - configure_file("${SRC_DIR}/${MPI_TEST_FILE_NAME}.f90.in" "${WORK_DIR}/${MPI_TEST_FILE_NAME}.f90" @ONLY) - set(MPI_TEST_SOURCE_FILE "${WORK_DIR}/${MPI_TEST_FILE_NAME}.f90") - elseif("${LANG}" STREQUAL "CXX") - configure_file("${SRC_DIR}/${MPI_TEST_FILE_NAME}.c" "${WORK_DIR}/${MPI_TEST_FILE_NAME}.cpp" COPYONLY) - set(MPI_TEST_SOURCE_FILE "${WORK_DIR}/${MPI_TEST_FILE_NAME}.cpp") - if("${MODE}" STREQUAL "TEST_MPICXX") - set(MPI_TEST_COMPILE_DEFINITIONS TEST_MPI_MPICXX) - endif() - else() # C - set(MPI_TEST_SOURCE_FILE "${SRC_DIR}/${MPI_TEST_FILE_NAME}.c") - endif() - if(RUN_BINARY) - try_run(MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} - "${CMAKE_BINARY_DIR}" SOURCES "${MPI_TEST_SOURCE_FILE}" - COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} - LINK_LIBRARIES MPI::MPI_${LANG} - RUN_OUTPUT_VARIABLE MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} - COMPILE_OUTPUT_VARIABLE _MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT) - set(MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} "${MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}}" PARENT_SCOPE) - else() - try_compile(MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} - "${CMAKE_BINARY_DIR}" SOURCES "${MPI_TEST_SOURCE_FILE}" - COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} - LINK_LIBRARIES MPI::MPI_${LANG} - COPY_FILE "${BIN_FILE}" - OUTPUT_VARIABLE _MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT) - endif() - if(NOT SUPPRESS_ERRORS) - if(NOT MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}) - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE} failed to compile with the following output:\n${_MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT}\n\n") - elseif(DEFINED MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} AND MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}) - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE} failed to run with the following output:\n${MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}}\n\n") - endif() - endif() -endfunction() - -macro(_MPI_check_lang_works LANG SUPPRESS_ERRORS) - # For Fortran we may have by the MPI-3 standard an implementation that provides: - # - the mpi_f08 module - # - *both*, the mpi module and 'mpif.h' - # Since older MPI standards (MPI-1) did not define anything but 'mpif.h', we need to check all three individually. - if( NOT MPI_${LANG}_WORKS ) - if("${LANG}" STREQUAL "Fortran") - set(MPI_Fortran_INTEGER_LINE "(kind=MPI_INTEGER_KIND)") - _MPI_try_staged_settings(${LANG} test_mpi F77_HEADER FALSE ${SUPPRESS_ERRORS}) - _MPI_try_staged_settings(${LANG} test_mpi F90_MODULE FALSE ${SUPPRESS_ERRORS}) - _MPI_try_staged_settings(${LANG} test_mpi F08_MODULE FALSE ${SUPPRESS_ERRORS}) - - set(MPI_${LANG}_WORKS FALSE) - - foreach(mpimethod IN ITEMS F77_HEADER F08_MODULE F90_MODULE) - if(MPI_RESULT_${LANG}_test_mpi_${mpimethod}) - set(MPI_${LANG}_WORKS TRUE) - set(MPI_${LANG}_HAVE_${mpimethod} TRUE) - else() - set(MPI_${LANG}_HAVE_${mpimethod} FALSE) - endif() - endforeach() - # MPI-1 versions had no MPI_INTGER_KIND defined, so we need to try without it. - # However, MPI-1 also did not define the Fortran 90 and 08 modules, so we only try the F77 header. - unset(MPI_Fortran_INTEGER_LINE) - if(NOT MPI_${LANG}_WORKS) - _MPI_try_staged_settings(${LANG} test_mpi F77_HEADER_NOKIND FALSE ${SUPPRESS_ERRORS}) - if(MPI_RESULT_${LANG}_test_mpi_F77_HEADER_NOKIND) - set(MPI_${LANG}_WORKS TRUE) - set(MPI_${LANG}_HAVE_F77_HEADER TRUE) - endif() - endif() - else() - _MPI_try_staged_settings(${LANG} test_mpi normal FALSE ${SUPPRESS_ERRORS}) - # If 'test_mpi' built correctly, we've found valid MPI settings. There might not be MPI-2 C++ support, but there can't - # be MPI-2 C++ support without the C bindings being present, so checking for them is sufficient. - set(MPI_${LANG}_WORKS "${MPI_RESULT_${LANG}_test_mpi_normal}") - endif() - endif() -endmacro() - -# Some systems install various MPI implementations in separate folders in some MPI prefix -# This macro enumerates all such subfolders and adds them to the list of hints that will be searched. -macro(MPI_search_mpi_prefix_folder PREFIX_FOLDER) - if(EXISTS "${PREFIX_FOLDER}") - file(GLOB _MPI_folder_children RELATIVE "${PREFIX_FOLDER}" "${PREFIX_FOLDER}/*") - foreach(_MPI_folder_child IN LISTS _MPI_folder_children) - if(IS_DIRECTORY "${PREFIX_FOLDER}/${_MPI_folder_child}") - list(APPEND MPI_HINT_DIRS "${PREFIX_FOLDER}/${_MPI_folder_child}") - endif() - endforeach() - endif() -endmacro() - -set(MPI_HINT_DIRS ${MPI_HOME} $ENV{MPI_HOME} $ENV{I_MPI_ROOT}) -if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") - # SUSE Linux Enterprise Server stores its MPI implementations under /usr/lib64/mpi/gcc/ - # We enumerate the subfolders and append each as a prefix - MPI_search_mpi_prefix_folder("/usr/lib64/mpi/gcc") -elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "FreeBSD") - # FreeBSD ships mpich under the normal system paths - but available openmpi implementations - # will be found in /usr/local/mpi/ - MPI_search_mpi_prefix_folder("/usr/local/mpi") -endif() - -# Most MPI distributions have some form of mpiexec or mpirun which gives us something we can look for. -# The MPI standard does not mandate the existence of either, but instead only makes requirements if a distribution -# ships an mpiexec program (mpirun executables are not regulated by the standard). - -# We defer searching for mpiexec binaries belonging to guesses until later. By doing so, mismatches between mpiexec -# and the MPI we found should be reduced. -if(NOT MPIEXEC_EXECUTABLE) - set(_MPIEXEC_NOT_GIVEN TRUE) -else() - set(_MPIEXEC_NOT_GIVEN FALSE) -endif() - -find_program(MPIEXEC_EXECUTABLE - NAMES ${_MPIEXEC_NAMES} - PATH_SUFFIXES bin sbin - HINTS ${MPI_HINT_DIRS} - DOC "Executable for running MPI programs.") - -# call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin). -# This gives us a fairly reliable base directory to search for /bin /lib and /include from. -get_filename_component(_MPI_BASE_DIR "${MPIEXEC_EXECUTABLE}" PATH) -get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH) - -# According to the MPI standard, section 8.8 -n is a guaranteed, and the only guaranteed way to -# launch an MPI process using mpiexec if such a program exists. -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "Flag used by MPI to specify the number of processes for mpiexec; the next option will be the number of processes.") -set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by mpiexec.") -set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will be placed after all flags passed to mpiexec.") - -# Set the number of processes to the physical processor count -cmake_host_system_information(RESULT _MPIEXEC_NUMPROCS QUERY NUMBER_OF_PHYSICAL_CORES) -set(MPIEXEC_MAX_NUMPROCS "${_MPIEXEC_NUMPROCS}" CACHE STRING "Maximum number of processors available to run MPI applications.") -unset(_MPIEXEC_NUMPROCS) -mark_as_advanced(MPIEXEC_EXECUTABLE MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS) - -#============================================================================= -# Backward compatibility input hacks. Propagate the FindMPI hints to C and -# CXX if the respective new versions are not defined. Translate the old -# MPI_LIBRARY and MPI_EXTRA_LIBRARY to respective MPI_${LANG}_LIBRARIES. -# -# Once we find the new variables, we translate them back into their old -# equivalents below. -if(NOT MPI_IGNORE_LEGACY_VARIABLES) - foreach (LANG IN ITEMS C CXX) - # Old input variables. - set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) - - # Set new vars based on their old equivalents, if the new versions are not already set. - foreach (var ${_MPI_OLD_INPUT_VARS}) - if (NOT MPI_${LANG}_${var} AND MPI_${var}) - set(MPI_${LANG}_${var} "${MPI_${var}}") - endif() - endforeach() - - # Chop the old compile flags into options and definitions - - unset(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) - unset(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) - if(MPI_${LANG}_COMPILE_FLAGS) - separate_arguments(MPI_SEPARATE_FLAGS ${_MPI_parse_kind} "${MPI_${LANG}_COMPILE_FLAGS}") - foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) - if("${_MPI_FLAG}" MATCHES "^ *-D([^ ]+)") - list(APPEND MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") - else() - list(APPEND MPI_${LANG}_EXTRA_COMPILE_OPTIONS "${_MPI_FLAG}") - endif() - endforeach() - unset(MPI_SEPARATE_FLAGS) - endif() - - # If a list of libraries was given, we'll split it into new-style cache variables - unset(MPI_${LANG}_EXTRA_LIB_NAMES) - if(NOT MPI_${LANG}_LIB_NAMES) - foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) - if(_MPI_LIB) - get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) - get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) - get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) - list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") - find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY - NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" - HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} - DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" - ) - mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) - endif() - endforeach() - endif() - endforeach() -endif() -#============================================================================= - -unset(MPI_VERSION) -unset(MPI_VERSION_MAJOR) -unset(MPI_VERSION_MINOR) - -unset(_MPI_MIN_VERSION) - -# If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. -if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) - set(MPI_SKIP_COMPILER_WRAPPER TRUE) -endif() - -# This loop finds the compilers and sends them off for interrogation. -foreach(LANG IN ITEMS C CXX Fortran) - if(CMAKE_${LANG}_COMPILER_LOADED) - if(NOT MPI_FIND_COMPONENTS) - set(_MPI_FIND_${LANG} TRUE) - elseif( ${LANG} IN_LIST MPI_FIND_COMPONENTS) - set(_MPI_FIND_${LANG} TRUE) - elseif( ${LANG} STREQUAL CXX AND NOT MPI_CXX_SKIP_MPICXX AND MPICXX IN_LIST MPI_FIND_COMPONENTS ) - set(_MPI_FIND_${LANG} TRUE) - else() - set(_MPI_FIND_${LANG} FALSE) - endif() - else() - set(_MPI_FIND_${LANG} FALSE) - endif() - if(_MPI_FIND_${LANG}) - if( ${LANG} STREQUAL CXX AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS ) - set(MPI_CXX_SKIP_MPICXX FALSE CACHE BOOL "If true, the MPI-2 C++ bindings are disabled using definitions.") - mark_as_advanced(MPI_CXX_SKIP_MPICXX) - endif() - if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS))) - set(MPI_${LANG}_TRIED_IMPLICIT FALSE) - set(MPI_${LANG}_WORKS_IMPLICIT FALSE) - if(NOT MPI_${LANG}_COMPILER AND NOT MPI_ASSUME_NO_BUILTIN_MPI) - # Should the imported targets be empty, we effectively try whether the compiler supports MPI on its own, which is the case on e.g. - # Cray PrgEnv. - _MPI_create_imported_target(${LANG}) - _MPI_check_lang_works(${LANG} TRUE) - - # If the compiler can build MPI code on its own, it functions as an MPI compiler and we'll set the variable to point to it. - if(MPI_${LANG}_WORKS) - set(MPI_${LANG}_COMPILER "${CMAKE_${LANG}_COMPILER}" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) - set(MPI_${LANG}_WORKS_IMPLICIT TRUE) - endif() - set(MPI_${LANG}_TRIED_IMPLICIT TRUE) - endif() - - if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS) - set(MPI_${LANG}_WRAPPER_FOUND FALSE) - set(MPI_PINNED_COMPILER FALSE) - - if(NOT MPI_SKIP_COMPILER_WRAPPER) - if(MPI_${LANG}_COMPILER) - # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. - if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") - # Get rid of our default list of names and just search for the name the user wants. - set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") - unset(MPI_${LANG}_COMPILER CACHE) - endif() - # If the user specifies a compiler, we don't want to try to search libraries either. - set(MPI_PINNED_COMPILER TRUE) - endif() - - # If we have an MPI base directory, we'll try all compiler names in that one first. - # This should prevent mixing different MPI environments - if(_MPI_BASE_DIR) - find_program(MPI_${LANG}_COMPILER - NAMES ${_MPI_${LANG}_COMPILER_NAMES} - PATH_SUFFIXES bin sbin - HINTS ${_MPI_BASE_DIR} - NO_DEFAULT_PATH - DOC "MPI compiler for ${LANG}" - ) - endif() - - # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), - # we shall try searching in the default paths. - find_program(MPI_${LANG}_COMPILER - NAMES ${_MPI_${LANG}_COMPILER_NAMES} - PATH_SUFFIXES bin sbin - DOC "MPI compiler for ${LANG}" - ) - - if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") - set(MPI_PINNED_COMPILER TRUE) - - # If we haven't made the implicit compiler test yet, perform it now. - if(NOT MPI_${LANG}_TRIED_IMPLICIT) - _MPI_create_imported_target(${LANG}) - _MPI_check_lang_works(${LANG} TRUE) - endif() - - # Should the MPI compiler not work implicitly for MPI, still interrogate it. - # Otherwise, MPI compilers for which CMake has separate linking stages, e.g. Intel MPI on Windows where link.exe is being used - # directly during linkage instead of CMAKE__COMPILER will not work. - if(NOT MPI_${LANG}_WORKS) - set(MPI_${LANG}_WORKS_IMPLICIT FALSE) - _MPI_interrogate_compiler(${LANG}) - else() - set(MPI_${LANG}_WORKS_IMPLICIT TRUE) - endif() - elseif(MPI_${LANG}_COMPILER) - _MPI_interrogate_compiler(${LANG}) - endif() - endif() - - if(NOT MPI_PINNED_COMPILER AND NOT MPI_${LANG}_WRAPPER_FOUND) - # If MPI_PINNED_COMPILER wasn't given, and the MPI compiler we potentially found didn't work, we withdraw it. - set(MPI_${LANG}_COMPILER "MPI_${LANG}_COMPILER-NOTFOUND" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) - if(NOT MPI_SKIP_GUESSING) - # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the - # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. - if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) - set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) - set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories") - set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) - set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) - else() - _MPI_guess_settings(${LANG}) - endif() - endif() - endif() - endif() - endif() - - _MPI_split_include_dirs(${LANG}) - _MPI_assemble_include_dirs(${LANG}) - _MPI_assemble_libraries(${LANG}) - - _MPI_adjust_compile_definitions(${LANG}) - # We always create imported targets even if they're empty - _MPI_create_imported_target(${LANG}) - - if(NOT MPI_${LANG}_WORKS) - _MPI_check_lang_works(${LANG} FALSE) - endif() - - # Next, we'll initialize the MPI variables that have not been previously set. - set(MPI_${LANG}_COMPILE_OPTIONS "" CACHE STRING "MPI ${LANG} compilation flags" ) - set(MPI_${LANG}_COMPILE_DEFINITIONS "" CACHE STRING "MPI ${LANG} compilation definitions" ) - set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} additional include directories") - set(MPI_${LANG}_LINK_FLAGS "" CACHE STRING "MPI ${LANG} linker flags" ) - if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) - set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) - endif() - mark_as_advanced(MPI_${LANG}_COMPILE_OPTIONS MPI_${LANG}_COMPILE_DEFINITIONS MPI_${LANG}_LINK_FLAGS - MPI_${LANG}_LIB_NAMES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS MPI_${LANG}_COMPILER) - - # If we've found MPI, then we'll perform additional analysis: Determine the MPI version, MPI library version, supported - # MPI APIs (i.e. MPI-2 C++ bindings). For Fortran we also need to find specific parameters if we're under MPI-3. - if(MPI_${LANG}_WORKS) - if("${LANG}" STREQUAL "CXX" AND NOT DEFINED MPI_MPICXX_FOUND) - if(NOT MPI_CXX_SKIP_MPICXX AND NOT MPI_CXX_VALIDATE_SKIP_MPICXX) - _MPI_try_staged_settings(${LANG} test_mpi MPICXX FALSE FALSE) - if(MPI_RESULT_${LANG}_test_mpi_MPICXX) - set(MPI_MPICXX_FOUND TRUE) - else() - set(MPI_MPICXX_FOUND FALSE) - endif() - else() - set(MPI_MPICXX_FOUND FALSE) - endif() - endif() - - # At this point, we know the bindings present but not the MPI version or anything else. - if(NOT DEFINED MPI_${LANG}_VERSION) - unset(MPI_${LANG}_VERSION_MAJOR) - unset(MPI_${LANG}_VERSION_MINOR) - endif() - set(MPI_BIN_FOLDER ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI) - - # For Fortran, we'll want to use the most modern MPI binding to test capabilities other than the - # Fortran parameters, since those depend on the method of consumption. - # For C++, we can always use the C bindings, and should do so, since the C++ bindings do not exist in MPI-3 - # whereas the C bindings do, and the C++ bindings never offered any feature advantage over their C counterparts. - if("${LANG}" STREQUAL "Fortran") - if(MPI_${LANG}_HAVE_F08_MODULE) - set(MPI_${LANG}_HIGHEST_METHOD F08_MODULE) - elseif(MPI_${LANG}_HAVE_F90_MODULE) - set(MPI_${LANG}_HIGHEST_METHOD F90_MODULE) - else() - set(MPI_${LANG}_HIGHEST_METHOD F77_HEADER) - endif() - - # Another difference between C and Fortran is that we can't use the preprocessor to determine whether MPI_VERSION - # and MPI_SUBVERSION are provided. These defines did not exist in MPI 1.0 and 1.1 and therefore might not - # exist. For C/C++, test_mpi.c will handle the MPI_VERSION extraction, but for Fortran, we need mpiver.f90. - if(NOT DEFINED MPI_${LANG}_VERSION) - _MPI_try_staged_settings(${LANG} mpiver ${MPI_${LANG}_HIGHEST_METHOD} FALSE FALSE) - if(MPI_RESULT_${LANG}_mpiver_${MPI_${LANG}_HIGHEST_METHOD}) - file(STRINGS ${MPI_BIN_FOLDER}/mpiver_${LANG}.bin _MPI_VERSION_STRING LIMIT_COUNT 1 REGEX "INFO:MPI-VER") - if("${_MPI_VERSION_STRING}" MATCHES ".*INFO:MPI-VER\\[([0-9]+)\\.([0-9]+)\\].*") - set(MPI_${LANG}_VERSION_MAJOR "${CMAKE_MATCH_1}") - set(MPI_${LANG}_VERSION_MINOR "${CMAKE_MATCH_2}") - set(MPI_${LANG}_VERSION "${MPI_${LANG}_VERSION_MAJOR}.${MPI_${LANG}_VERSION_MINOR}") - endif() - endif() - endif() - - # Finally, we want to find out which capabilities a given interface supports, compare the MPI-3 standard. - # This is determined by interface specific parameters MPI_SUBARRAYS_SUPPORTED and MPI_ASYNC_PROTECTS_NONBLOCKING - # and might vary between the different methods of consumption. - if(MPI_DETERMINE_Fortran_CAPABILITIES AND NOT MPI_Fortran_CAPABILITIES_DETERMINED) - foreach(mpimethod IN ITEMS F08_MODULE F90_MODULE F77_HEADER) - if(MPI_${LANG}_HAVE_${mpimethod}) - set(MPI_${LANG}_${mpimethod}_SUBARRAYS FALSE) - set(MPI_${LANG}_${mpimethod}_ASYNCPROT FALSE) - _MPI_try_staged_settings(${LANG} fortranparam_mpi ${mpimethod} TRUE FALSE) - if(MPI_RESULT_${LANG}_fortranparam_mpi_${mpimethod} AND - NOT "${MPI_RUN_RESULT_${LANG}_fortranparam_mpi_${mpimethod}}" STREQUAL "FAILED_TO_RUN") - if("${MPI_RUN_OUTPUT_${LANG}_fortranparam_mpi_${mpimethod}}" MATCHES - ".*INFO:SUBARRAYS\\[ *([TF]) *\\]-ASYNCPROT\\[ *([TF]) *\\].*") - if("${CMAKE_MATCH_1}" STREQUAL "T") - set(MPI_${LANG}_${mpimethod}_SUBARRAYS TRUE) - endif() - if("${CMAKE_MATCH_2}" STREQUAL "T") - set(MPI_${LANG}_${mpimethod}_ASYNCPROT TRUE) - endif() - endif() - endif() - endif() - endforeach() - set(MPI_Fortran_CAPABILITIES_DETERMINED TRUE) - endif() - else() - set(MPI_${LANG}_HIGHEST_METHOD normal) - - # By the MPI-2 standard, MPI_VERSION and MPI_SUBVERSION are valid for both C and C++ bindings. - if(NOT DEFINED MPI_${LANG}_VERSION) - file(STRINGS ${MPI_BIN_FOLDER}/test_mpi_${LANG}.bin _MPI_VERSION_STRING LIMIT_COUNT 1 REGEX "INFO:MPI-VER") - if("${_MPI_VERSION_STRING}" MATCHES ".*INFO:MPI-VER\\[([0-9]+)\\.([0-9]+)\\].*") - set(MPI_${LANG}_VERSION_MAJOR "${CMAKE_MATCH_1}") - set(MPI_${LANG}_VERSION_MINOR "${CMAKE_MATCH_2}") - set(MPI_${LANG}_VERSION "${MPI_${LANG}_VERSION_MAJOR}.${MPI_${LANG}_VERSION_MINOR}") - endif() - endif() - endif() - - unset(MPI_BIN_FOLDER) - - # At this point, we have dealt with determining the MPI version and parameters for each Fortran method available. - # The one remaining issue is to determine which MPI library is installed. - # Determining the version and vendor of the MPI library is only possible via MPI_Get_library_version() at runtime, - # and therefore we cannot do this while cross-compiling (a user may still define MPI__LIBRARY_VERSION_STRING - # themselves and we'll attempt splitting it, which is equivalent to provide the try_run output). - # It's also worth noting that the installed version string can depend on the language, or on the system the binary - # runs on if MPI is not statically linked. - if(MPI_DETERMINE_LIBRARY_VERSION AND NOT MPI_${LANG}_LIBRARY_VERSION_STRING) - _MPI_try_staged_settings(${LANG} libver_mpi ${MPI_${LANG}_HIGHEST_METHOD} TRUE FALSE) - if(MPI_RESULT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD} AND - "${MPI_RUN_RESULT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD}}" EQUAL "0") - string(STRIP "${MPI_RUN_OUTPUT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD}}" - MPI_${LANG}_LIBRARY_VERSION_STRING) - else() - set(MPI_${LANG}_LIBRARY_VERSION_STRING "NOTFOUND") - endif() - endif() - endif() - - set(MPI_${LANG}_FIND_QUIETLY ${MPI_FIND_QUIETLY}) - set(MPI_${LANG}_FIND_VERSION ${MPI_FIND_VERSION}) - set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) - - unset(MPI_${LANG}_REQUIRED_VARS) - if (NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") - foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES) - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY") - endforeach() - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_LIB_NAMES") - if("${LANG}" STREQUAL "Fortran") - # For Fortran we only need one of the module or header directories to have *some* support for MPI. - if(NOT MPI_${LANG}_MODULE_DIR) - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_F77_HEADER_DIR") - endif() - if(NOT MPI_${LANG}_F77_HEADER_DIR) - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_MODULE_DIR") - endif() - else() - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_HEADER_DIR") - endif() - if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - foreach(mpiincvar IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpiincvar}_INCLUDE_DIR") - endforeach() - endif() - # Append the works variable now. If the settings did not work, this will show up properly. - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_WORKS") - else() - # If the compiler worked implicitly, use its path as output. - # Should the compiler variable be set, we also require it to work. - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_COMPILER") - if(MPI_${LANG}_COMPILER) - list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_WORKS") - endif() - endif() - find_package_handle_standard_args(MPI_${LANG} REQUIRED_VARS ${MPI_${LANG}_REQUIRED_VARS} - VERSION_VAR MPI_${LANG}_VERSION) - - if(DEFINED MPI_${LANG}_VERSION) - if(NOT _MPI_MIN_VERSION OR _MPI_MIN_VERSION VERSION_GREATER MPI_${LANG}_VERSION) - set(_MPI_MIN_VERSION MPI_${LANG}_VERSION) - endif() - endif() - endif() -endforeach() - -unset(_MPI_REQ_VARS) -foreach(LANG IN ITEMS C CXX Fortran) - if((NOT MPI_FIND_COMPONENTS AND CMAKE_${LANG}_COMPILER_LOADED) OR LANG IN_LIST MPI_FIND_COMPONENTS) - list(APPEND _MPI_REQ_VARS "MPI_${LANG}_FOUND") - endif() -endforeach() - -if(MPICXX IN_LIST MPI_FIND_COMPONENTS) - list(APPEND _MPI_REQ_VARS "MPI_MPICXX_FOUND") -endif() - -find_package_handle_standard_args(MPI - REQUIRED_VARS ${_MPI_REQ_VARS} - VERSION_VAR ${_MPI_MIN_VERSION} - HANDLE_COMPONENTS) - -#============================================================================= -# More backward compatibility stuff - -# For compatibility reasons, we also define MPIEXEC -set(MPIEXEC "${MPIEXEC_EXECUTABLE}") - -# Copy over MPI__INCLUDE_PATH from the assembled INCLUDE_DIRS. -foreach(LANG IN ITEMS C CXX Fortran) - if(MPI_${LANG}_FOUND) - set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}") - unset(MPI_${LANG}_COMPILE_FLAGS) - if(MPI_${LANG}_COMPILE_OPTIONS) - if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) - list(JOIN MPI_${LANG}_COMPILE_OPTIONS " " MPI_${LANG}_COMPILE_FLAGS) - else() - foreach(_MPI_OPT IN LISTS MPI_${LANG}_COMPILE_OPTIONS) - string(APPEND MPI_${LANG}_COMPILE_FLAGS " ${_MPI_OPT}") - endforeach() - endif() - endif() - if(MPI_${LANG}_COMPILE_DEFINITIONS) - foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS) - string(APPEND MPI_${LANG}_COMPILE_FLAGS " -D${_MPI_DEF}") - endforeach() - endif() - endif() -endforeach() - -# Bare MPI sans ${LANG} vars are set to CXX then C, depending on what was found. -# This mimics the behavior of the old language-oblivious FindMPI. -set(_MPI_OLD_VARS COMPILER INCLUDE_PATH COMPILE_FLAGS LINK_FLAGS LIBRARIES) -if (MPI_CXX_FOUND) - foreach (var ${_MPI_OLD_VARS}) - set(MPI_${var} ${MPI_CXX_${var}}) - endforeach() -elseif (MPI_C_FOUND) - foreach (var ${_MPI_OLD_VARS}) - set(MPI_${var} ${MPI_C_${var}}) - endforeach() -endif() - -# Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and MPI_EXTRA_LIBRARY, and set them in cache. -if (MPI_LIBRARIES) - list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK) - set(MPI_LIBRARY "${MPI_LIBRARY_WORK}") - unset(MPI_LIBRARY_WORK) -else() - set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND") -endif() - -list(LENGTH MPI_LIBRARIES MPI_NUMLIBS) -if (MPI_NUMLIBS GREATER 1) - set(MPI_EXTRA_LIBRARY_WORK "${MPI_LIBRARIES}") - list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0) - set(MPI_EXTRA_LIBRARY "${MPI_EXTRA_LIBRARY_WORK}") - unset(MPI_EXTRA_LIBRARY_WORK) -else() - set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND") -endif() -set(MPI_IGNORE_LEGACY_VARIABLES TRUE) -#============================================================================= - -# unset these vars to cleanup namespace -unset(_MPI_OLD_VARS) -unset(_MPI_PREFIX_PATH) -unset(_MPI_BASE_DIR) -foreach (lang C CXX Fortran) - unset(_MPI_${LANG}_COMPILER_NAMES) -endforeach() - -cmake_policy(POP) diff --git a/CMake/patches/3.16/FindMPI/libver_mpi.c b/CMake/patches/3.16/FindMPI/libver_mpi.c deleted file mode 100644 index 849cd11f7..000000000 --- a/CMake/patches/3.16/FindMPI/libver_mpi.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - -#ifdef __cplusplus -#include -#else -#include -#endif - -int main(int argc, char* argv[]) -{ - char mpilibver_str[MPI_MAX_LIBRARY_VERSION_STRING]; - int mpilibver_len; - MPI_Get_library_version(mpilibver_str, &mpilibver_len); -#ifdef __cplusplus - std::puts(mpilibver_str); -#else - puts(mpilibver_str); -#endif - return 0; -} diff --git a/CMake/patches/3.16/FindMPI/test_mpi.c b/CMake/patches/3.16/FindMPI/test_mpi.c deleted file mode 100644 index bc7d2ae4f..000000000 --- a/CMake/patches/3.16/FindMPI/test_mpi.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#ifdef __cplusplus -#include -#else -#include -#endif - -#if defined(MPI_VERSION) && defined(MPI_SUBVERSION) -const char mpiver_str[] = { 'I', 'N', 'F', 'O', ':', 'M', 'P', 'I', '-', 'V', 'E', 'R', '[', - ('0' + MPI_VERSION), '.', ('0' + MPI_SUBVERSION), ']', '\0' }; -#endif - -int main(int argc, char* argv[]) -{ -#if defined(MPI_VERSION) && defined(MPI_SUBVERSION) -#ifdef __cplusplus - std::puts(mpiver_str); -#else - puts(mpiver_str); -#endif -#endif -#ifdef TEST_MPI_MPICXX - MPI::MPI_Init(&argc, &argv); - MPI::MPI_Finalize(); -#else - MPI_Init(&argc, &argv); - MPI_Finalize(); -#endif - return 0; -} diff --git a/CMake/patches/3.18/FindPython/Support.cmake b/CMake/patches/3.18/FindPython/Support.cmake index 0879537ed..de1e98ec9 100644 --- a/CMake/patches/3.18/FindPython/Support.cmake +++ b/CMake/patches/3.18/FindPython/Support.cmake @@ -15,27 +15,6 @@ if (_${_PYTHON_PREFIX}_LOOKUP_POLICY) cmake_policy (SET CMP0094 ${_${_PYTHON_PREFIX}_LOOKUP_POLICY}) endif() -if (CMAKE_VERSION VERSION_LESS 3.12) - function (_find_python_list_transform list actn) - set(_result) - if (CMAKE_VERSION VERSION_LESS 3.10 AND actn STREQUAL "PREPEND") - foreach(_item IN LISTS ${list}) - list(APPEND _result ${ARGN}${_item}) - endforeach() - else() - foreach(_item IN LISTS ${list}) - string(${actn} _item ${ARGN}) - list(APPEND _result ${_item}) - endforeach() - endif() - set(${list} ${_result} PARENT_SCOPE) - endfunction() -else() - macro(_find_python_list_transform) - list (TRANSFORM ${ARGN}) - endmacro() -endif() - # # Initial configuration # @@ -195,14 +174,14 @@ function (_PYTHON_GET_ABIFLAGS _PGABIFLAGS) if (pydebug STREQUAL "ON") if (abiflags) - _find_python_list_transform (abiflags PREPEND "d") + list (TRANSFORM abiflags PREPEND "d") else() set (abiflags "d") endif() elseif (pydebug STREQUAL "ANY") if (abiflags) set (flags "${abiflags}") - _find_python_list_transform (flags PREPEND "d") + list (TRANSFORM flags PREPEND "d") list (APPEND abiflags "${flags}") else() set (abiflags "" "d") @@ -231,8 +210,8 @@ function (_PYTHON_GET_PATH_SUFFIXES _PYTHON_PGPS_PATH_SUFFIXES) if (CMAKE_LIBRARY_ARCHITECTURE) set (suffixes "${abi}") if (suffixes) - _find_python_list_transform (suffixes PREPEND "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}") - _find_python_list_transform (suffixes APPEND "-${CMAKE_LIBRARY_ARCHITECTURE}") + list (TRANSFORM suffixes PREPEND "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}") + list (TRANSFORM suffixes APPEND "-${CMAKE_LIBRARY_ARCHITECTURE}") else() set (suffixes "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}-${CMAKE_LIBRARY_ARCHITECTURE}") endif() @@ -240,7 +219,7 @@ function (_PYTHON_GET_PATH_SUFFIXES _PYTHON_PGPS_PATH_SUFFIXES) endif() set (suffixes "${abi}") if (suffixes) - _find_python_list_transform (suffixes PREPEND "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}") + list (TRANSFORM suffixes PREPEND "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}") else() set (suffixes "lib/python${_PGPS_VERSION}/config-${_PGPS_VERSION}") endif() @@ -248,7 +227,7 @@ function (_PYTHON_GET_PATH_SUFFIXES _PYTHON_PGPS_PATH_SUFFIXES) elseif (_PGPS_INCLUDE) set (suffixes "${abi}") if (suffixes) - _find_python_list_transform (suffixes PREPEND "include/python${_PGPS_VERSION}") + list (TRANSFORM suffixes PREPEND "include/python${_PGPS_VERSION}") else() set (suffixes "include/python${_PGPS_VERSION}") endif() @@ -288,14 +267,14 @@ function (_PYTHON_GET_NAMES _PYTHON_PGN_NAMES) if (abi) if (_PGN_CONFIG AND DEFINED CMAKE_LIBRARY_ARCHITECTURE) set (abinames "${abi}") - _find_python_list_transform (abinames PREPEND "${CMAKE_LIBRARY_ARCHITECTURE}-python${_PGN_VERSION}") - _find_python_list_transform (abinames APPEND "-config") + list (TRANSFORM abinames PREPEND "${CMAKE_LIBRARY_ARCHITECTURE}-python${_PGN_VERSION}") + list (TRANSFORM abinames APPEND "-config") list (APPEND names ${abinames}) endif() set (abinames "${abi}") - _find_python_list_transform (abinames PREPEND "python${_PGN_VERSION}") + list (TRANSFORM abinames PREPEND "python${_PGN_VERSION}") if (_PGN_CONFIG) - _find_python_list_transform (abinames APPEND "-config") + list (TRANSFORM abinames APPEND "-config") endif() list (APPEND names ${abinames}) else() @@ -304,7 +283,7 @@ function (_PYTHON_GET_NAMES _PYTHON_PGN_NAMES) endif() list (APPEND abinames "python${_PGN_VERSION}") if (_PGN_CONFIG) - _find_python_list_transform (abinames APPEND "-config") + list (TRANSFORM abinames APPEND "-config") endif() list (APPEND names ${abinames}) endif() @@ -917,8 +896,8 @@ else() if (DEFINED ${_PYTHON_PREFIX}_FIND_ABI) # normalization string (TOUPPER "${${_PYTHON_PREFIX}_FIND_ABI}" _${_PYTHON_PREFIX}_FIND_ABI) - _find_python_list_transform (_${_PYTHON_PREFIX}_FIND_ABI REPLACE "^(TRUE|Y(ES)?|1)$" "ON") - _find_python_list_transform (_${_PYTHON_PREFIX}_FIND_ABI REPLACE "^(FALSE|N(O)?|0)$" "OFF") + list (TRANSFORM _${_PYTHON_PREFIX}_FIND_ABI REPLACE "^(TRUE|Y(ES)?|1)$" "ON") + list (TRANSFORM _${_PYTHON_PREFIX}_FIND_ABI REPLACE "^(FALSE|N(O)?|0)$" "OFF") if (NOT _${_PYTHON_PREFIX}_FIND_ABI MATCHES "^(ON|OFF|ANY);(ON|OFF|ANY);(ON|OFF|ANY)$") message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: ${${_PYTHON_PREFIX}_FIND_ABI}: invalid value for '${_PYTHON_PREFIX}_FIND_ABI'. Ignore it") unset (_${_PYTHON_PREFIX}_FIND_ABI) diff --git a/CMake/patches/3.19/FindJPEG.cmake b/CMake/patches/3.19/FindJPEG.cmake new file mode 100644 index 000000000..596de5985 --- /dev/null +++ b/CMake/patches/3.19/FindJPEG.cmake @@ -0,0 +1,136 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindJPEG +-------- + +Find the Joint Photographic Experts Group (JPEG) library (``libjpeg``) + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` targets: + +``JPEG::JPEG`` + The JPEG library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``JPEG_FOUND`` + If false, do not try to use JPEG. +``JPEG_INCLUDE_DIRS`` + where to find jpeglib.h, etc. +``JPEG_LIBRARIES`` + the libraries needed to use JPEG. +``JPEG_VERSION`` + the version of the JPEG library found + +Cache variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``JPEG_INCLUDE_DIRS`` + where to find jpeglib.h, etc. +``JPEG_LIBRARY_RELEASE`` + where to find the JPEG library (optimized). +``JPEG_LIBRARY_DEBUG`` + where to find the JPEG library (debug). + +Obsolete variables +^^^^^^^^^^^^^^^^^^ + +``JPEG_INCLUDE_DIR`` + where to find jpeglib.h, etc. (same as JPEG_INCLUDE_DIRS) +``JPEG_LIBRARY`` + where to find the JPEG library. +#]=======================================================================] + +find_path(JPEG_INCLUDE_DIR jpeglib.h) + +set(jpeg_names ${JPEG_NAMES} jpeg jpeg-static libjpeg libjpeg-static) +foreach(name ${jpeg_names}) + list(APPEND jpeg_names_debug "${name}d") +endforeach() + +if(NOT JPEG_LIBRARY) + find_library(JPEG_LIBRARY_RELEASE NAMES ${jpeg_names} NAMES_PER_DIR) + find_library(JPEG_LIBRARY_DEBUG NAMES ${jpeg_names_debug} NAMES_PER_DIR) + include(SelectLibraryConfigurations) + select_library_configurations(JPEG) + mark_as_advanced(JPEG_LIBRARY_RELEASE JPEG_LIBRARY_DEBUG) +endif() +unset(jpeg_names) +unset(jpeg_names_debug) + +if(JPEG_INCLUDE_DIR) + file(GLOB _JPEG_CONFIG_HEADERS_FEDORA "${JPEG_INCLUDE_DIR}/jconfig*.h") + file(GLOB _JPEG_CONFIG_HEADERS_DEBIAN "${JPEG_INCLUDE_DIR}/*/jconfig.h") + set(_JPEG_CONFIG_HEADERS + "${JPEG_INCLUDE_DIR}/jpeglib.h" + ${_JPEG_CONFIG_HEADERS_FEDORA} + ${_JPEG_CONFIG_HEADERS_DEBIAN}) + foreach (_JPEG_CONFIG_HEADER IN LISTS _JPEG_CONFIG_HEADERS) + if (NOT EXISTS "${_JPEG_CONFIG_HEADER}") + continue () + endif () + file(STRINGS "${_JPEG_CONFIG_HEADER}" + jpeg_lib_version REGEX "^#define[\t ]+JPEG_LIB_VERSION[\t ]+.*") + + if (NOT jpeg_lib_version) + continue () + endif () + + string(REGEX REPLACE "^#define[\t ]+JPEG_LIB_VERSION[\t ]+([0-9]+).*" + "\\1" JPEG_VERSION "${jpeg_lib_version}") + break () + endforeach () + unset(jpeg_lib_version) + unset(_JPEG_CONFIG_HEADER) + unset(_JPEG_CONFIG_HEADERS) + unset(_JPEG_CONFIG_HEADERS_FEDORA) + unset(_JPEG_CONFIG_HEADERS_DEBIAN) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(JPEG + REQUIRED_VARS JPEG_LIBRARY JPEG_INCLUDE_DIR + VERSION_VAR JPEG_VERSION) + +if(JPEG_FOUND) + set(JPEG_LIBRARIES ${JPEG_LIBRARY}) + set(JPEG_INCLUDE_DIRS "${JPEG_INCLUDE_DIR}") + + if(NOT TARGET JPEG::JPEG) + add_library(JPEG::JPEG UNKNOWN IMPORTED) + if(JPEG_INCLUDE_DIRS) + set_target_properties(JPEG::JPEG PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${JPEG_INCLUDE_DIRS}") + endif() + if(EXISTS "${JPEG_LIBRARY}") + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${JPEG_LIBRARY}") + endif() + if(EXISTS "${JPEG_LIBRARY_RELEASE}") + set_property(TARGET JPEG::JPEG APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${JPEG_LIBRARY_RELEASE}") + endif() + if(EXISTS "${JPEG_LIBRARY_DEBUG}") + set_property(TARGET JPEG::JPEG APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${JPEG_LIBRARY_DEBUG}") + endif() + endif() +endif() + +mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIR) diff --git a/CMake/patches/3.19/FindLibArchive.cmake b/CMake/patches/3.19/FindLibArchive.cmake new file mode 100644 index 000000000..6fbdd2137 --- /dev/null +++ b/CMake/patches/3.19/FindLibArchive.cmake @@ -0,0 +1,76 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindLibArchive +-------------- + +Find libarchive library and headers. +Libarchive is multi-format archive and compression library. + +The module defines the following variables: + +:: + + LibArchive_FOUND - true if libarchive was found + LibArchive_INCLUDE_DIRS - include search path + LibArchive_LIBRARIES - libraries to link + LibArchive_VERSION - libarchive 3-component version number + +The module defines the following ``IMPORTED`` targets: + +:: + + LibArchive::LibArchive - target for linking against libarchive +#]=======================================================================] + +find_path(LibArchive_INCLUDE_DIR + NAMES archive.h + PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\LibArchive;InstallPath]/include" + DOC "libarchive include directory" + ) + +find_library(LibArchive_LIBRARY + NAMES archive libarchive + PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\LibArchive;InstallPath]/lib" + DOC "libarchive library" + ) + +mark_as_advanced(LibArchive_INCLUDE_DIR LibArchive_LIBRARY) + +# Extract the version number from the header. +if(LibArchive_INCLUDE_DIR AND EXISTS "${LibArchive_INCLUDE_DIR}/archive.h") + # The version string appears in one of three known formats in the header: + # #define ARCHIVE_LIBRARY_VERSION "libarchive 2.4.12" + # #define ARCHIVE_VERSION_STRING "libarchive 2.8.4" + # #define ARCHIVE_VERSION_ONLY_STRING "3.2.0" + # Match any format. + set(_LibArchive_VERSION_REGEX "^#define[ \t]+ARCHIVE[_A-Z]+VERSION[_A-Z]*[ \t]+\"(libarchive +)?([0-9]+)\\.([0-9]+)\\.([0-9]+)[^\"]*\".*$") + file(STRINGS "${LibArchive_INCLUDE_DIR}/archive.h" _LibArchive_VERSION_STRING LIMIT_COUNT 1 REGEX "${_LibArchive_VERSION_REGEX}") + if(_LibArchive_VERSION_STRING) + string(REGEX REPLACE "${_LibArchive_VERSION_REGEX}" "\\2.\\3.\\4" LibArchive_VERSION "${_LibArchive_VERSION_STRING}") + endif() + unset(_LibArchive_VERSION_REGEX) + unset(_LibArchive_VERSION_STRING) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibArchive + REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR + VERSION_VAR LibArchive_VERSION + ) +unset(LIBARCHIVE_FOUND) + +if(LibArchive_FOUND) + set(LibArchive_INCLUDE_DIRS ${LibArchive_INCLUDE_DIR}) + set(LibArchive_LIBRARIES ${LibArchive_LIBRARY}) + + if (NOT TARGET LibArchive::LibArchive) + add_library(LibArchive::LibArchive UNKNOWN IMPORTED) + set_target_properties(LibArchive::LibArchive PROPERTIES + IMPORTED_LOCATION "${LibArchive_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${LibArchive_INCLUDE_DIR}") + endif () +endif() diff --git a/CMake/patches/3.19/FindSQLite3.cmake b/CMake/patches/3.19/FindSQLite3.cmake new file mode 100644 index 000000000..f135c5d64 --- /dev/null +++ b/CMake/patches/3.19/FindSQLite3.cmake @@ -0,0 +1,68 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindSQLite3 +----------- + +.. versionadded:: 3.14 + +Find the SQLite libraries, v3 + +IMPORTED targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` target: + +``SQLite::SQLite3`` + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables if found: + +``SQLite3_INCLUDE_DIRS`` + where to find sqlite3.h, etc. +``SQLite3_LIBRARIES`` + the libraries to link against to use SQLite3. +``SQLite3_VERSION`` + version of the SQLite3 library found +``SQLite3_FOUND`` + TRUE if found + +#]=======================================================================] + +# Look for the necessary header +find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h) +mark_as_advanced(SQLite3_INCLUDE_DIR) + +# Look for the necessary library +find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite) +mark_as_advanced(SQLite3_LIBRARY) + +# Extract version information from the header file +if(SQLite3_INCLUDE_DIR) + file(STRINGS ${SQLite3_INCLUDE_DIR}/sqlite3.h _ver_line + REGEX "^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\"" + LIMIT_COUNT 1) + string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" + SQLite3_VERSION "${_ver_line}") + unset(_ver_line) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SQLite3 + REQUIRED_VARS SQLite3_INCLUDE_DIR SQLite3_LIBRARY + VERSION_VAR SQLite3_VERSION) + +# Create the imported target +if(SQLite3_FOUND) + set(SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR}) + set(SQLite3_LIBRARIES ${SQLite3_LIBRARY}) + if(NOT TARGET SQLite::SQLite3) + add_library(SQLite::SQLite3 UNKNOWN IMPORTED) + set_target_properties(SQLite::SQLite3 PROPERTIES + IMPORTED_LOCATION "${SQLite3_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}") + endif() +endif() diff --git a/CMake/patches/3.19/FindX11.cmake b/CMake/patches/3.19/FindX11.cmake new file mode 100644 index 000000000..be2c2699e --- /dev/null +++ b/CMake/patches/3.19/FindX11.cmake @@ -0,0 +1,878 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindX11 +------- + +Find X11 installation + +Try to find X11 on UNIX systems. The following values are defined + +:: + + X11_FOUND - True if X11 is available + X11_INCLUDE_DIR - include directories to use X11 + X11_LIBRARIES - link against these to use X11 + +and also the following more fine grained variables and targets: + +:: + + X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND, X11::ICE + X11_SM_INCLUDE_PATH, X11_SM_LIB, X11_SM_FOUND, X11::SM + X11_X11_INCLUDE_PATH, X11_X11_LIB, X11::X11 + X11_Xaccessrules_INCLUDE_PATH, + X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND + X11_Xau_INCLUDE_PATH, X11_Xau_LIB, X11_Xau_FOUND, X11::Xau + X11_xcb_INCLUDE_PATH, X11_xcb_LIB, X11_xcb_FOUND, X11::xcb + X11_X11_xcb_INCLUDE_PATH, X11_X11_xcb_LIB, X11_X11_xcb_FOUND, X11::X11_xcb + X11_xcb_icccm_INCLUDE_PATH, X11_xcb_icccm_LIB, X11_xcb_icccm_FOUND, X11::xcb_icccm + X11_xcb_util_INCLUDE_PATH, X11_xcb_util_LIB, X11_xcb_util_FOUND, X11::xcb_util + X11_xcb_xfixes_INCLUDE_PATH, X11_xcb_xfixes_LIB, X11_xcb_xfixes_FOUND, X11::xcb_xfixes + X11_xcb_xkb_INCLUDE_PATH, X11_xcb_xkb_LIB, X11_xcb_xkb_FOUND, X11::xcb_xkb + X11_Xcomposite_INCLUDE_PATH, X11_Xcomposite_LIB, X11_Xcomposite_FOUND, X11::Xcomposite + X11_Xcursor_INCLUDE_PATH, X11_Xcursor_LIB, X11_Xcursor_FOUND, X11::Xcursor + X11_Xdamage_INCLUDE_PATH, X11_Xdamage_LIB, X11_Xdamage_FOUND, X11::Xdamage + X11_Xdmcp_INCLUDE_PATH, X11_Xdmcp_LIB, X11_Xdmcp_FOUND, X11::Xdmcp + X11_Xext_INCLUDE_PATH, X11_Xext_LIB, X11_Xext_FOUND, X11::Xext + X11_Xxf86misc_INCLUDE_PATH, X11_Xxf86misc_LIB, X11_Xxf86misc_FOUND, X11::Xxf86misc + X11_Xxf86vm_INCLUDE_PATH, X11_Xxf86vm_LIB X11_Xxf86vm_FOUND, X11::Xxf86vm + X11_Xfixes_INCLUDE_PATH, X11_Xfixes_LIB, X11_Xfixes_FOUND, X11::Xfixes + X11_Xft_INCLUDE_PATH, X11_Xft_LIB, X11_Xft_FOUND, X11::Xft + X11_Xi_INCLUDE_PATH, X11_Xi_LIB, X11_Xi_FOUND, X11::Xi + X11_Xinerama_INCLUDE_PATH, X11_Xinerama_LIB, X11_Xinerama_FOUND, X11::Xinerama + X11_Xkb_INCLUDE_PATH, + X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND, X11::Xkb + X11_xkbcommon_INCLUDE_PATH, X11_xkbcommon_LIB, X11_xkbcommon_FOUND, X11::xkbcommon + X11_xkbcommon_X11_INCLUDE_PATH,X11_xkbcommon_X11_LIB,X11_xkbcommon_X11_FOUND,X11::xkbcommon_X11 + X11_xkbfile_INCLUDE_PATH, X11_xkbfile_LIB, X11_xkbfile_FOUND, X11::xkbfile + X11_Xmu_INCLUDE_PATH, X11_Xmu_LIB, X11_Xmu_FOUND, X11::Xmu + X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND, X11::Xpm + X11_Xtst_INCLUDE_PATH, X11_Xtst_LIB, X11_Xtst_FOUND, X11::Xtst + X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND, X11::Xrandr + X11_Xrender_INCLUDE_PATH, X11_Xrender_LIB, X11_Xrender_FOUND, X11::Xrender + X11_XRes_INCLUDE_PATH, X11_XRes_LIB, X11_XRes_FOUND, X11::XRes + X11_Xss_INCLUDE_PATH, X11_Xss_LIB, X11_Xss_FOUND, X11::Xss + X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND, X11::Xt + X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND, X11::Xutil + X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND, X11::Xv + X11_dpms_INCLUDE_PATH, (in X11_Xext_LIB), X11_dpms_FOUND + X11_XShm_INCLUDE_PATH, (in X11_Xext_LIB), X11_XShm_FOUND + X11_Xshape_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xshape_FOUND + X11_XSync_INCLUDE_PATH, (in X11_Xext_LIB), X11_XSync_FOUND + X11_Xaw_INCLUDE_PATH, X11_Xaw_LIB X11_Xaw_FOUND X11::Xaw +#]=======================================================================] + +if (UNIX) + set(X11_FOUND 0) + # X11 is never a framework and some header files may be + # found in tcl on the mac + set(CMAKE_FIND_FRAMEWORK_SAVE ${CMAKE_FIND_FRAMEWORK}) + set(CMAKE_FIND_FRAMEWORK NEVER) + set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) + set(CMAKE_REQUIRED_QUIET ${X11_FIND_QUIETLY}) + set(X11_INC_SEARCH_PATH + /usr/pkg/xorg/include + /usr/X11R6/include + /usr/X11R7/include + /usr/include/X11 + /usr/openwin/include + /usr/openwin/share/include + /opt/graphics/OpenGL/include + /opt/X11/include + ) + + set(X11_LIB_SEARCH_PATH + /usr/pkg/xorg/lib + /usr/X11R6/lib + /usr/X11R7/lib + /usr/openwin/lib + /opt/X11/lib + ) + + find_path(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xlib_INCLUDE_PATH X11/Xlib.h ${X11_INC_SEARCH_PATH}) + + # Look for includes; keep the list sorted by name of the cmake *_INCLUDE_PATH + # variable (which doesn't need to match the include file name). + + # Solaris lacks XKBrules.h, so we should skip kxkbd there. + find_path(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH}) + find_path(X11_SM_INCLUDE_PATH X11/SM/SM.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xaw_INCLUDE_PATH X11/Xaw/Intrinsic.h ${X11_INC_SEARCH_PATH}) + find_path(X11_xcb_INCLUDE_PATH xcb/xcb.h ${X11_INC_SEARCH_PATH}) + find_path(X11_X11_xcb_INCLUDE_PATH X11/Xlib-xcb.h ${X11_INC_SEARCH_PATH}) + find_path(X11_xcb_icccm_INCLUDE_PATH xcb/xcb_icccm.h ${X11_INC_SEARCH_PATH}) + find_path(X11_xcb_util_INCLUDE_PATH xcb/xcb_aux.h ${X11_INC_SEARCH_PATH}) + find_path(X11_xcb_xfixes_INCLUDE_PATH xcb/xfixes.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xdmcp_INCLUDE_PATH X11/Xdmcp.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xext_INCLUDE_PATH X11/extensions/Xext.h ${X11_INC_SEARCH_PATH}) + find_path(X11_dpms_INCLUDE_PATH X11/extensions/dpms.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xxf86misc_INCLUDE_PATH X11/extensions/xf86misc.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xxf86vm_INCLUDE_PATH X11/extensions/xf86vmode.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xfixes_INCLUDE_PATH X11/extensions/Xfixes.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xft_INCLUDE_PATH X11/Xft/Xft.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xi_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xinerama_INCLUDE_PATH X11/extensions/Xinerama.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH}) + find_path(X11_xkbcommon_INCLUDE_PATH xkbcommon/xkbcommon.h ${X11_INC_SEARCH_PATH}) + find_path(X11_xkbcommon_X11_INCLUDE_PATH xkbcommon/xkbcommon-x11.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH}) + find_path(X11_xkbfile_INCLUDE_PATH X11/extensions/XKBfile.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xmu_INCLUDE_PATH X11/Xmu/Xmu.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xtst_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH}) + find_path(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xrandr_INCLUDE_PATH X11/extensions/Xrandr.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xrender_INCLUDE_PATH X11/extensions/Xrender.h ${X11_INC_SEARCH_PATH}) + find_path(X11_XRes_INCLUDE_PATH X11/extensions/XRes.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xss_INCLUDE_PATH X11/extensions/scrnsaver.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xshape_INCLUDE_PATH X11/extensions/shape.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH}) + find_path(X11_XSync_INCLUDE_PATH X11/extensions/sync.h ${X11_INC_SEARCH_PATH}) + + + + # Backwards compatibility. + set(X11_Xinput_INCLUDE_PATH "${X11_Xi_INCLUDE_PATH}") + set(X11_xf86misc_INCLUDE_PATH "${X11_Xxf86misc_INCLUDE_PATH}") + set(X11_xf86vmode_INCLUDE_PATH "${X11_Xxf8vm_INCLUDE_PATH}") + set(X11_Xkbfile_INCLUDE_PATH "${X11_xkbfile_INCLUDE_PATH}") + set(X11_XTest_INCLUDE_PATH "${X11_Xtst_INCLUDE_PATH}") + set(X11_Xscreensaver_INCLUDE_PATH "${X11_Xss_INCLUDE_PATH}") + + find_library(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH}) + + # Find additional X libraries. Keep list sorted by library name. + find_library(X11_ICE_LIB ICE ${X11_LIB_SEARCH_PATH}) + find_library(X11_SM_LIB SM ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xau_LIB Xau ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xaw_LIB Xaw ${X11_LIB_SEARCH_PATH}) + find_library(X11_xcb_LIB xcb ${X11_LIB_SEARCH_PATH}) + find_library(X11_X11_xcb_LIB X11-xcb ${X11_LIB_SEARCH_PATH}) + find_library(X11_xcb_icccm_LIB xcb-icccm ${X11_LIB_SEARCH_PATH}) + find_library(X11_xcb_util_LIB xcb-util ${X11_LIB_SEARCH_PATH}) + find_library(X11_xcb_xfixes_LIB xcb-xfixes ${X11_LIB_SEARCH_PATH}) + find_library(X11_xcb_xkb_LIB xcb-xkb ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xcomposite_LIB Xcomposite ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xcursor_LIB Xcursor ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xdamage_LIB Xdamage ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xdmcp_LIB Xdmcp ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xext_LIB Xext ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xfixes_LIB Xfixes ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xft_LIB Xft ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xi_LIB Xi ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH}) + find_library(X11_xkbcommon_LIB xkbcommon ${X11_LIB_SEARCH_PATH}) + find_library(X11_xkbcommon_X11_LIB xkbcommon-x11 ${X11_LIB_SEARCH_PATH}) + find_library(X11_xkbfile_LIB xkbfile ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xmu_LIB Xmu ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH}) + find_library(X11_XRes_LIB XRes ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xss_LIB Xss ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xtst_LIB Xtst ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xv_LIB Xv ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xxf86misc_LIB Xxf86misc ${X11_LIB_SEARCH_PATH}) + find_library(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH}) + + # Backwards compatibility. + set(X11_Xinput_LIB "${X11_Xi_LIB}") + set(X11_Xkbfile_LIB "${X11_xkbfile_LIB}") + set(X11_XTest_LIB "${X11_Xtst_LIB}") + set(X11_Xscreensaver_LIB "${X11_Xss_LIB}") + + set(X11_LIBRARY_DIR "") + if(X11_X11_LIB) + get_filename_component(X11_LIBRARY_DIR ${X11_X11_LIB} PATH) + endif() + + set(X11_INCLUDE_DIR) # start with empty list + if(X11_X11_INCLUDE_PATH) + list(APPEND X11_INCLUDE_DIR ${X11_X11_INCLUDE_PATH}) + endif() + + if(X11_Xlib_INCLUDE_PATH) + list(APPEND X11_INCLUDE_DIR ${X11_Xlib_INCLUDE_PATH}) + endif() + + if(X11_Xutil_INCLUDE_PATH) + set(X11_Xutil_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xutil_INCLUDE_PATH}) + endif() + + if(X11_Xshape_INCLUDE_PATH) + set(X11_Xshape_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xshape_INCLUDE_PATH}) + endif() + + set(X11_LIBRARIES) # start with empty list + if(X11_X11_LIB) + list(APPEND X11_LIBRARIES ${X11_X11_LIB}) + endif() + + if(X11_Xext_LIB) + set(X11_Xext_FOUND TRUE) + list(APPEND X11_LIBRARIES ${X11_Xext_LIB}) + endif() + + if(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH) + set(X11_Xt_FOUND TRUE) + endif() + + if(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH) + find_package(Freetype QUIET) + find_package(Fontconfig QUIET) + if (FREETYPE_FOUND AND Fontconfig_FOUND) + set(X11_Xft_FOUND TRUE) + endif () + list(APPEND X11_INCLUDE_DIR ${X11_Xft_INCLUDE_PATH}) + endif() + + if(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH) + set(X11_Xv_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xv_INCLUDE_PATH}) + endif() + + if (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH) + set(X11_Xau_FOUND TRUE) + endif () + + if (X11_xcb_LIB AND X11_xcb_INCLUDE_PATH) + set(X11_xcb_FOUND TRUE) + endif () + + if (X11_X11_xcb_LIB AND X11_X11_xcb_INCLUDE_PATH) + set(X11_X11_xcb_FOUND TRUE) + endif () + + if (X11_xcb_icccm_LIB AND X11_xcb_icccm_INCLUDE_PATH) + set(X11_xcb_icccm_FOUND TRUE) + endif () + + if (X11_xcb_util_LIB AND X11_xcb_util_INCLUDE_PATH) + set(X11_xcb_util_FOUND TRUE) + endif () + + if (X11_xcb_xfixes_LIB) + set(X11_xcb_xfixes_FOUND TRUE) + endif () + + if (X11_xcb_xkb_LIB) + set(X11_xcb_xkb_FOUND TRUE) + endif () + + if (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB) + set(X11_Xdmcp_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xdmcp_INCLUDE_PATH}) + endif () + + if (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH) + set(X11_Xaccess_FOUND TRUE) + set(X11_Xaccess_INCLUDE_PATH ${X11_Xaccessstr_INCLUDE_PATH}) + list(APPEND X11_INCLUDE_DIR ${X11_Xaccess_INCLUDE_PATH}) + endif () + + if (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB) + set(X11_Xpm_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xpm_INCLUDE_PATH}) + endif () + + if (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB) + set(X11_Xcomposite_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xcomposite_INCLUDE_PATH}) + endif () + + if (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB) + set(X11_Xdamage_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xdamage_INCLUDE_PATH}) + endif () + + if (X11_XShm_INCLUDE_PATH) + set(X11_XShm_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_XShm_INCLUDE_PATH}) + endif () + + if (X11_Xtst_INCLUDE_PATH AND X11_Xtst_LIB) + set(X11_Xtst_FOUND TRUE) + # Backwards compatibility. + set(X11_XTest_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xtst_INCLUDE_PATH}) + endif () + + if (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB) + set(X11_Xi_FOUND TRUE) + # Backwards compatibility. + set(X11_Xinput_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xi_INCLUDE_PATH}) + endif () + + if (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB) + set(X11_Xinerama_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xinerama_INCLUDE_PATH}) + endif () + + if (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB) + set(X11_Xfixes_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xfixes_INCLUDE_PATH}) + endif () + + if (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB) + set(X11_Xrender_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xrender_INCLUDE_PATH}) + endif () + + if (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB) + set(X11_XRes_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_XRes_INCLUDE_PATH}) + endif () + + if (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB) + set(X11_Xrandr_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xrandr_INCLUDE_PATH}) + endif () + + if (X11_Xxf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB) + set(X11_Xxf86misc_FOUND TRUE) + # Backwards compatibility. + set(X11_xf86misc_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xxf86misc_INCLUDE_PATH}) + endif () + + if (X11_Xxf86vm_INCLUDE_PATH AND X11_Xxf86vm_LIB) + set(X11_Xxf86vm_FOUND TRUE) + # Backwards compatibility. + set(X11_xf86vmode_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xxf86vm_INCLUDE_PATH}) + endif () + + if (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB) + set(X11_Xcursor_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xcursor_INCLUDE_PATH}) + endif () + + if (X11_Xss_INCLUDE_PATH AND X11_Xss_LIB) + set(X11_Xss_FOUND TRUE) + set(X11_Xscreensaver_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xss_INCLUDE_PATH}) + endif () + + if (X11_dpms_INCLUDE_PATH) + set(X11_dpms_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_dpms_INCLUDE_PATH}) + endif () + + if (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH) + set(X11_Xkb_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xkb_INCLUDE_PATH} ) + endif () + + if (X11_xkbcommon_INCLUDE_PATH AND X11_xkbcommon_LIB) + set(X11_xkbcommon_FOUND TRUE) + endif () + + if (X11_xkbcommon_X11_INCLUDE_PATH AND X11_xkbcommon_X11_LIB) + set(X11_xkbcommon_X11_FOUND TRUE) + endif () + + if (X11_xkbfile_INCLUDE_PATH AND X11_xkbfile_LIB AND X11_Xlib_INCLUDE_PATH) + set(X11_xkbfile_FOUND TRUE) + # Backwards compatibility. + set(X11_Xkbfile_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_xkbfile_INCLUDE_PATH} ) + endif () + + if (X11_Xmu_INCLUDE_PATH AND X11_Xmu_LIB) + set(X11_Xmu_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xmu_INCLUDE_PATH}) + endif () + + if (X11_XSync_INCLUDE_PATH) + set(X11_XSync_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_XSync_INCLUDE_PATH}) + endif () + + if(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH) + set(X11_ICE_FOUND TRUE) + endif() + + if(X11_SM_LIB AND X11_SM_INCLUDE_PATH) + set(X11_SM_FOUND TRUE) + endif() + + if(X11_Xaw_LIB AND X11_Xaw_INCLUDE_PATH) + set(X11_Xaw_FOUND TRUE) + endif() + + # Most of the X11 headers will be in the same directories, avoid + # creating a huge list of duplicates. + if (X11_INCLUDE_DIR) + list(REMOVE_DUPLICATES X11_INCLUDE_DIR) + endif () + + # Deprecated variable for backwards compatibility with CMake 1.4 + if (X11_X11_INCLUDE_PATH AND X11_LIBRARIES) + set(X11_FOUND 1) + endif () + + include(FindPackageHandleStandardArgs) + if (CMAKE_FIND_PACKAGE_NAME STREQUAL "FLTK") + # FindFLTK include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive + # to the contents, detect the case in this module and suppress it + # explicitly. + set(FPHSA_NAME_MISMATCHED 1) + endif () + find_package_handle_standard_args(X11 + REQUIRED_VARS X11_X11_INCLUDE_PATH X11_X11_LIB + HANDLE_COMPONENTS) + unset(FPHSA_NAME_MISMATCHED) + + if(X11_FOUND) + include(CheckFunctionExists) + include(CheckLibraryExists) + + # Translated from an autoconf-generated configure script. + # See libs.m4 in autoconf's m4 directory. + if($ENV{ISC} MATCHES "^yes$") + set(X11_X_EXTRA_LIBS -lnsl_s -linet) + else() + set(X11_X_EXTRA_LIBS "") + + # See if XOpenDisplay in X11 works by itself. + check_library_exists("${X11_LIBRARIES}" "XOpenDisplay" "${X11_LIBRARY_DIR}" X11_LIB_X11_SOLO) + if(NOT X11_LIB_X11_SOLO) + # Find library needed for dnet_ntoa. + check_library_exists("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA) + if (X11_LIB_DNET_HAS_DNET_NTOA) + list(APPEND X11_X_EXTRA_LIBS -ldnet) + else () + check_library_exists("dnet_stub" "dnet_ntoa" "" X11_LIB_DNET_STUB_HAS_DNET_NTOA) + if (X11_LIB_DNET_STUB_HAS_DNET_NTOA) + list(APPEND X11_X_EXTRA_LIBS -ldnet_stub) + endif () + endif () + endif() + + # Find library needed for gethostbyname. + check_function_exists("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME) + if(NOT CMAKE_HAVE_GETHOSTBYNAME) + check_library_exists("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + if (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + list(APPEND X11_X_EXTRA_LIBS -lnsl) + else () + check_library_exists("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) + if (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) + list(APPEND X11_X_EXTRA_LIBS -lbsd) + endif () + endif () + endif() + + # Find library needed for connect. + check_function_exists("connect" CMAKE_HAVE_CONNECT) + if(NOT CMAKE_HAVE_CONNECT) + check_library_exists("socket" "connect" "" CMAKE_LIB_SOCKET_HAS_CONNECT) + if (CMAKE_LIB_SOCKET_HAS_CONNECT) + list(INSERT X11_X_EXTRA_LIBS 0 -lsocket) + endif () + endif() + + # Find library needed for remove. + check_function_exists("remove" CMAKE_HAVE_REMOVE) + if(NOT CMAKE_HAVE_REMOVE) + check_library_exists("posix" "remove" "" CMAKE_LIB_POSIX_HAS_REMOVE) + if (CMAKE_LIB_POSIX_HAS_REMOVE) + list(APPEND X11_X_EXTRA_LIBS -lposix) + endif () + endif() + + # Find library needed for shmat. + check_function_exists("shmat" CMAKE_HAVE_SHMAT) + if(NOT CMAKE_HAVE_SHMAT) + check_library_exists("ipc" "shmat" "" CMAKE_LIB_IPS_HAS_SHMAT) + if (CMAKE_LIB_IPS_HAS_SHMAT) + list(APPEND X11_X_EXTRA_LIBS -lipc) + endif () + endif() + endif() + + if (X11_ICE_FOUND) + check_library_exists("ICE" "IceConnectionNumber" "${X11_LIBRARY_DIR}" + CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) + if(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) + set (X11_X_PRE_LIBS ${X11_ICE_LIB}) + if(X11_SM_LIB) + list(INSERT X11_X_PRE_LIBS 0 ${X11_SM_LIB}) + endif() + endif() + endif () + + # Build the final list of libraries. + set(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS}) + + if (NOT TARGET X11::X11) + add_library(X11::X11 UNKNOWN IMPORTED) + set_target_properties(X11::X11 PROPERTIES + IMPORTED_LOCATION "${X11_X11_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_X11_INCLUDE_PATH}") + endif () + endif () + + if (X11_ICE_FOUND AND NOT TARGET X11::ICE) + add_library(X11::ICE UNKNOWN IMPORTED) + set_target_properties(X11::ICE PROPERTIES + IMPORTED_LOCATION "${X11_ICE_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_ICE_INCLUDE_PATH}") + endif () + + if (X11_SM_FOUND AND NOT TARGET X11::SM) + add_library(X11::SM UNKNOWN IMPORTED) + set_target_properties(X11::SM PROPERTIES + IMPORTED_LOCATION "${X11_SM_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_SM_INCLUDE_PATH}") + endif () + + if (X11_Xau_FOUND AND NOT TARGET X11::Xau) + add_library(X11::Xau UNKNOWN IMPORTED) + set_target_properties(X11::Xau PROPERTIES + IMPORTED_LOCATION "${X11_Xau_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xau_INCLUDE_PATH}") + endif () + + if (X11_Xaw_FOUND AND NOT TARGET X11::Xaw) + add_library(X11::Xaw UNKNOWN IMPORTED) + set_target_properties(X11::Xaw PROPERTIES + IMPORTED_LOCATION "${X11_Xaw_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xaw_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xext;X11::Xmu;X11::Xt;X11::Xpm;X11::X11") + endif () + + if (X11_xcb_FOUND AND NOT TARGET X11::xcb) + add_library(X11::xcb UNKNOWN IMPORTED) + set_target_properties(X11::xcb PROPERTIES + IMPORTED_LOCATION "${X11_xcb_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_xcb_INCLUDE_PATH}") + endif () + + if (X11_X11_xcb_FOUND AND NOT TARGET X11::X11_xcb) + add_library(X11::X11_xcb UNKNOWN IMPORTED) + set_target_properties(X11::X11_xcb PROPERTIES + IMPORTED_LOCATION "${X11_X11_xcb_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_X11_xcb_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::xcb;X11::X11") + endif () + + if (X11_xcb_icccm_FOUND AND NOT TARGET X11::xcb_icccm) + add_library(X11::xcb_icccm UNKNOWN IMPORTED) + set_target_properties(X11::xcb_icccm PROPERTIES + IMPORTED_LOCATION "${X11_xcb_icccm_LIB}" + INTERFACE_LINK_LIBRARIES "X11::xcb") + endif () + + if (X11_xcb_util_FOUND AND NOT TARGET X11::xcb_util) + add_library(X11::xcb_util UNKNOWN IMPORTED) + set_target_properties(X11::xcb_util PROPERTIES + IMPORTED_LOCATION "${X11_xcb_util_LIB}" + INTERFACE_LINK_LIBRARIES "X11::xcb") + endif () + + if (X11_xcb_xfixes_FOUND AND NOT TARGET X11::xcb_xfixes) + add_library(X11::xcb_xfixes UNKNOWN IMPORTED) + set_target_properties(X11::xcb_xfixes PROPERTIES + IMPORTED_LOCATION "${X11_xcb_xfixes_LIB}" + INTERFACE_LINK_LIBRARIES "X11::xcb") + endif () + + if (X11_xcb_xkb_FOUND AND NOT TARGET X11::xcb_xkb) + add_library(X11::xcb_xkb UNKNOWN IMPORTED) + set_target_properties(X11::xcb_xkb PROPERTIES + IMPORTED_LOCATION "${X11_xcb_xkb_LIB}" + INTERFACE_LINK_LIBRARIES "X11::xcb") + endif () + + if (X11_Xcomposite_FOUND AND NOT TARGET X11::Xcomposite) + add_library(X11::Xcomposite UNKNOWN IMPORTED) + set_target_properties(X11::Xcomposite PROPERTIES + IMPORTED_LOCATION "${X11_Xcomposite_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xcomposite_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11") + endif () + + if (X11_Xcursor_FOUND AND NOT TARGET X11::Xcursor) + add_library(X11::Xcursor UNKNOWN IMPORTED) + set_target_properties(X11::Xcursor PROPERTIES + IMPORTED_LOCATION "${X11_Xcursor_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xcursor_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xrender;X11::Xfixes;X11::X11") + endif () + + if (X11_Xdamage_FOUND AND NOT TARGET X11::Xdamage) + add_library(X11::Xdamage UNKNOWN IMPORTED) + set_target_properties(X11::Xdamage PROPERTIES + IMPORTED_LOCATION "${X11_Xdamage_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xdamage_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xfixes;X11::X11") + endif () + + if (X11_Xdmcp_FOUND AND NOT TARGET X11::Xdmcp) + add_library(X11::Xdmcp UNKNOWN IMPORTED) + set_target_properties(X11::Xdmcp PROPERTIES + IMPORTED_LOCATION "${X11_Xdmcp_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xdmcp_INCLUDE_PATH}") + endif () + + if (X11_Xext_FOUND AND NOT TARGET X11::Xext) + add_library(X11::Xext UNKNOWN IMPORTED) + set_target_properties(X11::Xext PROPERTIES + IMPORTED_LOCATION "${X11_Xext_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xext_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11") + endif () + + if (X11_Xxf86misc_FOUND AND NOT TARGET X11::Xxf86misc) + add_library(X11::Xxf86misc UNKNOWN IMPORTED) + set_target_properties(X11::Xxf86misc PROPERTIES + IMPORTED_LOCATION "${X11_Xxf86misc_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xxf86misc_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11;X11::Xext") + endif () + + if (X11_Xxf86vm_FOUND AND NOT TARGET X11::Xxf86vm) + add_library(X11::Xxf86vm UNKNOWN IMPORTED) + set_target_properties(X11::Xxf86vm PROPERTIES + IMPORTED_LOCATION "${X11_Xxf86vm_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xxf86vm_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11;X11::Xext") + endif () + + if (X11_Xfixes_FOUND AND NOT TARGET X11::Xfixes) + add_library(X11::Xfixes UNKNOWN IMPORTED) + set_target_properties(X11::Xfixes PROPERTIES + IMPORTED_LOCATION "${X11_Xfixes_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xfixes_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11") + endif () + + if (X11_Xft_FOUND AND NOT TARGET X11::Xft) + add_library(X11::Xft UNKNOWN IMPORTED) + set_target_properties(X11::Xft PROPERTIES + IMPORTED_LOCATION "${X11_Xft_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xft_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xrender;X11::X11;Fontconfig::Fontconfig;Freetype::Freetype") + endif () + + if (X11_Xi_FOUND AND NOT TARGET X11::Xi) + add_library(X11::Xi UNKNOWN IMPORTED) + set_target_properties(X11::Xi PROPERTIES + IMPORTED_LOCATION "${X11_Xi_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xi_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") + endif () + + if (X11_Xinerama_FOUND AND NOT TARGET X11::Xinerama) + add_library(X11::Xinerama UNKNOWN IMPORTED) + set_target_properties(X11::Xinerama PROPERTIES + IMPORTED_LOCATION "${X11_Xinerama_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xinerama_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") + endif () + + if (X11_Xkb_FOUND AND NOT TARGET X11::Xkb) + add_library(X11::Xkb INTERFACE IMPORTED) + set_target_properties(X11::Xkb PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xkb_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11") + endif () + + if (X11_xkbcommon_FOUND AND NOT TARGET X11::xkbcommon) + add_library(X11::xkbcommon UNKNOWN IMPORTED) + set_target_properties(X11::xkbcommon PROPERTIES + IMPORTED_LOCATION "${X11_xkbcommon_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_xkbcommon_INCLUDE_PATH}") + endif () + + if (X11_xkbcommon_X11_FOUND AND NOT TARGET X11::xkbcommon_X11) + add_library(X11::xkbcommon_X11 UNKNOWN IMPORTED) + set_target_properties(X11::xkbcommon_X11 PROPERTIES + IMPORTED_LOCATION "${X11_xkbcommon_X11_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_xkbcommon_X11_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11;X11::xkbcommon") + endif () + + if (X11_xkbfile_FOUND AND NOT TARGET X11::xkbfile) + add_library(X11::xkbfile UNKNOWN IMPORTED) + set_target_properties(X11::xkbfile PROPERTIES + IMPORTED_LOCATION "${X11_xkbfile_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_xkbfile_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11") + endif () + + if (X11_Xmu_FOUND AND NOT TARGET X11::Xmu) + add_library(X11::Xmu UNKNOWN IMPORTED) + set_target_properties(X11::Xmu PROPERTIES + IMPORTED_LOCATION "${X11_Xmu_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xmu_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xt;X11::Xext;X11::X11") + endif () + + if (X11_Xpm_FOUND AND NOT TARGET X11::Xpm) + add_library(X11::Xpm UNKNOWN IMPORTED) + set_target_properties(X11::Xpm PROPERTIES + IMPORTED_LOCATION "${X11_Xpm_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xpm_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11") + endif () + + if (X11_Xtst_FOUND AND NOT TARGET X11::Xtst) + add_library(X11::Xtst UNKNOWN IMPORTED) + set_target_properties(X11::Xtst PROPERTIES + IMPORTED_LOCATION "${X11_Xtst_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xtst_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xi;X11::Xext;X11::X11") + endif () + + if (X11_Xrandr_FOUND AND NOT TARGET X11::Xrandr) + add_library(X11::Xrandr UNKNOWN IMPORTED) + set_target_properties(X11::Xrandr PROPERTIES + IMPORTED_LOCATION "${X11_Xrandr_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xrandr_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xrender;X11::Xext;X11::X11") + endif () + + if (X11_Xrender_FOUND AND NOT TARGET X11::Xrender) + add_library(X11::Xrender UNKNOWN IMPORTED) + set_target_properties(X11::Xrender PROPERTIES + IMPORTED_LOCATION "${X11_Xrender_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xrender_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::X11") + endif () + + if (X11_XRes_FOUND AND NOT TARGET X11::XRes) + add_library(X11::XRes UNKNOWN IMPORTED) + set_target_properties(X11::XRes PROPERTIES + IMPORTED_LOCATION "${X11_XRes_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_XRes_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") + endif () + + if (X11_Xss_FOUND AND NOT TARGET X11::Xss) + add_library(X11::Xss UNKNOWN IMPORTED) + set_target_properties(X11::Xss PROPERTIES + IMPORTED_LOCATION "${X11_Xss_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xss_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") + endif () + + if (X11_Xt_FOUND AND NOT TARGET X11::Xt) + add_library(X11::Xt UNKNOWN IMPORTED) + set_target_properties(X11::Xt PROPERTIES + IMPORTED_LOCATION "${X11_Xt_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xt_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::ICE;X11::SM;X11::X11") + endif () + + if (X11_Xutil_FOUND AND NOT TARGET X11::Xutil) + add_library(X11::Xutil INTERFACE IMPORTED) + set_target_properties(X11::Xutil PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xutil_INCLUDE_PATH}" + # libX11 contains the implementations for functions in the Xutil.h + # header. + INTERFACE_LINK_LIBRARIES "X11::X11") + endif () + + if (X11_Xv_FOUND AND NOT TARGET X11::Xv) + add_library(X11::Xv UNKNOWN IMPORTED) + set_target_properties(X11::Xv PROPERTIES + IMPORTED_LOCATION "${X11_Xv_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_Xv_INCLUDE_PATH}" + INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") + endif () + + mark_as_advanced( + X11_X11_INCLUDE_PATH + X11_X11_LIB + X11_Xext_INCLUDE_PATH + X11_Xext_LIB + X11_Xau_LIB + X11_Xau_INCLUDE_PATH + X11_xcb_LIB + X11_xcb_INCLUDE_PATH + X11_xcb_xkb_LIB + X11_X11_xcb_LIB + X11_X11_xcb_INCLUDE_PATH + X11_Xlib_INCLUDE_PATH + X11_Xutil_INCLUDE_PATH + X11_Xcomposite_INCLUDE_PATH + X11_Xcomposite_LIB + X11_Xfixes_LIB + X11_Xfixes_INCLUDE_PATH + X11_Xrandr_LIB + X11_Xrandr_INCLUDE_PATH + X11_Xdamage_LIB + X11_Xdamage_INCLUDE_PATH + X11_Xrender_LIB + X11_Xrender_INCLUDE_PATH + X11_XRes_LIB + X11_XRes_INCLUDE_PATH + X11_Xxf86misc_LIB + X11_Xxf86misc_INCLUDE_PATH + X11_Xxf86vm_LIB + X11_Xxf86vm_INCLUDE_PATH + X11_Xi_LIB + X11_Xi_INCLUDE_PATH + X11_Xinerama_LIB + X11_Xinerama_INCLUDE_PATH + X11_Xtst_LIB + X11_Xtst_INCLUDE_PATH + X11_Xcursor_LIB + X11_Xcursor_INCLUDE_PATH + X11_dpms_INCLUDE_PATH + X11_Xt_LIB + X11_Xt_INCLUDE_PATH + X11_Xdmcp_LIB + X11_LIBRARIES + X11_Xaccessrules_INCLUDE_PATH + X11_Xaccessstr_INCLUDE_PATH + X11_Xdmcp_INCLUDE_PATH + X11_Xkb_INCLUDE_PATH + X11_Xkblib_INCLUDE_PATH + X11_xkbcommon_INCLUDE_PATH + X11_xkbcommon_LIB + X11_xkbcommon_X11_INCLUDE_PATH + X11_xkbcommon_X11_LIB + X11_xkbfile_INCLUDE_PATH + X11_xkbfile_LIB + X11_Xmu_INCLUDE_PATH + X11_Xmu_LIB + X11_Xss_INCLUDE_PATH + X11_Xss_LIB + X11_Xpm_INCLUDE_PATH + X11_Xpm_LIB + X11_Xft_LIB + X11_Xft_INCLUDE_PATH + X11_Xshape_INCLUDE_PATH + X11_Xv_LIB + X11_Xv_INCLUDE_PATH + X11_XShm_INCLUDE_PATH + X11_ICE_LIB + X11_ICE_INCLUDE_PATH + X11_SM_LIB + X11_SM_INCLUDE_PATH + X11_XSync_INCLUDE_PATH + X11_Xaw_LIB + X11_Xaw_INCLUDE_PATH + ) + set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE}) + set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) +endif () diff --git a/CMake/patches/3.20/FindGDAL.cmake b/CMake/patches/3.20/FindGDAL.cmake new file mode 100644 index 000000000..45c8db9cf --- /dev/null +++ b/CMake/patches/3.20/FindGDAL.cmake @@ -0,0 +1,199 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindGDAL +-------- + +Find Geospatial Data Abstraction Library (GDAL). + +IMPORTED Targets +^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.14 + +This module defines :prop_tgt:`IMPORTED` target ``GDAL::GDAL`` +if GDAL has been found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``GDAL_FOUND`` + True if GDAL is found. +``GDAL_INCLUDE_DIRS`` + Include directories for GDAL headers. +``GDAL_LIBRARIES`` + Libraries to link to GDAL. +``GDAL_VERSION`` + .. versionadded:: 3.14 + The version of GDAL found. + +Cache variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``GDAL_LIBRARY`` + The libgdal library file. +``GDAL_INCLUDE_DIR`` + The directory containing ``gdal.h``. + +Hints +^^^^^ + +Set ``GDAL_DIR`` or ``GDAL_ROOT`` in the environment to specify the +GDAL installation prefix. + +The following variables may be set to modify the search strategy: + +``FindGDAL_SKIP_GDAL_CONFIG`` + If set, ``gdal-config`` will not be used. This can be useful if there are + GDAL libraries built with autotools (which provide the tool) and CMake (which + do not) in the same environment. +``GDAL_ADDITIONAL_LIBRARY_VERSIONS`` + Extra versions of library names to search for. +#]=======================================================================] + +# $GDALDIR is an environment variable that would +# correspond to the ./configure --prefix=$GDAL_DIR +# used in building gdal. +# +# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it +# for osgTerrain so I whipped this module together for completeness. +# I actually don't know the conventions or where files are typically +# placed in distros. +# Any real gdal users are encouraged to correct this (but please don't +# break the OS X framework stuff when doing so which is what usually seems +# to happen). + +# This makes the presumption that you are include gdal.h like +# +#include "gdal.h" + +find_path(GDAL_INCLUDE_DIR gdal.h + HINTS + ENV GDAL_DIR + ENV GDAL_ROOT + PATH_SUFFIXES + include/gdal + include/GDAL + include + DOC "Path to the GDAL include directory" +) +mark_as_advanced(GDAL_INCLUDE_DIR) + +if(UNIX AND NOT FindGDAL_SKIP_GDAL_CONFIG) + # Use gdal-config to obtain the library version (this should hopefully + # allow us to -lgdal1.x.y where x.y are correct version) + # For some reason, libgdal development packages do not contain + # libgdal.so... + find_program(GDAL_CONFIG gdal-config + HINTS + ENV GDAL_DIR + ENV GDAL_ROOT + PATH_SUFFIXES bin + DOC "Path to the gdal-config tool" + ) + mark_as_advanced(GDAL_CONFIG) + + if(GDAL_CONFIG) + execute_process(COMMAND ${GDAL_CONFIG} --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS) + + if(GDAL_CONFIG_LIBS) + # treat the output as a command line and split it up + separate_arguments(args NATIVE_COMMAND "${GDAL_CONFIG_LIBS}") + + # only consider libraries whose name matches this pattern + set(name_pattern "[gG][dD][aA][lL]") + + # consider each entry as a possible library path, name, or parent directory + foreach(arg IN LISTS args) + # library name + if("${arg}" MATCHES "^-l(.*)$") + set(lib "${CMAKE_MATCH_1}") + + # only consider libraries whose name matches the expected pattern + if("${lib}" MATCHES "${name_pattern}") + list(APPEND _gdal_lib "${lib}") + endif() + # library search path + elseif("${arg}" MATCHES "^-L(.*)$") + list(APPEND _gdal_libpath "${CMAKE_MATCH_1}") + # assume this is a full path to a library + elseif(IS_ABSOLUTE "${arg}" AND EXISTS "${arg}") + # extract the file name + get_filename_component(lib "${arg}" NAME) + + # only consider libraries whose name matches the expected pattern + if(NOT "${lib}" MATCHES "${name_pattern}") + continue() + endif() + + # extract the file directory + get_filename_component(dir "${arg}" DIRECTORY) + + # remove library prefixes/suffixes + string(REGEX REPLACE "^(${CMAKE_SHARED_LIBRARY_PREFIX}|${CMAKE_STATIC_LIBRARY_PREFIX})" "" lib "${lib}") + string(REGEX REPLACE "(${CMAKE_SHARED_LIBRARY_SUFFIX}|${CMAKE_STATIC_LIBRARY_SUFFIX})$" "" lib "${lib}") + + # use the file name and directory as hints + list(APPEND _gdal_libpath "${dir}") + list(APPEND _gdal_lib "${lib}") + endif() + endforeach() + endif() + endif() +endif() + +# GDAL name its library when built with CMake as `gdal${major}${minor}`. +set(_gdal_versions + ${GDAL_ADDITIONAL_LIBRARY_VERSIONS} 3.0 2.4 2.3 2.2 2.1 2.0 1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2) + +set(_gdal_libnames) +foreach (_gdal_version IN LISTS _gdal_versions) + string(REPLACE "." "" _gdal_version "${_gdal_version}") + list(APPEND _gdal_libnames "gdal${_gdal_version}" "GDAL${_gdal_version}") +endforeach () +unset(_gdal_version) +unset(_gdal_versions) + +find_library(GDAL_LIBRARY + NAMES ${_gdal_lib} ${_gdal_libnames} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL + HINTS + ENV GDAL_DIR + ENV GDAL_ROOT + ${_gdal_libpath} + PATH_SUFFIXES lib + DOC "Path to the GDAL library" +) +mark_as_advanced(GDAL_LIBRARY) +unset(_gdal_libnames) +unset(_gdal_lib) + +if (EXISTS "${GDAL_INCLUDE_DIR}/gdal_version.h") + file(STRINGS "${GDAL_INCLUDE_DIR}/gdal_version.h" _gdal_version + REGEX "GDAL_RELEASE_NAME") + string(REGEX REPLACE ".*\"\(.*\)\"" "\\1" GDAL_VERSION "${_gdal_version}") + unset(_gdal_version) +else () + set(GDAL_VERSION GDAL_VERSION-NOTFOUND) +endif () + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL + VERSION_VAR GDAL_VERSION + REQUIRED_VARS GDAL_LIBRARY GDAL_INCLUDE_DIR) + +if (GDAL_FOUND) + set(GDAL_LIBRARIES ${GDAL_LIBRARY}) + set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR}) + + if (NOT TARGET GDAL::GDAL) + add_library(GDAL::GDAL UNKNOWN IMPORTED) + set_target_properties(GDAL::GDAL PROPERTIES + IMPORTED_LOCATION "${GDAL_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${GDAL_INCLUDE_DIR}") + endif () +endif () diff --git a/CMake/patches/3.22/FindMPI.cmake b/CMake/patches/3.22/FindMPI.cmake new file mode 100644 index 000000000..e01967d99 --- /dev/null +++ b/CMake/patches/3.22/FindMPI.cmake @@ -0,0 +1,1893 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindMPI +------- + +Find a Message Passing Interface (MPI) implementation. + +The Message Passing Interface (MPI) is a library used to write +high-performance distributed-memory parallel applications, and is +typically deployed on a cluster. MPI is a standard interface (defined +by the MPI forum) for which many implementations are available. + +.. versionadded:: 3.10 + Major overhaul of the module: many new variables, per-language components, + support for a wider variety of runtimes. + +Variables for using MPI +^^^^^^^^^^^^^^^^^^^^^^^ + +The module exposes the components ``C``, ``CXX``, ``MPICXX`` and ``Fortran``. +Each of these controls the various MPI languages to search for. +The difference between ``CXX`` and ``MPICXX`` is that ``CXX`` refers to the +MPI C API being usable from C++, whereas ``MPICXX`` refers to the MPI-2 C++ API +that was removed again in MPI-3. + +Depending on the enabled components the following variables will be set: + +``MPI_FOUND`` + Variable indicating that MPI settings for all requested languages have been found. + If no components are specified, this is true if MPI settings for all enabled languages + were detected. Note that the ``MPICXX`` component does not affect this variable. +``MPI_VERSION`` + Minimal version of MPI detected among the requested languages, or all enabled languages + if no components were specified. + +This module will set the following variables per language in your +project, where ```` is one of C, CXX, or Fortran: + +``MPI__FOUND`` + Variable indicating the MPI settings for ```` were found and that + simple MPI test programs compile with the provided settings. +``MPI__COMPILER`` + MPI compiler for ```` if such a program exists. +``MPI__COMPILE_OPTIONS`` + Compilation options for MPI programs in ````, given as a :ref:`;-list `. +``MPI__COMPILE_DEFINITIONS`` + Compilation definitions for MPI programs in ````, given as a :ref:`;-list `. +``MPI__INCLUDE_DIRS`` + Include path(s) for MPI header. +``MPI__LINK_FLAGS`` + Linker flags for MPI programs. +``MPI__LIBRARIES`` + All libraries to link MPI programs against. + +.. versionadded:: 3.9 + Additionally, the following :prop_tgt:`IMPORTED` targets are defined: + +``MPI::MPI_`` + Target for using MPI from ````. + +The following variables indicating which bindings are present will be defined: + +``MPI_MPICXX_FOUND`` + Variable indicating whether the MPI-2 C++ bindings are present (introduced in MPI-2, removed with MPI-3). +``MPI_Fortran_HAVE_F77_HEADER`` + True if the Fortran 77 header ``mpif.h`` is available. +``MPI_Fortran_HAVE_F90_MODULE`` + True if the Fortran 90 module ``mpi`` can be used for accessing MPI (MPI-2 and higher only). +``MPI_Fortran_HAVE_F08_MODULE`` + True if the Fortran 2008 ``mpi_f08`` is available to MPI programs (MPI-3 and higher only). + +If possible, the MPI version will be determined by this module. The facilities to detect the MPI version +were introduced with MPI-1.2, and therefore cannot be found for older MPI versions. + +``MPI__VERSION_MAJOR`` + Major version of MPI implemented for ```` by the MPI distribution. +``MPI__VERSION_MINOR`` + Minor version of MPI implemented for ```` by the MPI distribution. +``MPI__VERSION`` + MPI version implemented for ```` by the MPI distribution. + +Note that there's no variable for the C bindings being accessible through ``mpi.h``, since the MPI standards +always have required this binding to work in both C and C++ code. + +For running MPI programs, the module sets the following variables + +``MPIEXEC_EXECUTABLE`` + Executable for running MPI programs, if such exists. +``MPIEXEC_NUMPROC_FLAG`` + Flag to pass to ``mpiexec`` before giving it the number of processors to run on. +``MPIEXEC_MAX_NUMPROCS`` + Number of MPI processors to utilize. Defaults to the number + of processors detected on the host system. +``MPIEXEC_PREFLAGS`` + Flags to pass to ``mpiexec`` directly before the executable to run. +``MPIEXEC_POSTFLAGS`` + Flags to pass to ``mpiexec`` after other flags. + +Variables for locating MPI +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This module performs a four step search for an MPI implementation: + +1. Search for ``MPIEXEC_EXECUTABLE`` and, if found, use its base directory. +2. Check if the compiler has MPI support built-in. This is the case if the user passed a + compiler wrapper as ``CMAKE__COMPILER`` or if they use Cray system compiler wrappers. +3. Attempt to find an MPI compiler wrapper and determine the compiler information from it. +4. Try to find an MPI implementation that does not ship such a wrapper by guessing settings. + Currently, only Microsoft MPI and MPICH2 on Windows are supported. + +For controlling the ``MPIEXEC_EXECUTABLE`` step, the following variables may be set: + +``MPIEXEC_EXECUTABLE`` + Manually specify the location of ``mpiexec``. +``MPI_HOME`` + Specify the base directory of the MPI installation. +``ENV{MPI_HOME}`` + Environment variable to specify the base directory of the MPI installation. +``ENV{I_MPI_ROOT}`` + Environment variable to specify the base directory of the MPI installation. + +For controlling the compiler wrapper step, the following variables may be set: + +``MPI__COMPILER`` + Search for the specified compiler wrapper and use it. +``MPI__COMPILER_FLAGS`` + Flags to pass to the MPI compiler wrapper during interrogation. Some compiler wrappers + support linking debug or tracing libraries if a specific flag is passed and this variable + may be used to obtain them. +``MPI_COMPILER_FLAGS`` + Used to initialize ``MPI__COMPILER_FLAGS`` if no language specific flag has been given. + Empty by default. +``MPI_EXECUTABLE_SUFFIX`` + A suffix which is appended to all names that are being looked for. For instance you may set this + to ``.mpich`` or ``.openmpi`` to prefer the one or the other on Debian and its derivatives. + +In order to control the guessing step, the following variable may be set: + +``MPI_GUESS_LIBRARY_NAME`` + Valid values are ``MSMPI`` and ``MPICH2``. If set, only the given library will be searched for. + By default, ``MSMPI`` will be preferred over ``MPICH2`` if both are available. + This also sets ``MPI_SKIP_COMPILER_WRAPPER`` to ``true``, which may be overridden. + +Each of the search steps may be skipped with the following control variables: + +``MPI_ASSUME_NO_BUILTIN_MPI`` + If true, the module assumes that the compiler itself does not provide an MPI implementation and + skips to step 2. +``MPI_SKIP_COMPILER_WRAPPER`` + If true, no compiler wrapper will be searched for. +``MPI_SKIP_GUESSING`` + If true, the guessing step will be skipped. + +Additionally, the following control variable is available to change search behavior: + +``MPI_CXX_SKIP_MPICXX`` + Add some definitions that will disable the MPI-2 C++ bindings. + Currently supported are MPICH, Open MPI, Platform MPI and derivatives thereof, + for example MVAPICH or Intel MPI. + +If the find procedure fails for a variable ``MPI__WORKS``, then the settings detected by or passed to +the module did not work and even a simple MPI test program failed to compile. + +If all of these parameters were not sufficient to find the right MPI implementation, a user may +disable the entire autodetection process by specifying both a list of libraries in ``MPI__LIBRARIES`` +and a list of include directories in ``MPI__ADDITIONAL_INCLUDE_DIRS``. +Any other variable may be set in addition to these two. The module will then validate the MPI settings and store the +settings in the cache. + +Cache variables for MPI +^^^^^^^^^^^^^^^^^^^^^^^ + +The variable ``MPI__INCLUDE_DIRS`` will be assembled from the following variables. +For C and CXX: + +``MPI__HEADER_DIR`` + Location of the ``mpi.h`` header on disk. + +For Fortran: + +``MPI_Fortran_F77_HEADER_DIR`` + Location of the Fortran 77 header ``mpif.h``, if it exists. +``MPI_Fortran_MODULE_DIR`` + Location of the ``mpi`` or ``mpi_f08`` modules, if available. + +For all languages the following variables are additionally considered: + +``MPI__ADDITIONAL_INCLUDE_DIRS`` + A :ref:`;-list ` of paths needed in addition to the normal include directories. +``MPI__INCLUDE_DIR`` + Path variables for include folders referred to by ````. +``MPI__ADDITIONAL_INCLUDE_VARS`` + A :ref:`;-list ` of ```` that will be added to the include locations of ````. + +The variable ``MPI__LIBRARIES`` will be assembled from the following variables: + +``MPI__LIBRARY`` + The location of a library called ```` for use with MPI. +``MPI__LIB_NAMES`` + A :ref:`;-list ` of ```` that will be added to the include locations of ````. + +Usage of mpiexec +^^^^^^^^^^^^^^^^ + +When using ``MPIEXEC_EXECUTABLE`` to execute MPI applications, you should typically +use all of the ``MPIEXEC_EXECUTABLE`` flags as follows: + +:: + + ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} + ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS + +where ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to +pass to the MPI program. + +Advanced variables for using MPI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The module can perform some advanced feature detections upon explicit request. + +**Important notice:** The following checks cannot be performed without *executing* an MPI test program. +Consider the special considerations for the behavior of :command:`try_run` during cross compilation. +Moreover, running an MPI program can cause additional issues, like a firewall notification on some systems. +You should only enable these detections if you absolutely need the information. + +If the following variables are set to true, the respective search will be performed: + +``MPI_DETERMINE_Fortran_CAPABILITIES`` + Determine for all available Fortran bindings what the values of ``MPI_SUBARRAYS_SUPPORTED`` and + ``MPI_ASYNC_PROTECTS_NONBLOCKING`` are and make their values available as ``MPI_Fortran__SUBARRAYS`` + and ``MPI_Fortran__ASYNCPROT``, where ```` is one of ``F77_HEADER``, ``F90_MODULE`` and + ``F08_MODULE``. +``MPI_DETERMINE_LIBRARY_VERSION`` + For each language, find the output of ``MPI_Get_library_version`` and make it available as ``MPI__LIBRARY_VERSION_STRING``. + This information is usually tied to the runtime component of an MPI implementation and might differ depending on ````. + Note that the return value is entirely implementation defined. This information might be used to identify + the MPI vendor and for example pick the correct one of multiple third party binaries that matches the MPI vendor. + +Backward Compatibility +^^^^^^^^^^^^^^^^^^^^^^ + +.. deprecated:: 3.10 + +For backward compatibility with older versions of FindMPI, these +variables are set: + +:: + + MPI_COMPILER MPI_LIBRARY MPI_EXTRA_LIBRARY + MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_LINK_FLAGS + MPI_LIBRARIES + +In new projects, please use the ``MPI__XXX`` equivalents. +Additionally, the following variables are deprecated: + +``MPI__COMPILE_FLAGS`` + Use ``MPI__COMPILE_OPTIONS`` and ``MPI__COMPILE_DEFINITIONS`` instead. +``MPI__INCLUDE_PATH`` + For consumption use ``MPI__INCLUDE_DIRS`` and for specifying folders use ``MPI__ADDITIONAL_INCLUDE_DIRS`` instead. +``MPIEXEC`` + Use ``MPIEXEC_EXECUTABLE`` instead. +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST + +include(FindPackageHandleStandardArgs) + +# Generic compiler names +set(_MPI_C_GENERIC_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r) +set(_MPI_CXX_GENERIC_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++ + mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r) +set(_MPI_Fortran_GENERIC_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r + mpif90 mpif90_r mpf90 mpf90_r + mpif77 mpif77_r mpf77 mpf77_r + mpifc) + +#Fujitsu cross/own compiler names +set(_MPI_Fujitsu_C_COMPILER_NAMES mpifccpx mpifcc) +set(_MPI_Fujitsu_CXX_COMPILER_NAMES mpiFCCpx mpiFCC) +set(_MPI_Fujitsu_Fortran_COMPILER_NAMES mpifrtpx mpifrt) + +# GNU compiler names +set(_MPI_GNU_C_COMPILER_NAMES mpigcc mpgcc mpigcc_r mpgcc_r) +set(_MPI_GNU_CXX_COMPILER_NAMES mpig++ mpg++ mpig++_r mpg++_r mpigxx) +set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r mpgfortran_r + mpig77 mpig77_r mpg77 mpg77_r) + +# Intel MPI compiler names on Windows +if(WIN32) + list(APPEND _MPI_C_GENERIC_COMPILER_NAMES mpicc.bat) + list(APPEND _MPI_CXX_GENERIC_COMPILER_NAMES mpicxx.bat) + list(APPEND _MPI_Fortran_GENERIC_COMPILER_NAMES mpifc.bat) + + # Intel MPI compiler names + set(_MPI_Intel_C_COMPILER_NAMES mpiicc.bat) + set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc.bat) + set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort.bat mpif77.bat mpif90.bat) + + # Intel MPI compiler names + set(_MPI_IntelLLVM_C_COMPILER_NAMES mpiicc.bat) + set(_MPI_IntelLLVM_CXX_COMPILER_NAMES mpiicpc.bat) + set(_MPI_IntelLLVM_Fortran_COMPILER_NAMES mpiifort.bat mpif77.bat mpif90.bat) + + # Intel MPI compiler names for MSMPI + set(_MPI_MSVC_C_COMPILER_NAMES mpicl.bat) + set(_MPI_MSVC_CXX_COMPILER_NAMES mpicl.bat) +else() + # Intel compiler names + set(_MPI_Intel_C_COMPILER_NAMES mpiicc) + set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++) + set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77) + + # Intel compiler names + set(_MPI_IntelLLVM_C_COMPILER_NAMES mpiicc) + set(_MPI_IntelLLVM_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++) + set(_MPI_IntelLLVM_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77) +endif() + +# PGI compiler names +set(_MPI_PGI_C_COMPILER_NAMES mpipgicc mpipgcc mppgcc) +set(_MPI_PGI_CXX_COMPILER_NAMES mpipgic++ mpipgCC mppgCC) +set(_MPI_PGI_Fortran_COMPILER_NAMES mpipgifort mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77) + +# XLC MPI Compiler names +set(_MPI_XL_C_COMPILER_NAMES mpxlc mpxlc_r mpixlc mpixlc_r) +set(_MPI_XL_CXX_COMPILER_NAMES mpixlcxx mpixlC mpixlc++ mpxlcxx mpxlc++ mpixlc++ mpxlCC + mpixlcxx_r mpixlC_r mpixlc++_r mpxlcxx_r mpxlc++_r mpixlc++_r mpxlCC_r) +set(_MPI_XL_Fortran_COMPILER_NAMES mpixlf95 mpixlf95_r mpxlf95 mpxlf95_r + mpixlf90 mpixlf90_r mpxlf90 mpxlf90_r + mpixlf77 mpixlf77_r mpxlf77 mpxlf77_r + mpixlf mpixlf_r mpxlf mpxlf_r) + +# Cray Compiler names +set(_MPI_Cray_C_COMPILER_NAMES cc) +set(_MPI_Cray_CXX_COMPILER_NAMES CC) +set(_MPI_Cray_Fortran_COMPILER_NAMES ftn) + +# Prepend vendor-specific compiler wrappers to the list. If we don't know the compiler, +# attempt all of them. +# By attempting vendor-specific compiler names first, we should avoid situations where the compiler wrapper +# stems from a proprietary MPI and won't know which compiler it's being used for. For instance, Intel MPI +# controls its settings via the I_MPI_CC environment variables if the generic name is being used. +# If we know which compiler we're working with, we can use the most specialized wrapper there is in order to +# pick up the right settings for it. +foreach (LANG IN ITEMS C CXX Fortran) + set(_MPI_${LANG}_COMPILER_NAMES "") + foreach (id IN ITEMS Fujitsu FujitsuClang GNU Intel IntelLLVM MSVC PGI XL) + if (NOT CMAKE_${LANG}_COMPILER_ID OR CMAKE_${LANG}_COMPILER_ID STREQUAL id) + foreach(_COMPILER_NAME IN LISTS _MPI_${id}_${LANG}_COMPILER_NAMES) + list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_COMPILER_NAME}${MPI_EXECUTABLE_SUFFIX}) + endforeach() + endif() + unset(_MPI_${id}_${LANG}_COMPILER_NAMES) + endforeach() + foreach(_COMPILER_NAME IN LISTS _MPI_${LANG}_GENERIC_COMPILER_NAMES) + list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_COMPILER_NAME}${MPI_EXECUTABLE_SUFFIX}) + endforeach() + unset(_MPI_${LANG}_GENERIC_COMPILER_NAMES) +endforeach() + +# Names to try for mpiexec +# Only mpiexec commands are guaranteed to behave as described in the standard, +# mpirun commands are not covered by the standard in any way whatsoever. +# lamexec is the executable for LAM/MPI, srun is for SLURM or Open MPI with SLURM support. +# srun -n X is however a valid command, so it behaves 'like' mpiexec. +set(_MPIEXEC_NAMES_BASE mpiexec mpiexec.hydra mpiexec.mpd mpirun lamexec srun) + +unset(_MPIEXEC_NAMES) +foreach(_MPIEXEC_NAME IN LISTS _MPIEXEC_NAMES_BASE) + list(APPEND _MPIEXEC_NAMES "${_MPIEXEC_NAME}${MPI_EXECUTABLE_SUFFIX}") +endforeach() +unset(_MPIEXEC_NAMES_BASE) + +function (_MPI_check_compiler LANG QUERY_FLAG OUTPUT_VARIABLE RESULT_VARIABLE) + if(DEFINED MPI_${LANG}_COMPILER_FLAGS) + separate_arguments(_MPI_COMPILER_WRAPPER_OPTIONS NATIVE_COMMAND "${MPI_${LANG}_COMPILER_FLAGS}") + else() + separate_arguments(_MPI_COMPILER_WRAPPER_OPTIONS NATIVE_COMMAND "${MPI_COMPILER_FLAGS}") + endif() + execute_process( + COMMAND ${MPI_${LANG}_COMPILER} ${_MPI_COMPILER_WRAPPER_OPTIONS} ${QUERY_FLAG} + OUTPUT_VARIABLE WRAPPER_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE WRAPPER_OUTPUT ERROR_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE WRAPPER_RETURN) + # Some compiler wrappers will yield spurious zero return values, for example + # Intel MPI tolerates unknown arguments and if the MPI wrappers loads a shared + # library that has invalid or missing version information there would be warning + # messages emitted by ld.so in the compiler output. In either case, we'll treat + # the output as invalid. + if("${WRAPPER_OUTPUT}" MATCHES "undefined reference|unrecognized|need to set|no version information available|command not found") + set(WRAPPER_RETURN 255) + endif() + # Ensure that no error output might be passed upwards. + if(NOT WRAPPER_RETURN EQUAL 0) + unset(WRAPPER_OUTPUT) + else() + # Strip leading whitespace + string(REGEX REPLACE "^ +" "" WRAPPER_OUTPUT "${WRAPPER_OUTPUT}") + endif() + set(${OUTPUT_VARIABLE} "${WRAPPER_OUTPUT}" PARENT_SCOPE) + set(${RESULT_VARIABLE} "${WRAPPER_RETURN}" PARENT_SCOPE) +endfunction() + +macro(_MPI_env_set_ifnot VAR VALUE) + if(NOT DEFINED ENV{${VAR}}) + set(_MPI_${VAR}_WAS_SET FALSE) + set(ENV{${VAR}} ${${VALUE}}) + else() + set(_MPI_${VAR}_WAS_SET TRUE) + endif() +endmacro() + +macro(_MPI_env_unset_ifnot VAR) + if(NOT _MPI_${VAR}_WAS_SET) + unset(ENV{${VAR}}) + endif() +endmacro() + +function (_MPI_interrogate_compiler LANG) + unset(MPI_COMPILE_CMDLINE) + unset(MPI_LINK_CMDLINE) + + unset(MPI_COMPILE_OPTIONS_WORK) + unset(MPI_COMPILE_DEFINITIONS_WORK) + unset(MPI_INCLUDE_DIRS_WORK) + unset(MPI_LINK_FLAGS_WORK) + unset(MPI_LIB_NAMES_WORK) + unset(MPI_LIB_FULLPATHS_WORK) + + # Define the MPICH and Intel MPI compiler variables to the compilers set in CMake. + # It's possible to have a per-compiler configuration in these MPI implementations and + # a particular MPICH derivate might check compiler interoperability. + # Intel MPI in particular does this with I_MPI_CHECK_COMPILER. + file(TO_NATIVE_PATH "${CMAKE_${LANG}_COMPILER}" _MPI_UNDERLAYING_COMPILER) + # On Windows, the Intel MPI batch scripts can only work with filnames - Full paths will break them. + # Due to the lack of other MPICH-based wrappers for Visual C++, we may treat this as default. + if(MSVC) + get_filename_component(_MPI_UNDERLAYING_COMPILER "${_MPI_UNDERLAYING_COMPILER}" NAME) + endif() + if("${LANG}" STREQUAL "C") + _MPI_env_set_ifnot(I_MPI_CC _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_CC _MPI_UNDERLAYING_COMPILER) + elseif("${LANG}" STREQUAL "CXX") + _MPI_env_set_ifnot(I_MPI_CXX _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_CXX _MPI_UNDERLAYING_COMPILER) + elseif("${LANG}" STREQUAL "Fortran") + _MPI_env_set_ifnot(I_MPI_FC _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_FC _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(I_MPI_F77 _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_F77 _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(I_MPI_F90 _MPI_UNDERLAYING_COMPILER) + _MPI_env_set_ifnot(MPICH_F90 _MPI_UNDERLAYING_COMPILER) + endif() + + # Set these two variables for Intel MPI: + # - I_MPI_DEBUG_INFO_STRIP: It adds 'objcopy' lines to the compiler output. We support stripping them + # (see below), but if we can avoid them in the first place, we should. + # - I_MPI_FORT_BIND: By default Intel MPI makes the C/C++ compiler wrappers link Fortran bindings. + # This is so that mixed-language code doesn't require additional libraries when linking with mpicc. + # For our purposes, this makes little sense, since correct MPI usage from CMake already circumvenes this. + set(_MPI_ENV_VALUE "disable") + _MPI_env_set_ifnot(I_MPI_DEBUG_INFO_STRIP _MPI_ENV_VALUE) + _MPI_env_set_ifnot(I_MPI_FORT_BIND _MPI_ENV_VALUE) + + # Check whether the -showme:compile option works. This indicates that we have either Open MPI + # or a newer version of LAM/MPI, and implies that -showme:link will also work. + # Open MPI also supports -show, but separates linker and compiler information + _MPI_check_compiler(${LANG} "-showme:compile" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + if (MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-showme:link" MPI_LINK_CMDLINE MPI_COMPILER_RETURN) + + if (NOT MPI_COMPILER_RETURN EQUAL 0) + unset(MPI_COMPILE_CMDLINE) + endif() + endif() + + # MPICH and MVAPICH offer -compile-info and -link-info. + # For modern versions, both do the same as -show. However, for old versions, they do differ + # when called for mpicxx and mpif90 and it's necessary to use them over -show in order to find the + # removed MPI C++ bindings. + if (NOT MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-compile-info" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + + if (MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-link-info" MPI_LINK_CMDLINE MPI_COMPILER_RETURN) + + if (NOT MPI_COMPILER_RETURN EQUAL 0) + unset(MPI_COMPILE_CMDLINE) + endif() + endif() + endif() + + # Cray compiler wrappers come usually without a separate mpicc/c++/ftn, but offer + # --cray-print-opts=... + if (NOT MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "--cray-print-opts=cflags" + MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + + if (MPI_COMPILER_RETURN EQUAL 0) + # Pass --no-as-needed so the mpi library is always linked. Otherwise, the + # Cray compiler wrapper puts an --as-needed flag around the mpi library, + # and it is not linked unless code directly refers to it. + _MPI_check_compiler(${LANG} "--no-as-needed;--cray-print-opts=libs" + MPI_LINK_CMDLINE MPI_COMPILER_RETURN) + + if (NOT MPI_COMPILER_RETURN EQUAL 0) + unset(MPI_COMPILE_CMDLINE) + unset(MPI_LINK_CMDLINE) + endif() + endif() + endif() + + # MPICH, MVAPICH2 and Intel MPI just use "-show". Open MPI also offers this, but the + # -showme commands are more specialized. + if (NOT MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-show" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + endif() + + # Older versions of LAM/MPI have "-showme". Open MPI also supports this. + # Unknown to MPICH, MVAPICH and Intel MPI. + if (NOT MPI_COMPILER_RETURN EQUAL 0) + _MPI_check_compiler(${LANG} "-showme" MPI_COMPILE_CMDLINE MPI_COMPILER_RETURN) + endif() + + if (MPI_COMPILER_RETURN EQUAL 0 AND DEFINED MPI_COMPILE_CMDLINE) + # Intel MPI can be run with -compchk or I_MPI_CHECK_COMPILER set to 1. + # In this case, -show will be prepended with a line to the compiler checker. This is a script that performs + # compatibility checks and returns a non-zero exit code together with an error if something fails. + # It has to be called as "compchk.sh ". Here, is one out of 32 (i686), 64 (ia64) or 32e (x86_64). + # The compiler is identified by filename, and can be either the MPI compiler or the underlying compiler. + # NOTE: It is vital to run this script while the environment variables are set up, otherwise it can check the wrong compiler. + if("${MPI_COMPILE_CMDLINE}" MATCHES "^([^\" ]+/compchk.sh|\"[^\"]+/compchk.sh\") +([^ ]+)") + # Now CMAKE_MATCH_1 contains the path to the compchk.sh file and CMAKE_MATCH_2 the architecture flag. + unset(COMPILER_CHECKER_OUTPUT) + execute_process( + COMMAND ${CMAKE_MATCH_1} ${CMAKE_MATCH_2} ${MPI_${LANG}_COMPILER} + OUTPUT_VARIABLE COMPILER_CHECKER_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_VARIABLE COMPILER_CHECKER_OUTPUT ERROR_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE MPI_COMPILER_RETURN) + # If it returned a non-zero value, the check below will fail and cause the interrogation to be aborted. + if(NOT MPI_COMPILER_RETURN EQUAL 0) + if(NOT MPI_FIND_QUIETLY) + message(STATUS "Intel MPI compiler check failed: ${COMPILER_CHECKER_OUTPUT}") + endif() + else() + # Since the check passed, we can remove the compchk.sh script. + string(REGEX REPLACE "^([^\" ]+|\"[^\"]+\")/compchk.sh.*\n" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + endif() + endif() + endif() + + # Revert changes to the environment made previously + if("${LANG}" STREQUAL "C") + _MPI_env_unset_ifnot(I_MPI_CC) + _MPI_env_unset_ifnot(MPICH_CC) + elseif("${LANG}" STREQUAL "CXX") + _MPI_env_unset_ifnot(I_MPI_CXX) + _MPI_env_unset_ifnot(MPICH_CXX) + elseif("${LANG}" STREQUAL "Fortran") + _MPI_env_unset_ifnot(I_MPI_FC) + _MPI_env_unset_ifnot(MPICH_FC) + _MPI_env_unset_ifnot(I_MPI_F77) + _MPI_env_unset_ifnot(MPICH_F77) + _MPI_env_unset_ifnot(I_MPI_F90) + _MPI_env_unset_ifnot(MPICH_F90) + endif() + + _MPI_env_unset_ifnot(I_MPI_DEBUG_INFO_STRIP) + _MPI_env_unset_ifnot(I_MPI_FORT_BIND) + + if (NOT (MPI_COMPILER_RETURN EQUAL 0) OR NOT (DEFINED MPI_COMPILE_CMDLINE)) + # Cannot interrogate this compiler, so exit. + set(MPI_${LANG}_WRAPPER_FOUND FALSE PARENT_SCOPE) + return() + endif() + unset(MPI_COMPILER_RETURN) + + # We have our command lines, but we might need to copy MPI_COMPILE_CMDLINE + # into MPI_LINK_CMDLINE, if we didn't find the link line. + if (NOT DEFINED MPI_LINK_CMDLINE) + set(MPI_LINK_CMDLINE "${MPI_COMPILE_CMDLINE}") + endif() + + # Visual Studio parsers permit each flag prefixed by either / or -. + # We'll normalize this to the - syntax we use for CMake purposes anyways. + if(MSVC) + foreach(_MPI_VARIABLE IN ITEMS COMPILE LINK) + # The Intel MPI wrappers on Windows prefix their output with some copyright boilerplate. + # To prevent possible problems, we discard this text before proceeding with any further matching. + string(REGEX REPLACE "^[^ ]+ for the Intel\\(R\\) MPI Library [^\n]+ for Windows\\*\nCopyright\\(C\\) [^\n]+, Intel Corporation\\. All rights reserved\\.\n\n" "" + MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") + string(REGEX REPLACE "(^| )/" "\\1-" MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") + string(REPLACE "-libpath:" "-LIBPATH:" MPI_${_MPI_VARIABLE}_CMDLINE "${MPI_${_MPI_VARIABLE}_CMDLINE}") + endforeach() + endif() + + # For MSVC and cl-compatible compilers, the keyword /link indicates a point after which + # everything following is passed to the linker. In this case, we drop all prior information + # from the link line and treat any unknown extra flags as linker flags. + set(_MPI_FILTERED_LINK_INFORMATION FALSE) + if(MSVC) + if(MPI_LINK_CMDLINE MATCHES " -(link|LINK) ") + string(REGEX REPLACE ".+-(link|LINK) +" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + set(_MPI_FILTERED_LINK_INFORMATION TRUE) + endif() + string(REGEX REPLACE " +-(link|LINK) .+" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + endif() + + if(UNIX) + # At this point, we obtained some output from a compiler wrapper that works. + # We'll now try to parse it into variables with meaning to us. + if("${LANG}" STREQUAL "Fortran") + # If MPICH (and derivates) didn't recognize the Fortran compiler include flag during configuration, + # they'll return a set of three commands, consisting out of a symlink command for mpif.h, + # the actual compiler command and deletion of the created symlink. + # Especially with M(VA)PICH-1, this appears to happen erroneously, and therefore we should translate + # this output into an additional include directory and then drop it from the output. + if("${MPI_COMPILE_CMDLINE}" MATCHES "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h") + get_filename_component(MPI_INCLUDE_DIRS_WORK "${CMAKE_MATCH_1}" DIRECTORY) + string(REGEX REPLACE "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h\n" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "^ln -s ([^\" ]+|\"[^\"]+\") mpif.h\n" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + string(REGEX REPLACE "\nrm -f mpif.h$" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "\nrm -f mpif.h$" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + endif() + endif() + + # If Intel MPI was configured for static linkage with -static_mpi, the wrapper will by default strip + # debug information from resulting binaries (see I_MPI_DEBUG_INFO_STRIP). + # Since we cannot process this information into CMake logic, we need to discard the resulting objcopy + # commands from the output. + string(REGEX REPLACE "(^|\n)objcopy[^\n]+(\n|$)" "" MPI_COMPILE_CMDLINE "${MPI_COMPILE_CMDLINE}") + string(REGEX REPLACE "(^|\n)objcopy[^\n]+(\n|$)" "" MPI_LINK_CMDLINE "${MPI_LINK_CMDLINE}") + endif() + + # For Visual C++, extracting compiler options in a generic fashion isn't easy. However, no MPI implementation + # on Windows seems to require any specific ones, either. + if(NOT MSVC) + # Extract compile options from the compile command line. + string(REGEX MATCHALL "(^| )-f([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_OPTIONS "${MPI_COMPILE_CMDLINE}") + + foreach(_MPI_COMPILE_OPTION IN LISTS MPI_ALL_COMPILE_OPTIONS) + string(REGEX REPLACE "^ " "" _MPI_COMPILE_OPTION "${_MPI_COMPILE_OPTION}") + + # Ignore -fstack-protector directives: These occur on MPICH and MVAPICH when the libraries + # themselves were built with this flag. However, this flag is unrelated to using MPI, and + # we won't match the accompanying --param-ssp-size and -Wp,-D_FORTIFY_SOURCE flags and therefore + # produce inconsistent results with the regularly flags. + # Similarly, aliasing flags do not belong into our flag array. + # Also strip out `-framework` flags. + if(NOT "${_MPI_COMPILE_OPTION}" MATCHES "^-f((no-|)(stack-protector|strict-aliasing)|PI[CE]|pi[ce]|ramework)") + list(APPEND MPI_COMPILE_OPTIONS_WORK "${_MPI_COMPILE_OPTION}") + endif() + endforeach() + endif() + + # For GNU-style compilers, it's possible to prefix includes and definitions with certain flags to pass them + # only to the preprocessor. For CMake purposes, we need to treat, but ignore such scopings. + # Note that we do not support spaces between the arguments, i.e. -Wp,-I -Wp,/opt/mympi will not be parsed + # correctly. This form does not seem to occur in any common MPI implementation, however. + if(NOT MSVC) + set(_MPI_PREPROCESSOR_FLAG_REGEX "(-Wp,|-Xpreprocessor )?") + else() + set(_MPI_PREPROCESSOR_FLAG_REGEX "") + endif() + + # Same deal as above, for the definitions. + string(REGEX MATCHALL "(^| )${_MPI_PREPROCESSOR_FLAG_REGEX}-D *([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_DEFINITIONS "${MPI_COMPILE_CMDLINE}") + + foreach(_MPI_COMPILE_DEFINITION IN LISTS MPI_ALL_COMPILE_DEFINITIONS) + string(REGEX REPLACE "^ ?${_MPI_PREPROCESSOR_FLAG_REGEX}-D *" "" _MPI_COMPILE_DEFINITION "${_MPI_COMPILE_DEFINITION}") + string(REPLACE "\"" "" _MPI_COMPILE_DEFINITION "${_MPI_COMPILE_DEFINITION}") + if(NOT "${_MPI_COMPILE_DEFINITION}" MATCHES "^_FORTIFY_SOURCE.*") + list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${_MPI_COMPILE_DEFINITION}") + endif() + endforeach() + + # Extract include paths from compile command line + string(REGEX MATCHALL "(^| )${_MPI_PREPROCESSOR_FLAG_REGEX}${CMAKE_INCLUDE_FLAG_${LANG}} *([^\" ]+|\"[^\"]+\")" + MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}") + + # If extracting failed to work, we'll try using -showme:incdirs. + # Unlike before, we do this without the environment variables set up, but since only MPICH derivates are affected by any of them, and + # -showme:... is only supported by Open MPI and LAM/MPI, this isn't a concern. + if (NOT MPI_ALL_INCLUDE_PATHS) + _MPI_check_compiler(${LANG} "-showme:incdirs" MPI_INCDIRS_CMDLINE MPI_INCDIRS_COMPILER_RETURN) + if(MPI_INCDIRS_COMPILER_RETURN) + separate_arguments(MPI_ALL_INCLUDE_PATHS NATIVE_COMMAND "${MPI_INCDIRS_CMDLINE}") + endif() + endif() + + foreach(_MPI_INCLUDE_PATH IN LISTS MPI_ALL_INCLUDE_PATHS) + string(REGEX REPLACE "^ ?${_MPI_PREPROCESSOR_FLAG_REGEX}${CMAKE_INCLUDE_FLAG_${LANG}} *" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + string(REPLACE "\"" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + string(REPLACE "'" "" _MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}") + get_filename_component(_MPI_INCLUDE_PATH "${_MPI_INCLUDE_PATH}" REALPATH) + list(APPEND MPI_INCLUDE_DIRS_WORK "${_MPI_INCLUDE_PATH}") + endforeach() + + # The next step are linker flags and library directories. Here, we first take the flags given in raw -L or -LIBPATH: syntax. + string(REGEX MATCHALL "(^| )${CMAKE_LIBRARY_PATH_FLAG} *([^\" ]+|\"[^\"]+\")" MPI_DIRECT_LINK_PATHS "${MPI_LINK_CMDLINE}") + foreach(_MPI_LPATH IN LISTS MPI_DIRECT_LINK_PATHS) + string(REGEX REPLACE "(^| )${CMAKE_LIBRARY_PATH_FLAG} *" "" _MPI_LPATH "${_MPI_LPATH}") + list(APPEND MPI_ALL_LINK_PATHS "${_MPI_LPATH}") + endforeach() + + # If the link commandline hasn't been filtered (e.g. when using MSVC and /link), we need to extract the relevant parts first. + if(NOT _MPI_FILTERED_LINK_INFORMATION) + string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker +)([^\" ]+|\"[^\"]+\")" MPI_LINK_FLAGS "${MPI_LINK_CMDLINE}") + + # In this case, we could also find some indirectly given linker paths, e.g. prefixed by -Xlinker or -Wl, + # Since syntaxes like -Wl,-L -Wl,/my/path/to/lib are also valid, we parse these paths by first removing -Wl, and -Xlinker + # from the list of filtered flags and then parse the remainder of the output. + string(REGEX REPLACE "(-Wl,|-Xlinker +)" "" MPI_LINK_FLAGS_RAW "${MPI_LINK_FLAGS}") + + # Now we can parse the leftover output. Note that spaces can now be handled since the above example would reduce to + # -L /my/path/to/lib and can be extracted correctly. + string(REGEX MATCHALL "^(${CMAKE_LIBRARY_PATH_FLAG},? *|--library-path=)([^\" ]+|\"[^\"]+\")" + MPI_INDIRECT_LINK_PATHS "${MPI_LINK_FLAGS_RAW}") + + foreach(_MPI_LPATH IN LISTS MPI_INDIRECT_LINK_PATHS) + string(REGEX REPLACE "^(${CMAKE_LIBRARY_PATH_FLAG},? *|--library-path=)" "" _MPI_LPATH "${_MPI_LPATH}") + list(APPEND MPI_ALL_LINK_PATHS "${_MPI_LPATH}") + endforeach() + + # We need to remove the flags we extracted from the linker flag list now. + string(REGEX REPLACE "(^| )(-Wl,|-Xlinker +)(${CMAKE_LIBRARY_PATH_FLAG},? *(-Wl,|-Xlinker +)?|--library-path=)([^\" ]+|\"[^\"]+\")" "" + MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE}") + + # Some MPI implementations pass on options they themselves were built with. Since -z,noexecstack is a common + # hardening, we should strip it. In general, the -z options should be undesirable. + string(REGEX REPLACE "(^| )-Wl,-z(,[^ ]+| +-Wl,[^ ]+)" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE_FILTERED}") + string(REGEX REPLACE "(^| )-Xlinker +-z +-Xlinker +[^ ]+" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE_FILTERED}") + + # We only consider options of the form -Wl or -Xlinker: + string(REGEX MATCHALL "(^| )(-Wl,|-Xlinker +)([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE_FILTERED}") + + # As a next step, we assemble the linker flags extracted in a preliminary flags string + foreach(_MPI_LINK_FLAG IN LISTS MPI_ALL_LINK_FLAGS) + string(STRIP "${_MPI_LINK_FLAG}" _MPI_LINK_FLAG) + if (MPI_LINK_FLAGS_WORK) + string(APPEND MPI_LINK_FLAGS_WORK " ${_MPI_LINK_FLAG}") + else() + set(MPI_LINK_FLAGS_WORK "${_MPI_LINK_FLAG}") + endif() + endforeach() + else() + # In the filtered case, we obtain the link time flags by just stripping the library paths. + string(REGEX REPLACE "(^| )${CMAKE_LIBRARY_PATH_FLAG} *([^\" ]+|\"[^\"]+\")" "" MPI_LINK_CMDLINE_FILTERED "${MPI_LINK_CMDLINE}") + endif() + + # If we failed to extract any linker paths, we'll try using the -showme:libdirs option with the MPI compiler. + # This will return a list of folders, not a set of flags! + if (NOT MPI_ALL_LINK_PATHS) + _MPI_check_compiler(${LANG} "-showme:libdirs" MPI_LIBDIRS_CMDLINE MPI_LIBDIRS_COMPILER_RETURN) + if(MPI_LIBDIRS_COMPILER_RETURN) + separate_arguments(MPI_ALL_LINK_PATHS NATIVE_COMMAND "${MPI_LIBDIRS_CMDLINE}") + endif() + endif() + + # We need to remove potential quotes and convert the paths to CMake syntax while resolving them, too. + foreach(_MPI_LPATH IN LISTS MPI_ALL_LINK_PATHS) + string(REPLACE "\"" "" _MPI_LPATH "${_MPI_LPATH}") + get_filename_component(_MPI_LPATH "${_MPI_LPATH}" REALPATH) + list(APPEND MPI_LINK_DIRECTORIES_WORK "${_MPI_LPATH}") + endforeach() + + # Extract the set of libraries to link against from the link command line + # This only makes sense if CMAKE_LINK_LIBRARY_FLAG is defined, i.e. a -lxxxx syntax is supported by the compiler. + if(CMAKE_LINK_LIBRARY_FLAG) + string(REGEX MATCHALL "(^| )${CMAKE_LINK_LIBRARY_FLAG}([^\" ]+|\"[^\"]+\")" + MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) + string(REGEX REPLACE "^ ?${CMAKE_LINK_LIBRARY_FLAG}" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + string(REPLACE "\"" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") + endforeach() + endif() + + # Treat linker objects given by full path, for example static libraries, import libraries + # or shared libraries if there aren't any import libraries in use on the system. + # Note that we do not consider CMAKE__LIBRARY_PREFIX intentionally here: The linker will for a given file + # decide how to link it based on file type, not based on a prefix like 'lib'. + set(_MPI_LIB_SUFFIX_REGEX "${CMAKE_STATIC_LIBRARY_SUFFIX}") + if(DEFINED CMAKE_IMPORT_LIBRARY_SUFFIX) + if(NOT ("${CMAKE_IMPORT_LIBRARY_SUFFIX}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")) + string(APPEND _MPI_SUFFIX_REGEX "|${CMAKE_IMPORT_LIBRARY_SUFFIX}") + endif() + else() + string(APPEND _MPI_LIB_SUFFIX_REGEX "|${CMAKE_SHARED_LIBRARY_SUFFIX}") + endif() + set(_MPI_LIB_NAME_REGEX "(([^\" ]+(${_MPI_LIB_SUFFIX_REGEX}))|(\"[^\"]+(${_MPI_LIB_SUFFIX_REGEX})\"))( +|$)") + string(REPLACE "." "\\." _MPI_LIB_NAME_REGEX "${_MPI_LIB_NAME_REGEX}") + + string(REGEX MATCHALL "${_MPI_LIB_NAME_REGEX}" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) + string(REGEX REPLACE "^ +\"?|\"? +$" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_NAME}" DIRECTORY) + if(NOT "${_MPI_LIB_PATH}" STREQUAL "") + list(APPEND MPI_LIB_FULLPATHS_WORK "${_MPI_LIB_NAME}") + else() + list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") + endif() + endforeach() + + # Save the explicitly given link directories + set(MPI_LINK_DIRECTORIES_LEFTOVER "${MPI_LINK_DIRECTORIES_WORK}") + + # An MPI compiler wrapper could have its MPI libraries in the implicitly + # linked directories of the compiler itself. + if(DEFINED CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) + list(APPEND MPI_LINK_DIRECTORIES_WORK "${CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES}") + endif() + + # Determine full path names for all of the libraries that one needs + # to link against in an MPI program + unset(MPI_PLAIN_LIB_NAMES_WORK) + foreach(_MPI_LIB_NAME IN LISTS MPI_LIB_NAMES_WORK) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB_NAME}" NAME_WE) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${MPI_LINK_DIRECTORIES_WORK} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + # Remove the directory from the remainder list. + if(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + get_filename_component(_MPI_TAKEN_DIRECTORY "${MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY}" DIRECTORY) + list(REMOVE_ITEM MPI_LINK_DIRECTORIES_LEFTOVER "${_MPI_TAKEN_DIRECTORY}") + endif() + endforeach() + + # Add the link directories given explicitly that we haven't used back as linker directories. + if(NOT WIN32) + foreach(_MPI_LINK_DIRECTORY IN LISTS MPI_LINK_DIRECTORIES_LEFTOVER) + file(TO_NATIVE_PATH "${_MPI_LINK_DIRECTORY}" _MPI_LINK_DIRECTORY_ACTUAL) + string(FIND "${_MPI_LINK_DIRECTORY_ACTUAL}" " " _MPI_LINK_DIRECTORY_CONTAINS_SPACE) + if(NOT _MPI_LINK_DIRECTORY_CONTAINS_SPACE EQUAL -1) + set(_MPI_LINK_DIRECTORY_ACTUAL "\"${_MPI_LINK_DIRECTORY_ACTUAL}\"") + endif() + if(MPI_LINK_FLAGS_WORK) + string(APPEND MPI_LINK_FLAGS_WORK " ${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}") + else() + set(MPI_LINK_FLAGS_WORK "${CMAKE_LIBRARY_PATH_FLAG}${_MPI_LINK_DIRECTORY_ACTUAL}") + endif() + endforeach() + endif() + + # Deal with the libraries given with full path next + unset(MPI_DIRECT_LIB_NAMES_WORK) + foreach(_MPI_LIB_FULLPATH IN LISTS MPI_LIB_FULLPATHS_WORK) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB_FULLPATH}" NAME_WE) + list(APPEND MPI_DIRECT_LIB_NAMES_WORK "${_MPI_PLAIN_LIB_NAME}") + set(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY "${_MPI_LIB_FULLPATH}" CACHE FILEPATH "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI") + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endforeach() + # Directly linked objects should be linked first in case some generic linker flags are needed for them. + if(MPI_DIRECT_LIB_NAMES_WORK) + set(MPI_PLAIN_LIB_NAMES_WORK "${MPI_DIRECT_LIB_NAMES_WORK};${MPI_PLAIN_LIB_NAMES_WORK}") + endif() + + # MPI might require pthread to work. The above mechanism wouldn't detect it, but we need to + # link it in that case. -lpthread is covered by the normal library treatment on the other hand. + if("${MPI_COMPILE_CMDLINE}" MATCHES "-pthread") + list(APPEND MPI_COMPILE_OPTIONS_WORK "-pthread") + if(MPI_LINK_FLAGS_WORK) + string(APPEND MPI_LINK_FLAGS_WORK " -pthread") + else() + set(MPI_LINK_FLAGS_WORK "-pthread") + endif() + endif() + + if(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + list(APPEND MPI_COMPILE_DEFINITIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS}") + endif() + if(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + list(APPEND MPI_COMPILE_OPTIONS_WORK "${MPI_${LANG}_EXTRA_COMPILE_OPTIONS}") + endif() + if(MPI_${LANG}_EXTRA_LIB_NAMES) + list(APPEND MPI_PLAIN_LIB_NAMES_WORK "${MPI_${LANG}_EXTRA_LIB_NAMES}") + endif() + + # If we found MPI, set up all of the appropriate cache entries + if(NOT MPI_${LANG}_COMPILE_OPTIONS) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_COMPILE_OPTIONS_WORK} CACHE STRING "MPI ${LANG} compilation options" FORCE) + endif() + if(NOT MPI_${LANG}_COMPILE_DEFINITIONS) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_COMPILE_DEFINITIONS_WORK} CACHE STRING "MPI ${LANG} compilation definitions" FORCE) + endif() + if(NOT MPI_${LANG}_COMPILER_INCLUDE_DIRS) + set(MPI_${LANG}_COMPILER_INCLUDE_DIRS ${MPI_INCLUDE_DIRS_WORK} CACHE STRING "MPI ${LANG} compiler wrapper include directories" FORCE) + endif() + if(NOT MPI_${LANG}_LINK_FLAGS) + set(MPI_${LANG}_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI ${LANG} linker flags" FORCE) + endif() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES ${MPI_PLAIN_LIB_NAMES_WORK} CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + set(MPI_${LANG}_WRAPPER_FOUND TRUE PARENT_SCOPE) +endfunction() + +function(_MPI_guess_settings LANG) + set(MPI_GUESS_FOUND FALSE) + # Currently only MSMPI and MPICH2 on Windows are supported, so we can skip this search if we're not targeting that. + if(WIN32) + # MSMPI + + # The environment variables MSMPI_INC and MSMPILIB32/64 are the only ways of locating the MSMPI_SDK, + # which is installed separately from the runtime. Thus it's possible to have mpiexec but not MPI headers + # or import libraries and vice versa. + if(NOT MPI_GUESS_LIBRARY_NAME OR "${MPI_GUESS_LIBRARY_NAME}" STREQUAL "MSMPI") + # We first attempt to locate the msmpi.lib. Should be find it, we'll assume that the MPI present is indeed + # Microsoft MPI. + if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) + file(TO_CMAKE_PATH "$ENV{MSMPI_LIB64}" MPI_MSMPI_LIB_PATH) + file(TO_CMAKE_PATH "$ENV{MSMPI_INC}/x64" MPI_MSMPI_INC_PATH_EXTRA) + else() + file(TO_CMAKE_PATH "$ENV{MSMPI_LIB32}" MPI_MSMPI_LIB_PATH) + file(TO_CMAKE_PATH "$ENV{MSMPI_INC}/x86" MPI_MSMPI_INC_PATH_EXTRA) + endif() + + find_library(MPI_msmpi_LIBRARY + NAMES msmpi + HINTS ${MPI_MSMPI_LIB_PATH} + DOC "Location of the msmpi library for Microsoft MPI") + mark_as_advanced(MPI_msmpi_LIBRARY) + + if(MPI_msmpi_LIBRARY) + # Next, we attempt to locate the MPI header. Note that for Fortran we know that mpif.h is a way + # MSMPI can be used and therefore that header has to be present. + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + get_filename_component(MPI_MSMPI_INC_DIR "$ENV{MSMPI_INC}" REALPATH) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_MSMPI_INC_DIR}" CACHE STRING "MPI ${LANG} additional include directories" FORCE) + unset(MPI_MSMPI_INC_DIR) + endif() + + # For MSMPI, one can compile the MPI module by building the mpi.f90 shipped with the MSMPI SDK, + # thus it might be present or provided by the user. Figuring out which is supported is done later on. + # The PGI Fortran compiler for instance ships a prebuilt set of modules in its own include folder. + # Should a user be employing PGI or have built its own set and provided it via cache variables, the + # splitting routine would have located the module files. + + # For C and C++, we're done here (MSMPI does not ship the MPI-2 C++ bindings) - however, for Fortran + # we need some extra library to glue Fortran support together: + # MSMPI ships 2-4 Fortran libraries, each for different Fortran compiler behaviors. The library names + # ending with a c are using the cdecl calling convention, whereas those ending with an s are for Fortran + # implementations using stdcall. Therefore, the 64-bit MSMPI only ships those ending in 'c', whereas the 32-bit + # has both variants available. + # The second difference is the last but one letter, if it's an e(nd), the length of a string argument is + # passed by the Fortran compiler after all other arguments on the parameter list, if it's an m(ixed), + # it's passed immediately after the string address. + + # To summarize: + # - msmpifec: CHARACTER length passed after the parameter list and using cdecl calling convention + # - msmpifmc: CHARACTER length passed directly after string address and using cdecl calling convention + # - msmpifes: CHARACTER length passed after the parameter list and using stdcall calling convention + # - msmpifms: CHARACTER length passed directly after string address and using stdcall calling convention + # 32-bit MSMPI ships all four libraries, 64-bit MSMPI ships only the first two. + + # As is, Intel Fortran and PGI Fortran both use the 'ec' variant of the calling convention, whereas + # the old Compaq Visual Fortran compiler defaulted to the 'ms' version. It's possible to make Intel Fortran + # use the CVF calling convention using /iface:cvf, but we assume - and this is also assumed in FortranCInterface - + # this isn't the case. It's also possible to make CVF use the 'ec' variant, using /iface=(cref,nomixed_str_len_arg). + + # Our strategy is now to locate all libraries, but enter msmpifec into the LIB_NAMES array. + # Should this not be adequate it's a straightforward way for a user to change the LIB_NAMES array and + # have his library found. Still, this should not be necessary outside of exceptional cases, as reasoned. + if ("${LANG}" STREQUAL "Fortran") + set(MPI_MSMPI_CALLINGCONVS c) + if("${CMAKE_SIZEOF_VOID_P}" EQUAL 4) + list(APPEND MPI_MSMPI_CALLINGCONVS s) + endif() + foreach(mpistrlenpos IN ITEMS e m) + foreach(mpicallingconv IN LISTS MPI_MSMPI_CALLINGCONVS) + find_library(MPI_msmpif${mpistrlenpos}${mpicallingconv}_LIBRARY + NAMES msmpif${mpistrlenpos}${mpicallingconv} + HINTS "${MPI_MSMPI_LIB_PATH}" + DOC "Location of the msmpi${mpistrlenpos}${mpicallingconv} library for Microsoft MPI") + mark_as_advanced(MPI_msmpif${mpistrlenpos}${mpicallingconv}_LIBRARY) + endforeach() + endforeach() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "msmpi;msmpifec" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + + # At this point we're *not* done. MSMPI requires an additional include file for Fortran giving the value + # of MPI_AINT. This file is called mpifptr.h located in the x64 and x86 subfolders, respectively. + find_path(MPI_mpifptr_INCLUDE_DIR + NAMES "mpifptr.h" + HINTS "${MPI_MSMPI_INC_PATH_EXTRA}" + DOC "Location of the mpifptr.h extra header for Microsoft MPI") + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + set(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS "mpifptr" CACHE STRING "MPI ${LANG} additional include directory variables, given in the form MPI__INCLUDE_DIR." FORCE) + endif() + mark_as_advanced(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS MPI_mpifptr_INCLUDE_DIR) + else() + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "msmpi" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + endif() + mark_as_advanced(MPI_${LANG}_LIB_NAMES) + set(MPI_GUESS_FOUND TRUE) + + if(_MPIEXEC_NOT_GIVEN) + unset(MPIEXEC_EXECUTABLE CACHE) + endif() + + find_program(MPIEXEC_EXECUTABLE + NAMES mpiexec + HINTS $ENV{MSMPI_BIN} "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin" + DOC "Executable for running MPI programs.") + endif() + endif() + + # At this point there's not many MPIs that we could still consider. + # OpenMPI 1.6.x and below supported Windows, but these ship compiler wrappers that still work. + # The only other relevant MPI implementation without a wrapper is MPICH2, which had Windows support in 1.4.1p1 and older. + if(NOT MPI_GUESS_FOUND AND (NOT MPI_GUESS_LIBRARY_NAME OR "${MPI_GUESS_LIBRARY_NAME}" STREQUAL "MPICH2")) + set(MPI_MPICH_PREFIX_PATHS + "$ENV{ProgramW6432}/MPICH2/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/../lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]/lib" + ) + + # All of C, C++ and Fortran will need mpi.lib, so we'll look for this first + find_library(MPI_mpi_LIBRARY + NAMES mpi + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_mpi_LIBRARY) + # If we found mpi.lib, we detect the rest of MPICH2 + if(MPI_mpi_LIBRARY) + set(MPI_MPICH_LIB_NAMES "mpi") + # If MPI-2 C++ bindings are requested, we need to locate cxx.lib as well. + # Otherwise, MPICH_SKIP_MPICXX will be defined and these bindings aren't needed. + if("${LANG}" STREQUAL "CXX" AND NOT MPI_CXX_SKIP_MPICXX) + find_library(MPI_cxx_LIBRARY + NAMES cxx + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_cxx_LIBRARY) + list(APPEND MPI_MPICH_LIB_NAMES "cxx") + # For Fortran, MPICH2 provides three different libraries: + # fmpich2.lib which uses uppercase symbols and cdecl, + # fmpich2s.lib which uses uppercase symbols and stdcall (32-bit only), + # fmpich2g.lib which uses lowercase symbols with double underscores and cdecl. + # fmpich2s.lib would be useful for Compaq Visual Fortran, fmpich2g.lib has to be used with GNU g77 and is also + # provided in the form of an .a archive for MinGW and Cygwin. From our perspective, fmpich2.lib is the only one + # we need to try, and if it doesn't work with the given Fortran compiler we'd find out later on during validation + elseif("${LANG}" STREQUAL "Fortran") + find_library(MPI_fmpich2_LIBRARY + NAMES fmpich2 + HINTS ${MPI_MPICH_PREFIX_PATHS}) + find_library(MPI_fmpich2s_LIBRARY + NAMES fmpich2s + HINTS ${MPI_MPICH_PREFIX_PATHS}) + find_library(MPI_fmpich2g_LIBRARY + NAMES fmpich2g + HINTS ${MPI_MPICH_PREFIX_PATHS}) + mark_as_advanced(MPI_fmpich2_LIBRARY MPI_fmpich2s_LIBRARY MPI_fmpich2g_LIBRARY) + list(APPEND MPI_MPICH_LIB_NAMES "fmpich2") + endif() + + if(NOT MPI_${LANG}_LIB_NAMES) + set(MPI_${LANG}_LIB_NAMES "${MPI_MPICH_LIB_NAMES}" CACHE STRING "MPI ${LANG} libraries to link against" FORCE) + endif() + unset(MPI_MPICH_LIB_NAMES) + + if(NOT MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + # For MPICH2, the include folder would be in ../include relative to the library folder. + get_filename_component(MPI_MPICH_ROOT_DIR "${MPI_mpi_LIBRARY}" DIRECTORY) + get_filename_component(MPI_MPICH_ROOT_DIR "${MPI_MPICH_ROOT_DIR}" DIRECTORY) + if(IS_DIRECTORY "${MPI_MPICH_ROOT_DIR}/include") + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_MPICH_ROOT_DIR}/include" CACHE STRING "MPI ${LANG} additional include directory variables, given in the form MPI__INCLUDE_DIR." FORCE) + endif() + unset(MPI_MPICH_ROOT_DIR) + endif() + set(MPI_GUESS_FOUND TRUE) + + if(_MPIEXEC_NOT_GIVEN) + unset(MPIEXEC_EXECUTABLE CACHE) + endif() + + find_program(MPIEXEC_EXECUTABLE + NAMES ${_MPIEXEC_NAMES} + HINTS "$ENV{ProgramW6432}/MPICH2/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]/bin" + DOC "Executable for running MPI programs.") + endif() + unset(MPI_MPICH_PREFIX_PATHS) + endif() + endif() + set(MPI_${LANG}_GUESS_FOUND "${MPI_GUESS_FOUND}" PARENT_SCOPE) +endfunction() + +function(_MPI_adjust_compile_definitions LANG) + if("${LANG}" STREQUAL "CXX") + # To disable the C++ bindings, we need to pass some definitions since the mpi.h header has to deal with both C and C++ + # bindings in MPI-2. + if(MPI_CXX_SKIP_MPICXX AND NOT MPI_${LANG}_COMPILE_DEFINITIONS MATCHES "SKIP_MPICXX") + # MPICH_SKIP_MPICXX is being used in MPICH and derivatives like MVAPICH or Intel MPI + # OMPI_SKIP_MPICXX is being used in Open MPI + # _MPICC_H is being used for IBM Platform MPI + list(APPEND MPI_${LANG}_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX" "OMPI_SKIP_MPICXX" "_MPICC_H") + set(MPI_${LANG}_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}" CACHE STRING "MPI ${LANG} compilation definitions" FORCE) + endif() + endif() +endfunction() + +macro(_MPI_assemble_libraries LANG) + set(MPI_${LANG}_LIBRARIES "") + # Only for libraries do we need to check whether the compiler's linking stage is separate. + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS_IMPLICIT) + foreach(mpilib IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_LIBRARIES ${MPI_${mpilib}_LIBRARY}) + endforeach() + endif() +endmacro() + +macro(_MPI_assemble_include_dirs LANG) + set(MPI_${LANG}_INCLUDE_DIRS + ${MPI_${LANG}_COMPILER_INCLUDE_DIRS} + ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + if("${LANG}" MATCHES "(C|CXX)") + if(MPI_${LANG}_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + else() # Fortran + if(MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_F77_HEADER_DIR}") + endif() + if(MPI_${LANG}_MODULE_DIR) + list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${LANG}_MODULE_DIR}") + endif() + endif() + if(MPI_${LANG}_INCLUDE_DIRS) + list(REMOVE_DUPLICATES MPI_${LANG}_INCLUDE_DIRS) + endif() +endmacro() + +macro(_MPI_split_include_dirs LANG) + # Backwards compatibility: Search INCLUDE_PATH if given. + if(MPI_${LANG}_INCLUDE_PATH) + list(APPEND MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_INCLUDE_PATH}") + endif() + + # We try to find the headers/modules among those paths (and system paths) + # For C/C++, we just need to have a look for mpi.h. + if("${LANG}" MATCHES "(C|CXX)") + find_path(MPI_${LANG}_HEADER_DIR "mpi.h" + HINTS + ${MPI_${LANG}_COMPILER_INCLUDE_DIRS} + ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + mark_as_advanced(MPI_${LANG}_HEADER_DIR) + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "${MPI_${LANG}_HEADER_DIR}") + endif() + + # Fortran is more complicated here: An implementation could provide + # any of the Fortran 77/90/2008 APIs for MPI. For example, MSMPI + # only provides Fortran 77 and - if mpi.f90 is built - potentially + # a Fortran 90 module. + elseif("${LANG}" STREQUAL "Fortran") + find_path(MPI_${LANG}_F77_HEADER_DIR "mpif.h" + HINTS + ${MPI_${LANG}_COMPILER_INCLUDE_DIRS} + ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + find_path(MPI_${LANG}_MODULE_DIR + NAMES "mpi.mod" "mpi_f08.mod" + HINTS + ${MPI_${LANG}_COMPILER_INCLUDE_DIRS} + ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} + ) + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS + "${MPI_${LANG}_F77_HEADER_DIR}" + "${MPI_${LANG}_MODULE_DIR}" + ) + endif() + mark_as_advanced(MPI_${LANG}_F77_HEADER_DIR MPI_${LANG}_MODULE_DIR) + endif() + + # Remove duplicates and default system directories from the list. + if(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + list(REMOVE_DUPLICATES MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS) + foreach(MPI_IMPLICIT_INC_DIR IN LISTS CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES) + list(REMOVE_ITEM MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_IMPLICIT_INC_DIR}) + endforeach() + endif() + + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS ${MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} additional include directories" FORCE) +endmacro() + +macro(_MPI_create_imported_target LANG) + if(NOT TARGET MPI::MPI_${LANG}) + add_library(MPI::MPI_${LANG} INTERFACE IMPORTED) + endif() + + # When this is consumed for compiling CUDA, use '-Xcompiler' to wrap '-pthread' and '-fexceptions'. + string(REPLACE "-pthread" "$<$:SHELL:-Xcompiler >-pthread" + _MPI_${LANG}_COMPILE_OPTIONS "${MPI_${LANG}_COMPILE_OPTIONS}") + string(REPLACE "-fexceptions" "$<$:SHELL:-Xcompiler >-fexceptions" + _MPI_${LANG}_COMPILE_OPTIONS "${_MPI_${LANG}_COMPILE_OPTIONS}") + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_${LANG}_COMPILE_OPTIONS}") + unset(_MPI_${LANG}_COMPILE_OPTIONS) + + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}") + + if(MPI_${LANG}_LINK_FLAGS) + if (CMAKE_VERSION VERSION_LESS "3.18") # Introduction of `$` + if (CMAKE_CUDA_COMPILER) + message(AUTHOR_WARNING + "MPI cannot indicate that its link flags are only intended for host " + "and not device usage. Please use CMake 3.20.1+ for proper link flag " + "specifications from the MPI targets.") + endif () + elseif (CMAKE_VERSION VERSION_LESS "3.20.1") # cmake/cmake#22007 + if (CMAKE_CUDA_COMPILER) + message(AUTHOR_WARNING + "MPI cannot indicate that its link flags are only intended for host " + "and not device usage due to issues with using `$` and " + "the `try_compile` family of commands. Please use CMake 3.20.1+ for " + "proper link flag specifications from the MPI targets. (See " + "https://gitlab.kitware.com/cmake/cmake/-/issues/22007)") + endif () + else () + string(REPLACE "," "$" _MPI_${LANG}_LINK_FLAGS "${MPI_${LANG}_LINK_FLAGS}") + string(PREPEND _MPI_${LANG}_LINK_FLAGS "$") + endif () + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_OPTIONS "${_MPI_${LANG}_LINK_FLAGS}") + endif() + # If the compiler links MPI implicitly, no libraries will be found as they're contained within + # CMAKE__IMPLICIT_LINK_LIBRARIES already. + if(MPI_${LANG}_LIBRARIES) + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LIBRARIES}") + endif() + # Given the new design of FindMPI, INCLUDE_DIRS will always be located, even under implicit linking. + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${MPI_${LANG}_INCLUDE_DIRS}") +endmacro() + +get_filename_component(_FindMPI_MODULE_DIR + "${CMAKE_CURRENT_LIST_FILE}" PATH) + +function(_MPI_try_staged_settings LANG MPI_TEST_FILE_NAME MODE RUN_BINARY SUPPRESS_ERRORS) + set(WORK_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI") + set(SRC_DIR "${_FindMPI_MODULE_DIR}/FindMPI") + set(BIN_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI/${MPI_TEST_FILE_NAME}_${LANG}.bin") + unset(MPI_TEST_COMPILE_DEFINITIONS) + if("${LANG}" STREQUAL "Fortran") + if("${MODE}" STREQUAL "F90_MODULE") + set(MPI_Fortran_INCLUDE_LINE "use mpi\n implicit none") + elseif("${MODE}" STREQUAL "F08_MODULE") + set(MPI_Fortran_INCLUDE_LINE "use mpi_f08\n implicit none") + else() # F77 header + set(MPI_Fortran_INCLUDE_LINE "implicit none\n include 'mpif.h'") + endif() + configure_file("${SRC_DIR}/${MPI_TEST_FILE_NAME}.f90.in" "${WORK_DIR}/${MPI_TEST_FILE_NAME}.f90" @ONLY) + set(MPI_TEST_SOURCE_FILE "${WORK_DIR}/${MPI_TEST_FILE_NAME}.f90") + elseif("${LANG}" STREQUAL "CXX") + configure_file("${SRC_DIR}/${MPI_TEST_FILE_NAME}.c" "${WORK_DIR}/${MPI_TEST_FILE_NAME}.cpp" COPYONLY) + set(MPI_TEST_SOURCE_FILE "${WORK_DIR}/${MPI_TEST_FILE_NAME}.cpp") + if("${MODE}" STREQUAL "TEST_MPICXX") + set(MPI_TEST_COMPILE_DEFINITIONS TEST_MPI_MPICXX) + endif() + else() # C + set(MPI_TEST_SOURCE_FILE "${SRC_DIR}/${MPI_TEST_FILE_NAME}.c") + endif() + if(RUN_BINARY) + try_run(MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} + "${CMAKE_BINARY_DIR}" SOURCES "${MPI_TEST_SOURCE_FILE}" + COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} + LINK_LIBRARIES MPI::MPI_${LANG} + RUN_OUTPUT_VARIABLE MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} + COMPILE_OUTPUT_VARIABLE _MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT) + set(MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} "${MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}}" PARENT_SCOPE) + else() + try_compile(MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} + "${CMAKE_BINARY_DIR}" SOURCES "${MPI_TEST_SOURCE_FILE}" + COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} + LINK_LIBRARIES MPI::MPI_${LANG} + COPY_FILE "${BIN_FILE}" + OUTPUT_VARIABLE _MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT) + endif() + if(NOT SUPPRESS_ERRORS) + if(NOT MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}) + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE} failed to compile with the following output:\n${_MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT}\n\n") + elseif(DEFINED MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} AND MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}) + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE} failed to run with the following output:\n${MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}}\n\n") + endif() + endif() +endfunction() + +macro(_MPI_check_lang_works LANG SUPPRESS_ERRORS) + # For Fortran we may have by the MPI-3 standard an implementation that provides: + # - the mpi_f08 module + # - *both*, the mpi module and 'mpif.h' + # Since older MPI standards (MPI-1) did not define anything but 'mpif.h', we need to check all three individually. + if( NOT MPI_${LANG}_WORKS ) + if("${LANG}" STREQUAL "Fortran") + set(MPI_Fortran_INTEGER_LINE "(kind=MPI_INTEGER_KIND)") + _MPI_try_staged_settings(${LANG} test_mpi F77_HEADER FALSE ${SUPPRESS_ERRORS}) + _MPI_try_staged_settings(${LANG} test_mpi F90_MODULE FALSE ${SUPPRESS_ERRORS}) + _MPI_try_staged_settings(${LANG} test_mpi F08_MODULE FALSE ${SUPPRESS_ERRORS}) + + set(MPI_${LANG}_WORKS FALSE) + + foreach(mpimethod IN ITEMS F77_HEADER F08_MODULE F90_MODULE) + if(MPI_RESULT_${LANG}_test_mpi_${mpimethod}) + set(MPI_${LANG}_WORKS TRUE) + set(MPI_${LANG}_HAVE_${mpimethod} TRUE) + else() + set(MPI_${LANG}_HAVE_${mpimethod} FALSE) + endif() + endforeach() + # MPI-1 versions had no MPI_INTGER_KIND defined, so we need to try without it. + # However, MPI-1 also did not define the Fortran 90 and 08 modules, so we only try the F77 header. + unset(MPI_Fortran_INTEGER_LINE) + if(NOT MPI_${LANG}_WORKS) + _MPI_try_staged_settings(${LANG} test_mpi F77_HEADER_NOKIND FALSE ${SUPPRESS_ERRORS}) + if(MPI_RESULT_${LANG}_test_mpi_F77_HEADER_NOKIND) + set(MPI_${LANG}_WORKS TRUE) + set(MPI_${LANG}_HAVE_F77_HEADER TRUE) + endif() + endif() + else() + _MPI_try_staged_settings(${LANG} test_mpi normal FALSE ${SUPPRESS_ERRORS}) + # If 'test_mpi' built correctly, we've found valid MPI settings. There might not be MPI-2 C++ support, but there can't + # be MPI-2 C++ support without the C bindings being present, so checking for them is sufficient. + set(MPI_${LANG}_WORKS "${MPI_RESULT_${LANG}_test_mpi_normal}") + endif() + endif() +endmacro() + +# Some systems install various MPI implementations in separate folders in some MPI prefix +# This macro enumerates all such subfolders and adds them to the list of hints that will be searched. +macro(MPI_search_mpi_prefix_folder PREFIX_FOLDER) + if(EXISTS "${PREFIX_FOLDER}") + file(GLOB _MPI_folder_children RELATIVE "${PREFIX_FOLDER}" "${PREFIX_FOLDER}/*") + foreach(_MPI_folder_child IN LISTS _MPI_folder_children) + if(IS_DIRECTORY "${PREFIX_FOLDER}/${_MPI_folder_child}") + list(APPEND MPI_HINT_DIRS "${PREFIX_FOLDER}/${_MPI_folder_child}") + endif() + endforeach() + endif() +endmacro() + +set(MPI_HINT_DIRS ${MPI_HOME} $ENV{MPI_HOME} $ENV{I_MPI_ROOT}) +if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") + # SUSE Linux Enterprise Server stores its MPI implementations under /usr/lib64/mpi/gcc/ + # We enumerate the subfolders and append each as a prefix + MPI_search_mpi_prefix_folder("/usr/lib64/mpi/gcc") +elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "FreeBSD") + # FreeBSD ships mpich under the normal system paths - but available openmpi implementations + # will be found in /usr/local/mpi/ + MPI_search_mpi_prefix_folder("/usr/local/mpi") +endif() + +# Most MPI distributions have some form of mpiexec or mpirun which gives us something we can look for. +# The MPI standard does not mandate the existence of either, but instead only makes requirements if a distribution +# ships an mpiexec program (mpirun executables are not regulated by the standard). + +# We defer searching for mpiexec binaries belonging to guesses until later. By doing so, mismatches between mpiexec +# and the MPI we found should be reduced. +if(NOT MPIEXEC_EXECUTABLE) + set(_MPIEXEC_NOT_GIVEN TRUE) +else() + set(_MPIEXEC_NOT_GIVEN FALSE) +endif() + +find_program(MPIEXEC_EXECUTABLE + NAMES ${_MPIEXEC_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${MPI_HINT_DIRS} + DOC "Executable for running MPI programs.") + +# call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin). +# This gives us a fairly reliable base directory to search for /bin /lib and /include from. +get_filename_component(_MPI_BASE_DIR "${MPIEXEC_EXECUTABLE}" PATH) +get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH) + +# According to the MPI standard, section 8.8 -n is a guaranteed, and the only guaranteed way to +# launch an MPI process using mpiexec if such a program exists. +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "Flag used by MPI to specify the number of processes for mpiexec; the next option will be the number of processes.") +set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by mpiexec.") +set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will be placed after all flags passed to mpiexec.") + +# Set the number of processes to the physical processor count +cmake_host_system_information(RESULT _MPIEXEC_NUMPROCS QUERY NUMBER_OF_PHYSICAL_CORES) +set(MPIEXEC_MAX_NUMPROCS "${_MPIEXEC_NUMPROCS}" CACHE STRING "Maximum number of processors available to run MPI applications.") +unset(_MPIEXEC_NUMPROCS) +mark_as_advanced(MPIEXEC_EXECUTABLE MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS) + +#============================================================================= +# Backward compatibility input hacks. Propagate the FindMPI hints to C and +# CXX if the respective new versions are not defined. Translate the old +# MPI_LIBRARY and MPI_EXTRA_LIBRARY to respective MPI_${LANG}_LIBRARIES. +# +# Once we find the new variables, we translate them back into their old +# equivalents below. +if(NOT MPI_IGNORE_LEGACY_VARIABLES) + foreach (LANG IN ITEMS C CXX) + # Old input variables. + set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS) + + # Set new vars based on their old equivalents, if the new versions are not already set. + foreach (var ${_MPI_OLD_INPUT_VARS}) + if (NOT MPI_${LANG}_${var} AND MPI_${var}) + set(MPI_${LANG}_${var} "${MPI_${var}}") + endif() + endforeach() + + # Chop the old compile flags into options and definitions + + unset(MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS) + unset(MPI_${LANG}_EXTRA_COMPILE_OPTIONS) + if(MPI_${LANG}_COMPILE_FLAGS) + separate_arguments(MPI_SEPARATE_FLAGS NATIVE_COMMAND "${MPI_${LANG}_COMPILE_FLAGS}") + foreach(_MPI_FLAG IN LISTS MPI_SEPARATE_FLAGS) + if("${_MPI_FLAG}" MATCHES "^ *-D([^ ]+)") + list(APPEND MPI_${LANG}_EXTRA_COMPILE_DEFINITIONS "${CMAKE_MATCH_1}") + else() + list(APPEND MPI_${LANG}_EXTRA_COMPILE_OPTIONS "${_MPI_FLAG}") + endif() + endforeach() + unset(MPI_SEPARATE_FLAGS) + endif() + + # If a list of libraries was given, we'll split it into new-style cache variables + unset(MPI_${LANG}_EXTRA_LIB_NAMES) + if(NOT MPI_${LANG}_LIB_NAMES) + foreach(_MPI_LIB IN LISTS MPI_${LANG}_LIBRARIES MPI_LIBRARY MPI_EXTRA_LIBRARY) + if(_MPI_LIB) + get_filename_component(_MPI_PLAIN_LIB_NAME "${_MPI_LIB}" NAME_WE) + get_filename_component(_MPI_LIB_NAME "${_MPI_LIB}" NAME) + get_filename_component(_MPI_LIB_DIR "${_MPI_LIB}" DIRECTORY) + list(APPEND MPI_${LANG}_EXTRA_LIB_NAMES "${_MPI_PLAIN_LIB_NAME}") + find_library(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY + NAMES "${_MPI_LIB_NAME}" "lib${_MPI_LIB_NAME}" + HINTS ${_MPI_LIB_DIR} $ENV{MPI_LIB} + DOC "Location of the ${_MPI_PLAIN_LIB_NAME} library for MPI" + ) + mark_as_advanced(MPI_${_MPI_PLAIN_LIB_NAME}_LIBRARY) + endif() + endforeach() + endif() + endforeach() +endif() +#============================================================================= + +unset(MPI_VERSION) +unset(MPI_VERSION_MAJOR) +unset(MPI_VERSION_MINOR) + +unset(_MPI_MIN_VERSION) + +# If the user specified a library name we assume they prefer that library over a wrapper. If not, they can disable skipping manually. +if(NOT DEFINED MPI_SKIP_COMPILER_WRAPPER AND MPI_GUESS_LIBRARY_NAME) + set(MPI_SKIP_COMPILER_WRAPPER TRUE) +endif() + +# This loop finds the compilers and sends them off for interrogation. +foreach(LANG IN ITEMS C CXX Fortran) + if(CMAKE_${LANG}_COMPILER_LOADED) + if(NOT MPI_FIND_COMPONENTS) + set(_MPI_FIND_${LANG} TRUE) + elseif( ${LANG} IN_LIST MPI_FIND_COMPONENTS) + set(_MPI_FIND_${LANG} TRUE) + elseif( ${LANG} STREQUAL CXX AND NOT MPI_CXX_SKIP_MPICXX AND MPICXX IN_LIST MPI_FIND_COMPONENTS ) + set(_MPI_FIND_${LANG} TRUE) + else() + set(_MPI_FIND_${LANG} FALSE) + endif() + else() + set(_MPI_FIND_${LANG} FALSE) + if(${LANG} IN_LIST MPI_FIND_COMPONENTS) + string(APPEND _MPI_FAIL_REASON "MPI component '${LANG}' was requested, but language ${LANG} is not enabled. ") + endif() + endif() + if(_MPI_FIND_${LANG}) + if( ${LANG} STREQUAL CXX AND NOT MPICXX IN_LIST MPI_FIND_COMPONENTS ) + option(MPI_CXX_SKIP_MPICXX "If true, the MPI-2 C++ bindings are disabled using definitions." FALSE) + mark_as_advanced(MPI_CXX_SKIP_MPICXX) + endif() + _MPI_adjust_compile_definitions(${LANG}) + if(NOT (MPI_${LANG}_LIB_NAMES AND (MPI_${LANG}_INCLUDE_PATH OR MPI_${LANG}_INCLUDE_DIRS OR MPI_${LANG}_COMPILER_INCLUDE_DIRS))) + set(MPI_${LANG}_TRIED_IMPLICIT FALSE) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) + if(NOT MPI_${LANG}_COMPILER AND NOT MPI_ASSUME_NO_BUILTIN_MPI) + # Should the imported targets be empty, we effectively try whether the compiler supports MPI on its own, which is the case on e.g. + # Cray PrgEnv. + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG} TRUE) + + # If the compiler can build MPI code on its own, it functions as an MPI compiler and we'll set the variable to point to it. + if(MPI_${LANG}_WORKS) + set(MPI_${LANG}_COMPILER "${CMAKE_${LANG}_COMPILER}" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + endif() + set(MPI_${LANG}_TRIED_IMPLICIT TRUE) + endif() + + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}" OR NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WRAPPER_FOUND FALSE) + set(MPI_PINNED_COMPILER FALSE) + + if(NOT MPI_SKIP_COMPILER_WRAPPER) + if(MPI_${LANG}_COMPILER) + # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler. + if (NOT IS_ABSOLUTE "${MPI_${LANG}_COMPILER}") + # Get rid of our default list of names and just search for the name the user wants. + set(_MPI_${LANG}_COMPILER_NAMES "${MPI_${LANG}_COMPILER}") + unset(MPI_${LANG}_COMPILER CACHE) + endif() + # If the user specifies a compiler, we don't want to try to search libraries either. + set(MPI_PINNED_COMPILER TRUE) + endif() + + # If we have an MPI base directory, we'll try all compiler names in that one first. + # This should prevent mixing different MPI environments + if(_MPI_BASE_DIR) + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + HINTS ${_MPI_BASE_DIR} + NO_DEFAULT_PATH + DOC "MPI compiler for ${LANG}" + ) + endif() + + # If the base directory did not help (for example because the mpiexec isn't in the same directory as the compilers), + # we shall try searching in the default paths. + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + DOC "MPI compiler for ${LANG}" + ) + + if("${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + set(MPI_PINNED_COMPILER TRUE) + + # If we haven't made the implicit compiler test yet, perform it now. + if(NOT MPI_${LANG}_TRIED_IMPLICIT) + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG} TRUE) + endif() + + # Should the MPI compiler not work implicitly for MPI, still interrogate it. + # Otherwise, MPI compilers for which CMake has separate linking stages, e.g. Intel MPI on Windows where link.exe is being used + # directly during linkage instead of CMAKE__COMPILER will not work. + if(NOT MPI_${LANG}_WORKS) + set(MPI_${LANG}_WORKS_IMPLICIT FALSE) + _MPI_interrogate_compiler(${LANG}) + else() + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + endif() + elseif(MPI_${LANG}_COMPILER) + _MPI_interrogate_compiler(${LANG}) + endif() + endif() + + # We are on a Cray, environment identfier: PE_ENV is set (CRAY), and + # have NOT found an mpic++-like compiler wrapper (previous block), + # and we do NOT use the Cray cc/CC compiler wrappers as CC/CXX CMake + # compiler. + # So as a last resort, we now interrogate cc/CC/ftn for MPI flags. + if(DEFINED ENV{PE_ENV} AND NOT "${MPI_${LANG}_COMPILER}") + set(MPI_PINNED_COMPILER TRUE) + find_program(MPI_${LANG}_COMPILER + NAMES ${_MPI_Cray_${LANG}_COMPILER_NAMES} + PATH_SUFFIXES bin sbin + DOC "MPI compiler for ${LANG}" + ) + + # If we haven't made the implicit compiler test yet, perform it now. + if(NOT MPI_${LANG}_TRIED_IMPLICIT) + _MPI_create_imported_target(${LANG}) + _MPI_check_lang_works(${LANG} TRUE) + endif() + + set(MPI_${LANG}_WORKS_IMPLICIT TRUE) + _MPI_interrogate_compiler(${LANG}) + endif() + + if(NOT MPI_PINNED_COMPILER AND NOT MPI_${LANG}_WRAPPER_FOUND) + # If MPI_PINNED_COMPILER wasn't given, and the MPI compiler we potentially found didn't work, we withdraw it. + set(MPI_${LANG}_COMPILER "MPI_${LANG}_COMPILER-NOTFOUND" CACHE FILEPATH "MPI compiler for ${LANG}" FORCE) + if(NOT MPI_SKIP_GUESSING) + # For C++, we may use the settings for C. Should a given compiler wrapper for C++ not exist, but one for C does, we copy over the + # settings for C. An MPI distribution that is in this situation would be IBM Platform MPI. + if("${LANG}" STREQUAL "CXX" AND MPI_C_WRAPPER_FOUND) + set(MPI_${LANG}_COMPILE_OPTIONS ${MPI_C_COMPILE_OPTIONS} CACHE STRING "MPI ${LANG} compilation options" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS ${MPI_C_COMPILE_DEFINITIONS} CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_COMPILER_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS} CACHE STRING "MPI ${LANG} compiler wrapper include directories") + set(MPI_${LANG}_LINK_FLAGS ${MPI_C_LINK_FLAGS} CACHE STRING "MPI ${LANG} linker flags" ) + set(MPI_${LANG}_LIB_NAMES ${MPI_C_LIB_NAMES} CACHE STRING "MPI ${LANG} libraries to link against" ) + else() + _MPI_guess_settings(${LANG}) + endif() + endif() + endif() + endif() + endif() + + if(NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + _MPI_split_include_dirs(${LANG}) + _MPI_assemble_include_dirs(${LANG}) + else() + set(MPI_${LANG}_INCLUDE_DIRS "") + endif() + _MPI_assemble_libraries(${LANG}) + + # We always create imported targets even if they're empty + _MPI_create_imported_target(${LANG}) + + if(NOT MPI_${LANG}_WORKS) + _MPI_check_lang_works(${LANG} FALSE) + endif() + + # Next, we'll initialize the MPI variables that have not been previously set. + set(MPI_${LANG}_COMPILE_OPTIONS "" CACHE STRING "MPI ${LANG} compilation flags" ) + set(MPI_${LANG}_COMPILE_DEFINITIONS "" CACHE STRING "MPI ${LANG} compilation definitions" ) + set(MPI_${LANG}_COMPILER_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} compiler wrapper include directories") + set(MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "MPI ${LANG} additional include directories") + set(MPI_${LANG}_LINK_FLAGS "" CACHE STRING "MPI ${LANG} linker flags" ) + if(NOT MPI_${LANG}_COMPILER STREQUAL CMAKE_${LANG}_COMPILER) + set(MPI_${LANG}_LIB_NAMES "" CACHE STRING "MPI ${LANG} libraries to link against" ) + endif() + mark_as_advanced( + MPI_${LANG}_COMPILE_OPTIONS + MPI_${LANG}_COMPILE_DEFINITIONS + MPI_${LANG}_LINK_FLAGS + MPI_${LANG}_LIB_NAMES + MPI_${LANG}_COMPILER_INCLUDE_DIRS + MPI_${LANG}_ADDITIONAL_INCLUDE_DIRS + MPI_${LANG}_COMPILER + ) + + # If we've found MPI, then we'll perform additional analysis: Determine the MPI version, MPI library version, supported + # MPI APIs (i.e. MPI-2 C++ bindings). For Fortran we also need to find specific parameters if we're under MPI-3. + if(MPI_${LANG}_WORKS) + if("${LANG}" STREQUAL "CXX" AND NOT DEFINED MPI_MPICXX_FOUND) + if(NOT MPI_CXX_SKIP_MPICXX AND NOT MPI_CXX_VALIDATE_SKIP_MPICXX) + _MPI_try_staged_settings(${LANG} test_mpi MPICXX FALSE FALSE) + if(MPI_RESULT_${LANG}_test_mpi_MPICXX) + set(MPI_MPICXX_FOUND TRUE) + else() + set(MPI_MPICXX_FOUND FALSE) + endif() + else() + set(MPI_MPICXX_FOUND FALSE) + endif() + endif() + + # At this point, we know the bindings present but not the MPI version or anything else. + if(NOT DEFINED MPI_${LANG}_VERSION) + unset(MPI_${LANG}_VERSION_MAJOR) + unset(MPI_${LANG}_VERSION_MINOR) + endif() + set(MPI_BIN_FOLDER ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindMPI) + + # For Fortran, we'll want to use the most modern MPI binding to test capabilities other than the + # Fortran parameters, since those depend on the method of consumption. + # For C++, we can always use the C bindings, and should do so, since the C++ bindings do not exist in MPI-3 + # whereas the C bindings do, and the C++ bindings never offered any feature advantage over their C counterparts. + if("${LANG}" STREQUAL "Fortran") + if(MPI_${LANG}_HAVE_F08_MODULE) + set(MPI_${LANG}_HIGHEST_METHOD F08_MODULE) + elseif(MPI_${LANG}_HAVE_F90_MODULE) + set(MPI_${LANG}_HIGHEST_METHOD F90_MODULE) + else() + set(MPI_${LANG}_HIGHEST_METHOD F77_HEADER) + endif() + + # Another difference between C and Fortran is that we can't use the preprocessor to determine whether MPI_VERSION + # and MPI_SUBVERSION are provided. These defines did not exist in MPI 1.0 and 1.1 and therefore might not + # exist. For C/C++, test_mpi.c will handle the MPI_VERSION extraction, but for Fortran, we need mpiver.f90. + if(NOT DEFINED MPI_${LANG}_VERSION) + _MPI_try_staged_settings(${LANG} mpiver ${MPI_${LANG}_HIGHEST_METHOD} FALSE FALSE) + if(MPI_RESULT_${LANG}_mpiver_${MPI_${LANG}_HIGHEST_METHOD}) + file(STRINGS ${MPI_BIN_FOLDER}/mpiver_${LANG}.bin _MPI_VERSION_STRING LIMIT_COUNT 1 REGEX "INFO:MPI-VER") + if("${_MPI_VERSION_STRING}" MATCHES ".*INFO:MPI-VER\\[([0-9]+)\\.([0-9]+)\\].*") + set(MPI_${LANG}_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(MPI_${LANG}_VERSION_MINOR "${CMAKE_MATCH_2}") + set(MPI_${LANG}_VERSION "${MPI_${LANG}_VERSION_MAJOR}.${MPI_${LANG}_VERSION_MINOR}") + endif() + endif() + endif() + + # Finally, we want to find out which capabilities a given interface supports, compare the MPI-3 standard. + # This is determined by interface specific parameters MPI_SUBARRAYS_SUPPORTED and MPI_ASYNC_PROTECTS_NONBLOCKING + # and might vary between the different methods of consumption. + if(MPI_DETERMINE_Fortran_CAPABILITIES AND NOT MPI_Fortran_CAPABILITIES_DETERMINED) + foreach(mpimethod IN ITEMS F08_MODULE F90_MODULE F77_HEADER) + if(MPI_${LANG}_HAVE_${mpimethod}) + set(MPI_${LANG}_${mpimethod}_SUBARRAYS FALSE) + set(MPI_${LANG}_${mpimethod}_ASYNCPROT FALSE) + _MPI_try_staged_settings(${LANG} fortranparam_mpi ${mpimethod} TRUE FALSE) + if(MPI_RESULT_${LANG}_fortranparam_mpi_${mpimethod} AND + NOT "${MPI_RUN_RESULT_${LANG}_fortranparam_mpi_${mpimethod}}" STREQUAL "FAILED_TO_RUN") + if("${MPI_RUN_OUTPUT_${LANG}_fortranparam_mpi_${mpimethod}}" MATCHES + ".*INFO:SUBARRAYS\\[ *([TF]) *\\]-ASYNCPROT\\[ *([TF]) *\\].*") + if("${CMAKE_MATCH_1}" STREQUAL "T") + set(MPI_${LANG}_${mpimethod}_SUBARRAYS TRUE) + endif() + if("${CMAKE_MATCH_2}" STREQUAL "T") + set(MPI_${LANG}_${mpimethod}_ASYNCPROT TRUE) + endif() + endif() + endif() + endif() + endforeach() + set(MPI_Fortran_CAPABILITIES_DETERMINED TRUE) + endif() + else() + set(MPI_${LANG}_HIGHEST_METHOD normal) + + # By the MPI-2 standard, MPI_VERSION and MPI_SUBVERSION are valid for both C and C++ bindings. + if(NOT DEFINED MPI_${LANG}_VERSION) + file(STRINGS ${MPI_BIN_FOLDER}/test_mpi_${LANG}.bin _MPI_VERSION_STRING LIMIT_COUNT 1 REGEX "INFO:MPI-VER") + if("${_MPI_VERSION_STRING}" MATCHES ".*INFO:MPI-VER\\[([0-9]+)\\.([0-9]+)\\].*") + set(MPI_${LANG}_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(MPI_${LANG}_VERSION_MINOR "${CMAKE_MATCH_2}") + set(MPI_${LANG}_VERSION "${MPI_${LANG}_VERSION_MAJOR}.${MPI_${LANG}_VERSION_MINOR}") + endif() + endif() + endif() + + unset(MPI_BIN_FOLDER) + + # At this point, we have dealt with determining the MPI version and parameters for each Fortran method available. + # The one remaining issue is to determine which MPI library is installed. + # Determining the version and vendor of the MPI library is only possible via MPI_Get_library_version() at runtime, + # and therefore we cannot do this while cross-compiling (a user may still define MPI__LIBRARY_VERSION_STRING + # themselves and we'll attempt splitting it, which is equivalent to provide the try_run output). + # It's also worth noting that the installed version string can depend on the language, or on the system the binary + # runs on if MPI is not statically linked. + if(MPI_DETERMINE_LIBRARY_VERSION AND NOT MPI_${LANG}_LIBRARY_VERSION_STRING) + _MPI_try_staged_settings(${LANG} libver_mpi ${MPI_${LANG}_HIGHEST_METHOD} TRUE FALSE) + if(MPI_RESULT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD} AND + "${MPI_RUN_RESULT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD}}" EQUAL "0") + string(STRIP "${MPI_RUN_OUTPUT_${LANG}_libver_mpi_${MPI_${LANG}_HIGHEST_METHOD}}" + MPI_${LANG}_LIBRARY_VERSION_STRING) + else() + set(MPI_${LANG}_LIBRARY_VERSION_STRING "NOTFOUND") + endif() + endif() + endif() + + set(MPI_${LANG}_FIND_QUIETLY ${MPI_FIND_QUIETLY}) + set(MPI_${LANG}_FIND_VERSION ${MPI_FIND_VERSION}) + set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT}) + + unset(MPI_${LANG}_REQUIRED_VARS) + if (NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}") + foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY") + endforeach() + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_LIB_NAMES") + if("${LANG}" STREQUAL "Fortran") + # For Fortran we only need one of the module or header directories to have *some* support for MPI. + if(NOT MPI_${LANG}_MODULE_DIR) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_F77_HEADER_DIR") + endif() + if(NOT MPI_${LANG}_F77_HEADER_DIR) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_MODULE_DIR") + endif() + else() + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_HEADER_DIR") + endif() + if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + foreach(mpiincvar IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpiincvar}_INCLUDE_DIR") + endforeach() + endif() + # Append the works variable now. If the settings did not work, this will show up properly. + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_WORKS") + else() + # If the compiler worked implicitly, use its path as output. + # Should the compiler variable be set, we also require it to work. + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_COMPILER") + if(MPI_${LANG}_COMPILER) + list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${LANG}_WORKS") + endif() + endif() + if (CMAKE_VERSION VERSION_LESS "3.17") + set(_MPI_name_mismatched) + else () + set(_MPI_name_mismatched NAME_MISMATCHED) + endif () + find_package_handle_standard_args(MPI_${LANG} ${_MPI_name_mismatched} + REQUIRED_VARS ${MPI_${LANG}_REQUIRED_VARS} + VERSION_VAR MPI_${LANG}_VERSION) + unset(_MPI_name_mismatched) + + if(DEFINED MPI_${LANG}_VERSION) + if(NOT _MPI_MIN_VERSION OR _MPI_MIN_VERSION VERSION_GREATER MPI_${LANG}_VERSION) + set(_MPI_MIN_VERSION MPI_${LANG}_VERSION) + endif() + endif() + endif() +endforeach() + +unset(_MPI_REQ_VARS) +foreach(LANG IN ITEMS C CXX Fortran) + if((NOT MPI_FIND_COMPONENTS AND CMAKE_${LANG}_COMPILER_LOADED) OR LANG IN_LIST MPI_FIND_COMPONENTS) + list(APPEND _MPI_REQ_VARS "MPI_${LANG}_FOUND") + endif() +endforeach() + +if(MPICXX IN_LIST MPI_FIND_COMPONENTS) + list(APPEND _MPI_REQ_VARS "MPI_MPICXX_FOUND") +endif() + +find_package_handle_standard_args(MPI + REQUIRED_VARS ${_MPI_REQ_VARS} + VERSION_VAR ${_MPI_MIN_VERSION} + REASON_FAILURE_MESSAGE "${_MPI_FAIL_REASON}" + HANDLE_COMPONENTS) + +#============================================================================= +# More backward compatibility stuff + +# For compatibility reasons, we also define MPIEXEC +set(MPIEXEC "${MPIEXEC_EXECUTABLE}") + +# Copy over MPI__INCLUDE_PATH from the assembled INCLUDE_DIRS. +foreach(LANG IN ITEMS C CXX Fortran) + if(MPI_${LANG}_FOUND) + set(MPI_${LANG}_INCLUDE_PATH "${MPI_${LANG}_INCLUDE_DIRS}") + unset(MPI_${LANG}_COMPILE_FLAGS) + if(MPI_${LANG}_COMPILE_OPTIONS) + list(JOIN MPI_${LANG}_COMPILE_OPTIONS " " MPI_${LANG}_COMPILE_FLAGS) + endif() + if(MPI_${LANG}_COMPILE_DEFINITIONS) + foreach(_MPI_DEF IN LISTS MPI_${LANG}_COMPILE_DEFINITIONS) + string(APPEND MPI_${LANG}_COMPILE_FLAGS " -D${_MPI_DEF}") + endforeach() + endif() + endif() +endforeach() + +# Bare MPI sans ${LANG} vars are set to CXX then C, depending on what was found. +# This mimics the behavior of the old language-oblivious FindMPI. +set(_MPI_OLD_VARS COMPILER INCLUDE_PATH COMPILE_FLAGS LINK_FLAGS LIBRARIES) +if (MPI_CXX_FOUND) + foreach (var ${_MPI_OLD_VARS}) + set(MPI_${var} ${MPI_CXX_${var}}) + endforeach() +elseif (MPI_C_FOUND) + foreach (var ${_MPI_OLD_VARS}) + set(MPI_${var} ${MPI_C_${var}}) + endforeach() +endif() + +# Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and MPI_EXTRA_LIBRARY, and set them in cache. +if (MPI_LIBRARIES) + list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK) + set(MPI_LIBRARY "${MPI_LIBRARY_WORK}") + unset(MPI_LIBRARY_WORK) +else() + set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND") +endif() + +list(LENGTH MPI_LIBRARIES MPI_NUMLIBS) +if (MPI_NUMLIBS GREATER 1) + set(MPI_EXTRA_LIBRARY_WORK "${MPI_LIBRARIES}") + list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0) + set(MPI_EXTRA_LIBRARY "${MPI_EXTRA_LIBRARY_WORK}") + unset(MPI_EXTRA_LIBRARY_WORK) +else() + set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND") +endif() +set(MPI_IGNORE_LEGACY_VARIABLES TRUE) +#============================================================================= + +# unset these vars to cleanup namespace +unset(_MPI_OLD_VARS) +unset(_MPI_PREFIX_PATH) +unset(_MPI_BASE_DIR) +foreach (lang C CXX Fortran) + unset(_MPI_${LANG}_COMPILER_NAMES) +endforeach() + +cmake_policy(POP) diff --git a/CMake/patches/3.16/FindMPI/fortranparam_mpi.f90.in b/CMake/patches/3.22/FindMPI/fortranparam_mpi.f90.in similarity index 100% rename from CMake/patches/3.16/FindMPI/fortranparam_mpi.f90.in rename to CMake/patches/3.22/FindMPI/fortranparam_mpi.f90.in diff --git a/CMake/patches/3.22/FindMPI/libver_mpi.c b/CMake/patches/3.22/FindMPI/libver_mpi.c new file mode 100644 index 000000000..d89328a01 --- /dev/null +++ b/CMake/patches/3.22/FindMPI/libver_mpi.c @@ -0,0 +1,20 @@ +#include + +#ifdef __cplusplus +# include +#else +# include +#endif + +int main(int argc, char* argv[]) +{ + char mpilibver_str[MPI_MAX_LIBRARY_VERSION_STRING]; + int mpilibver_len; + MPI_Get_library_version(mpilibver_str, &mpilibver_len); +#ifdef __cplusplus + std::puts(mpilibver_str); +#else + puts(mpilibver_str); +#endif + return 0; +} diff --git a/CMake/patches/3.16/FindMPI/libver_mpi.f90.in b/CMake/patches/3.22/FindMPI/libver_mpi.f90.in similarity index 100% rename from CMake/patches/3.16/FindMPI/libver_mpi.f90.in rename to CMake/patches/3.22/FindMPI/libver_mpi.f90.in diff --git a/CMake/patches/3.16/FindMPI/mpiver.f90.in b/CMake/patches/3.22/FindMPI/mpiver.f90.in similarity index 100% rename from CMake/patches/3.16/FindMPI/mpiver.f90.in rename to CMake/patches/3.22/FindMPI/mpiver.f90.in diff --git a/CMake/patches/3.22/FindMPI/test_mpi.c b/CMake/patches/3.22/FindMPI/test_mpi.c new file mode 100644 index 000000000..70d7e1d3e --- /dev/null +++ b/CMake/patches/3.22/FindMPI/test_mpi.c @@ -0,0 +1,38 @@ +#include + +#ifdef __cplusplus +# include +#else +# include +#endif + +#if defined(MPI_VERSION) && defined(MPI_SUBVERSION) +const static char mpiver_str[] = { 'I', 'N', + 'F', 'O', + ':', 'M', + 'P', 'I', + '-', 'V', + 'E', 'R', + '[', ('0' + MPI_VERSION), + '.', ('0' + MPI_SUBVERSION), + ']', '\0' }; +#endif + +int main(int argc, char* argv[]) +{ +#if defined(MPI_VERSION) && defined(MPI_SUBVERSION) +# ifdef __cplusplus + std::puts(mpiver_str); +# else + puts(mpiver_str); +# endif +#endif +#ifdef TEST_MPI_MPICXX + MPI::MPI_Init(&argc, &argv); + MPI::MPI_Finalize(); +#else + MPI_Init(&argc, &argv); + MPI_Finalize(); +#endif + return 0; +} diff --git a/CMake/patches/3.16/FindMPI/test_mpi.f90.in b/CMake/patches/3.22/FindMPI/test_mpi.f90.in similarity index 100% rename from CMake/patches/3.16/FindMPI/test_mpi.f90.in rename to CMake/patches/3.22/FindMPI/test_mpi.f90.in diff --git a/CMake/patches/99/FindGDAL.cmake b/CMake/patches/99/FindGDAL.cmake deleted file mode 100644 index c8fee0d00..000000000 --- a/CMake/patches/99/FindGDAL.cmake +++ /dev/null @@ -1,120 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindGDAL --------- - -Find GDAL. - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines :prop_tgt:`IMPORTED` target ``GDAL::GDAL`` -if GDAL has been found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module will set the following variables in your project: - -``GDAL_FOUND`` - True if GDAL is found. -``GDAL_INCLUDE_DIRS`` - Include directories for GDAL headers. -``GDAL_LIBRARIES`` - Libraries to link to GDAL. -``GDAL_VERSION`` - The version of GDAL found. - -Cache variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``GDAL_LIBRARY`` - The libgdal library file. -``GDAL_INCLUDE_DIR`` - The directory containing ``gdal.h``. - -Hints -^^^^^ - -Set ``GDAL_DIR`` or ``GDAL_ROOT`` in the environment to specify the -GDAL installation prefix. -#]=======================================================================] - -# $GDALDIR is an environment variable that would -# correspond to the ./configure --prefix=$GDAL_DIR -# used in building gdal. -# -# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it -# for osgTerrain so I whipped this module together for completeness. -# I actually don't know the conventions or where files are typically -# placed in distros. -# Any real gdal users are encouraged to correct this (but please don't -# break the OS X framework stuff when doing so which is what usually seems -# to happen). - -# This makes the presumption that you are include gdal.h like -# -#include "gdal.h" - -find_path(GDAL_INCLUDE_DIR gdal.h - HINTS - ${GDAL_ROOT} - ENV GDAL_DIR - ENV GDAL_ROOT - PATH_SUFFIXES - include/gdal - include/GDAL - include - DOC "Path to the GDAL include directory" -) -mark_as_advanced(GDAL_INCLUDE_DIR) - -# GDAL name its library when built with CMake as `gdal${major}${minor}`. -set(_gdal_versions - 3.0 2.4 2.3 2.2 2.1 2.0 1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2) - -set(_gdal_libnames) -foreach (_gdal_version IN LISTS _gdal_versions) - string(REPLACE "." "" _gdal_version "${_gdal_version}") - list(APPEND _gdal_libnames "gdal${_gdal_version}" "GDAL${_gdal_version}") -endforeach () - -find_library(GDAL_LIBRARY - NAMES ${_gdal_libnames} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL - HINTS - ${GDAL_ROOT} - ENV GDAL_DIR - ENV GDAL_ROOT - DOC "Path to the GDAL library" -) -mark_as_advanced(GDAL_LIBRARY) - -if (EXISTS "${GDAL_INCLUDE_DIR}/gdal_version.h") - file(STRINGS "${GDAL_INCLUDE_DIR}/gdal_version.h" _gdal_version - REGEX "GDAL_RELEASE_NAME") - string(REGEX REPLACE ".*\"\(.*\)\"" "\\1" GDAL_VERSION "${_gdal_version}") - unset(_gdal_version) -else () - set(GDAL_VERSION GDAL_VERSION-NOTFOUND) -endif () - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(GDAL - VERSION_VAR GDAL_VERSION - REQUIRED_VARS GDAL_LIBRARY GDAL_INCLUDE_DIR) - -if (GDAL_FOUND) - set(GDAL_LIBRARIES ${GDAL_LIBRARY}) - set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR}) - - if (NOT TARGET GDAL::GDAL) - add_library(GDAL::GDAL UNKNOWN IMPORTED) - set_target_properties(GDAL::GDAL PROPERTIES - IMPORTED_LOCATION "${GDAL_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${GDAL_INCLUDE_DIR}") - endif () -endif () diff --git a/CMake/patches/99/FindHDF5.cmake b/CMake/patches/99/FindHDF5.cmake index 9e367a270..b54877d51 100644 --- a/CMake/patches/99/FindHDF5.cmake +++ b/CMake/patches/99/FindHDF5.cmake @@ -1,126 +1,158 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -# See https://gitlab.kitware.com/cmake/cmake/merge_requests/2575 - #[=======================================================================[.rst: FindHDF5 -------- -Find HDF5, a library for reading and writing self describing array data. - +Find Hierarchical Data Format (HDF5), a library for reading and writing +self describing array data. -This module invokes the HDF5 wrapper compiler that should be installed -alongside HDF5. Depending upon the HDF5 Configuration, the wrapper -compiler is called either h5cc or h5pcc. If this succeeds, the module -will then call the compiler with the -show argument to see what flags -are used when compiling an HDF5 client application. +This module invokes the ``HDF5`` wrapper compiler that should be installed +alongside ``HDF5``. Depending upon the ``HDF5`` Configuration, the wrapper +compiler is called either ``h5cc`` or ``h5pcc``. If this succeeds, the module +will then call the compiler with the show argument to see what flags +are used when compiling an ``HDF5`` client application. -The module will optionally accept the COMPONENTS argument. If no -COMPONENTS are specified, then the find module will default to finding -only the HDF5 C library. If one or more COMPONENTS are specified, the +The module will optionally accept the ``COMPONENTS`` argument. If no +``COMPONENTS`` are specified, then the find module will default to finding +only the ``HDF5`` C library. If one or more ``COMPONENTS`` are specified, the module will attempt to find the language bindings for the specified -components. The only valid components are C, CXX, Fortran, HL, and -Fortran_HL. If the COMPONENTS argument is not given, the module will +components. The valid components are ``C``, ``CXX``, ``Fortran``, ``HL``. +``HL`` refers to the "high-level" HDF5 functions for C and Fortran. +If the ``COMPONENTS`` argument is not given, the module will attempt to find only the C bindings. +For example, to use Fortran HDF5 and HDF5-HL functions, do: +``find_package(HDF5 COMPONENTS Fortran HL)``. This module will read the variable -HDF5_USE_STATIC_LIBRARIES to determine whether or not to prefer a -static link to a dynamic link for HDF5 and all of it's dependencies. -To use this feature, make sure that the HDF5_USE_STATIC_LIBRARIES +``HDF5_USE_STATIC_LIBRARIES`` to determine whether or not to prefer a +static link to a dynamic link for ``HDF5`` and all of it's dependencies. +To use this feature, make sure that the ``HDF5_USE_STATIC_LIBRARIES`` variable is set before the call to find_package. -To provide the module with a hint about where to find your HDF5 -installation, you can set the environment variable HDF5_ROOT. The -Find module will then look in this path when searching for HDF5 -executables, paths, and libraries. +.. versionadded:: 3.10 + Support for ``HDF5_USE_STATIC_LIBRARIES`` on Windows. -Both the serial and parallel HDF5 wrappers are considered and the first +Both the serial and parallel ``HDF5`` wrappers are considered and the first directory to contain either one will be used. In the event that both appear in the same directory the serial version is preferentially selected. This -behavior can be reversed by setting the variable HDF5_PREFER_PARALLEL to -true. +behavior can be reversed by setting the variable ``HDF5_PREFER_PARALLEL`` to +``TRUE``. In addition to finding the includes and libraries required to compile -an HDF5 client application, this module also makes an effort to find -tools that come with the HDF5 distribution that may be useful for +an ``HDF5`` client application, this module also makes an effort to find +tools that come with the ``HDF5`` distribution that may be useful for regression testing. -This module will define the following variables: - -:: - - HDF5_FOUND - true if HDF5 was found on the system - HDF5_VERSION - HDF5 version in format Major.Minor.Release - HDF5_INCLUDE_DIRS - Location of the hdf5 includes - HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated) - HDF5_DEFINITIONS - Required compiler definitions for HDF5 - HDF5_LIBRARIES - Required libraries for all requested bindings - HDF5_HL_LIBRARIES - Required libraries for the HDF5 high level API for all - bindings, if the HL component is enabled - -Available components are: C CXX Fortran and HL. For each enabled language -binding, a corresponding HDF5_${LANG}_LIBRARIES variable, and potentially -HDF5_${LANG}_DEFINITIONS, will be defined. -If the HL component is enabled, then an HDF5_${LANG}_HL_LIBRARIES will +Result Variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``HDF5_FOUND`` + HDF5 was found on the system +``HDF5_VERSION`` + .. versionadded:: 3.3 + HDF5 library version +``HDF5_INCLUDE_DIRS`` + Location of the HDF5 header files +``HDF5_DEFINITIONS`` + Required compiler definitions for HDF5 +``HDF5_LIBRARIES`` + Required libraries for all requested bindings +``HDF5_HL_LIBRARIES`` + Required libraries for the HDF5 high level API for all bindings, + if the ``HL`` component is enabled + +Available components are: ``C`` ``CXX`` ``Fortran`` and ``HL``. +For each enabled language binding, a corresponding ``HDF5_${LANG}_LIBRARIES`` +variable, and potentially ``HDF5_${LANG}_DEFINITIONS``, will be defined. +If the ``HL`` component is enabled, then an ``HDF5_${LANG}_HL_LIBRARIES`` will also be defined. With all components enabled, the following variables will be defined: -:: - - HDF5_C_DEFINITIONS -- Required compiler definitions for HDF5 C bindings - HDF5_CXX_DEFINITIONS -- Required compiler definitions for HDF5 C++ bindings - HDF5_Fortran_DEFINITIONS -- Required compiler definitions for HDF5 Fortran bindings - HDF5_C_INCLUDE_DIRS -- Required include directories for HDF5 C bindings - HDF5_CXX_INCLUDE_DIRS -- Required include directories for HDF5 C++ bindings - HDF5_Fortran_INCLUDE_DIRS -- Required include directories for HDF5 Fortran bindings - HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings - HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings - HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings - HDF5_C_HL_LIBRARIES - Required libraries for the high level C bindings - HDF5_CXX_HL_LIBRARIES - Required libraries for the high level C++ bindings - HDF5_Fortran_HL_LIBRARIES - Required libraries for the high level Fortran - bindings. - - HDF5_IS_PARALLEL - Whether or not HDF5 was found with parallel IO support - HDF5_C_COMPILER_EXECUTABLE - the path to the HDF5 C wrapper compiler - HDF5_CXX_COMPILER_EXECUTABLE - the path to the HDF5 C++ wrapper compiler - HDF5_Fortran_COMPILER_EXECUTABLE - the path to the HDF5 Fortran wrapper compiler - HDF5_C_COMPILER_EXECUTABLE_NO_INTERROGATE - path to the primary C compiler - which is also the HDF5 wrapper - HDF5_CXX_COMPILER_EXECUTABLE_NO_INTERROGATE - path to the primary C++ - compiler which is also - the HDF5 wrapper - HDF5_Fortran_COMPILER_EXECUTABLE_NO_INTERROGATE - path to the primary - Fortran compiler which - is also the HDF5 wrapper - HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool +``HDF5_C_DEFINITIONS`` + Required compiler definitions for HDF5 C bindings +``HDF5_CXX_DEFINITIONS`` + Required compiler definitions for HDF5 C++ bindings +``HDF5_Fortran_DEFINITIONS`` + Required compiler definitions for HDF5 Fortran bindings +``HDF5_C_INCLUDE_DIRS`` + Required include directories for HDF5 C bindings +``HDF5_CXX_INCLUDE_DIRS`` + Required include directories for HDF5 C++ bindings +``HDF5_Fortran_INCLUDE_DIRS`` + Required include directories for HDF5 Fortran bindings +``HDF5_C_LIBRARIES`` + Required libraries for the HDF5 C bindings +``HDF5_CXX_LIBRARIES`` + Required libraries for the HDF5 C++ bindings +``HDF5_Fortran_LIBRARIES`` + Required libraries for the HDF5 Fortran bindings +``HDF5_C_HL_LIBRARIES`` + Required libraries for the high level C bindings +``HDF5_CXX_HL_LIBRARIES`` + Required libraries for the high level C++ bindings +``HDF5_Fortran_HL_LIBRARIES`` + Required libraries for the high level Fortran bindings. + +``HDF5_IS_PARALLEL`` + HDF5 library has parallel IO support +``HDF5_C_COMPILER_EXECUTABLE`` + path to the HDF5 C wrapper compiler +``HDF5_CXX_COMPILER_EXECUTABLE`` + path to the HDF5 C++ wrapper compiler +``HDF5_Fortran_COMPILER_EXECUTABLE`` + path to the HDF5 Fortran wrapper compiler +``HDF5_C_COMPILER_EXECUTABLE_NO_INTERROGATE`` + path to the primary C compiler which is also the HDF5 wrapper +``HDF5_CXX_COMPILER_EXECUTABLE_NO_INTERROGATE`` + path to the primary C++ compiler which is also the HDF5 wrapper +``HDF5_Fortran_COMPILER_EXECUTABLE_NO_INTERROGATE`` + path to the primary Fortran compiler which is also the HDF5 wrapper +``HDF5_DIFF_EXECUTABLE`` + path to the HDF5 dataset comparison tool With all components enabled, the following targets will be defined: -:: - - ``hdf5::hdf5`` - ``hdf5::hdf5_hl_cpp`` - ``hdf5::hdf5_fortran`` - ``hdf5::hdf5_hl`` - ``hdf5::hdf5_hl_cpp`` - ``hdf5::hdf5_hl_fortran`` - ``hdf5::h5diff`` - -The following variable can be set to guide the search for HDF5 libraries and includes: - -``HDF5_ROOT`` - Specify the path to the HDF5 installation to use. +``HDF5::HDF5`` + All detected ``HDF5_LIBRARIES``. +``hdf5::hdf5`` + C library. +``hdf5::hdf5_cpp`` + C++ library. +``hdf5::hdf5_fortran`` + Fortran library. +``hdf5::hdf5_hl`` + High-level C library. +``hdf5::hdf5_hl_cpp`` + High-level C++ library. +``hdf5::hdf5_hl_fortran`` + High-level Fortran library. +``hdf5::h5diff`` + ``h5diff`` executable. + +Hints +^^^^^ + +The following variables can be set to guide the search for HDF5 libraries and includes: + +``HDF5_PREFER_PARALLEL`` + .. versionadded:: 3.4 + + set ``true`` to prefer parallel HDF5 (by default, serial is preferred) ``HDF5_FIND_DEBUG`` - Set to a true value to get some extra debugging output. + .. versionadded:: 3.9 + + Set ``true`` to get extra debugging output. ``HDF5_NO_FIND_PACKAGE_CONFIG_FILE`` - Set to a true value to skip trying to find ``hdf5-config.cmake``. -#]=======================================================================] + .. versionadded:: 3.8 -# This module is maintained by Will Dicharry . + Set ``true`` to skip trying to find ``hdf5-config.cmake``. +#]=======================================================================] include(SelectLibraryConfigurations) include(FindPackageHandleStandardArgs) @@ -129,6 +161,8 @@ include(FindPackageHandleStandardArgs) # scope somewhere else. We can't rely on it because different components may # have been requested for this call. set(HDF5_FOUND OFF) +set(HDF5_LIBRARIES) +set(HDF5_HL_LIBRARIES) # List of the valid HDF5 components set(HDF5_VALID_LANGUAGE_BINDINGS C CXX Fortran) @@ -139,28 +173,30 @@ if(NOT HDF5_FIND_COMPONENTS) else() set(HDF5_LANGUAGE_BINDINGS) # add the extra specified components, ensuring that they are valid. - set(FIND_HL OFF) - foreach(component IN LISTS HDF5_FIND_COMPONENTS) - list(FIND HDF5_VALID_LANGUAGE_BINDINGS ${component} component_location) - if(NOT component_location EQUAL -1) - list(APPEND HDF5_LANGUAGE_BINDINGS ${component}) - elseif(component STREQUAL "HL") - set(FIND_HL ON) - elseif(component STREQUAL "Fortran_HL") # only for compatibility + set(HDF5_FIND_HL OFF) + foreach(_component IN LISTS HDF5_FIND_COMPONENTS) + list(FIND HDF5_VALID_LANGUAGE_BINDINGS ${_component} _component_location) + if(NOT _component_location EQUAL -1) + list(APPEND HDF5_LANGUAGE_BINDINGS ${_component}) + elseif(_component STREQUAL "HL") + set(HDF5_FIND_HL ON) + elseif(_component STREQUAL "Fortran_HL") # only for compatibility list(APPEND HDF5_LANGUAGE_BINDINGS Fortran) - set(FIND_HL ON) - set(HDF5_FIND_REQUIRED_Fortran_HL False) - set(HDF5_FIND_REQUIRED_Fortran True) - set(HDF5_FIND_REQUIRED_HL True) + set(HDF5_FIND_HL ON) + set(HDF5_FIND_REQUIRED_Fortran_HL FALSE) + set(HDF5_FIND_REQUIRED_Fortran TRUE) + set(HDF5_FIND_REQUIRED_HL TRUE) else() - message(FATAL_ERROR "${component} is not a valid HDF5 component.") + message(FATAL_ERROR "${_component} is not a valid HDF5 component.") endif() endforeach() + unset(_component) + unset(_component_location) if(NOT HDF5_LANGUAGE_BINDINGS) - get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES) - foreach(__lang IN LISTS __langs) - if(__lang MATCHES "^(C|CXX|Fortran)$") - list(APPEND HDF5_LANGUAGE_BINDINGS ${__lang}) + get_property(_langs GLOBAL PROPERTY ENABLED_LANGUAGES) + foreach(_lang IN LISTS _langs) + if(_lang MATCHES "^(C|CXX|Fortran)$") + list(APPEND HDF5_LANGUAGE_BINDINGS ${_lang}) endif() endforeach() endif() @@ -179,22 +215,6 @@ else() set(HDF5_Fortran_COMPILER_NAMES h5fc h5pfc) endif() -# We may have picked up some duplicates in various lists during the above -# process for the language bindings (both the C and C++ bindings depend on -# libz for example). Remove the duplicates. It appears that the default -# CMake behavior is to remove duplicates from the end of a list. However, -# for link lines, this is incorrect since unresolved symbols are searched -# for down the link line. Therefore, we reverse the list, remove the -# duplicates, and then reverse it again to get the duplicates removed from -# the beginning. -macro(_HDF5_remove_duplicates_from_beginning _list_name) - if(${_list_name}) - list(REVERSE ${_list_name}) - list(REMOVE_DUPLICATES ${_list_name}) - list(REVERSE ${_list_name}) - endif() -endmacro() - # Test first if the current compilers automatically wrap HDF5 function(_HDF5_test_regular_compiler_C success version is_parallel) set(scratch_directory @@ -204,7 +224,6 @@ function(_HDF5_test_regular_compiler_C success version is_parallel) set(test_file ${scratch_directory}/cmake_hdf5_test.c) file(WRITE ${test_file} "#include \n" - "#include \n" "const char* info_ver = \"INFO\" \":\" H5_VERSION;\n" "#ifdef H5_HAVE_PARALLEL\n" "const char* info_parallel = \"INFO\" \":\" \"PARALLEL\";\n" @@ -324,95 +343,113 @@ endfunction() # Invoke the HDF5 wrapper compiler. The compiler return value is stored to the # return_value argument, the text output is stored to the output variable. -macro( _HDF5_invoke_compiler language output return_value version is_parallel) - set(${version}) - if(HDF5_USE_STATIC_LIBRARIES) - set(lib_type_args -noshlib) - else() - set(lib_type_args -shlib) - endif() - set(scratch_dir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5) - if("${language}" STREQUAL "C") - set(test_file ${scratch_dir}/cmake_hdf5_test.c) - elseif("${language}" STREQUAL "CXX") - set(test_file ${scratch_dir}/cmake_hdf5_test.cxx) - elseif("${language}" STREQUAL "Fortran") - set(test_file ${scratch_dir}/cmake_hdf5_test.f90) - endif() - exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE} - ARGS -show ${lib_type_args} ${test_file} - OUTPUT_VARIABLE ${output} - RETURN_VALUE ${return_value} +function( _HDF5_invoke_compiler language output_var return_value_var version_var is_parallel_var) + set(is_parallel FALSE) + if(HDF5_USE_STATIC_LIBRARIES) + set(lib_type_args -noshlib) + else() + set(lib_type_args -shlib) + endif() + set(scratch_dir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5) + if("${language}" STREQUAL "C") + set(test_file ${scratch_dir}/cmake_hdf5_test.c) + elseif("${language}" STREQUAL "CXX") + set(test_file ${scratch_dir}/cmake_hdf5_test.cxx) + elseif("${language}" STREQUAL "Fortran") + set(test_file ${scratch_dir}/cmake_hdf5_test.f90) + endif() + # Verify that the compiler wrapper can actually compile: sometimes the compiler + # wrapper exists, but not the compiler. E.g. Miniconda / Anaconda Python + execute_process( + COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} ${test_file} + WORKING_DIRECTORY ${scratch_dir} + OUTPUT_VARIABLE output + ERROR_VARIABLE output + RESULT_VARIABLE return_value ) - if(NOT ${${return_value}} EQUAL 0) - message(STATUS - "Unable to determine HDF5 ${language} flags from HDF5 wrapper.") + if(return_value AND NOT HDF5_FIND_QUIETLY) + message(STATUS + "HDF5 ${language} compiler wrapper is unable to compile a minimal HDF5 program.") + else() + execute_process( + COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} -show ${lib_type_args} ${test_file} + WORKING_DIRECTORY ${scratch_dir} + OUTPUT_VARIABLE output + ERROR_VARIABLE output + RESULT_VARIABLE return_value + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(return_value AND NOT HDF5_FIND_QUIETLY) + message(STATUS + "Unable to determine HDF5 ${language} flags from HDF5 wrapper.") endif() - exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE} - ARGS -showconfig - OUTPUT_VARIABLE config_output - RETURN_VALUE config_return - ) - if(NOT ${return_value} EQUAL 0) - message( STATUS - "Unable to determine HDF5 ${language} version from HDF5 wrapper.") + execute_process( + COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} -showconfig + OUTPUT_VARIABLE config_output + ERROR_VARIABLE config_output + RESULT_VARIABLE return_value + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(return_value AND NOT HDF5_FIND_QUIETLY) + message(STATUS + "Unable to determine HDF5 ${language} version_var from HDF5 wrapper.") endif() - string(REGEX MATCH "HDF5 Version: ([a-zA-Z0-9\\.\\-]*)" version_match "${config_output}") - if(version_match) - string(REPLACE "HDF5 Version: " "" ${version} "${version_match}") - string(REPLACE "-patch" "." ${version} "${${version}}") + string(REGEX MATCH "HDF5 Version: ([a-zA-Z0-9\\.\\-]*)" version "${config_output}") + if(version) + string(REPLACE "HDF5 Version: " "" version "${version}") + string(REPLACE "-patch" "." version "${version}") endif() if(config_output MATCHES "Parallel HDF5: yes") - set(${is_parallel} TRUE) - else() - set(${is_parallel} FALSE) + set(is_parallel TRUE) endif() -endmacro() + endif() + foreach(var output return_value version is_parallel) + set(${${var}_var} ${${var}} PARENT_SCOPE) + endforeach() +endfunction() # Parse a compile line for definitions, includes, library paths, and libraries. -macro( _HDF5_parse_compile_line - compile_line_var - include_paths - definitions - library_paths - libraries - libraries_hl) - - separate_arguments(_HDF5_COMPILE_ARGS NATIVE_COMMAND "${${compile_line_var}}") - - foreach(arg IN LISTS _HDF5_COMPILE_ARGS) - if("${arg}" MATCHES "^-I(.*)$") +function(_HDF5_parse_compile_line compile_line_var include_paths definitions + library_paths libraries libraries_hl) + + separate_arguments(_compile_args NATIVE_COMMAND "${${compile_line_var}}") + + foreach(_arg IN LISTS _compile_args) + if("${_arg}" MATCHES "^-I(.*)$") # include directory - list(APPEND ${include_paths} "${CMAKE_MATCH_1}") - elseif("${arg}" MATCHES "^-D(.*)$") + list(APPEND include_paths "${CMAKE_MATCH_1}") + elseif("${_arg}" MATCHES "^-D(.*)$") # compile definition - list(APPEND ${definitions} "-D${CMAKE_MATCH_1}") - elseif("${arg}" MATCHES "^-L(.*)$") + list(APPEND definitions "-D${CMAKE_MATCH_1}") + elseif("${_arg}" MATCHES "^-L(.*)$") # library search path - list(APPEND ${library_paths} "${CMAKE_MATCH_1}") - elseif("${arg}" MATCHES "^-l(hdf5.*hl.*)$") + list(APPEND library_paths "${CMAKE_MATCH_1}") + elseif("${_arg}" MATCHES "^-l(hdf5.*hl.*)$") # library name (hl) - list(APPEND ${libraries_hl} "${CMAKE_MATCH_1}") - elseif("${arg}" MATCHES "^-l(.*)$") + list(APPEND libraries_hl "${CMAKE_MATCH_1}") + elseif("${_arg}" MATCHES "^-l(.*)$") # library name - list(APPEND ${libraries} "${CMAKE_MATCH_1}") - elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.(a|so|dylib|sl|lib)$") + list(APPEND libraries "${CMAKE_MATCH_1}") + elseif("${_arg}" MATCHES "^(.:)?[/\\].*\\.(a|so|dylib|sl|lib)$") # library file - if(NOT EXISTS "${arg}") + if(NOT EXISTS "${_arg}") continue() endif() - get_filename_component(_HDF5_LPATH "${arg}" DIRECTORY) - get_filename_component(_HDF5_LNAME "${arg}" NAME_WE) - string(REGEX REPLACE "^lib" "" _HDF5_LNAME "${_HDF5_LNAME}") - list(APPEND ${library_paths} "${_HDF5_LPATH}") - if(_HDF5_LNAME MATCHES "hdf5.*hl") - list(APPEND ${libraries_hl} "${_HDF5_LNAME}") + get_filename_component(_lpath "${_arg}" DIRECTORY) + get_filename_component(_lname "${_arg}" NAME_WE) + string(REGEX REPLACE "^lib" "" _lname "${_lname}") + list(APPEND library_paths "${_lpath}") + if(_lname MATCHES "hdf5.*hl") + list(APPEND libraries_hl "${_lname}") else() - list(APPEND ${libraries} "${_HDF5_LNAME}") + list(APPEND libraries "${_lname}") endif() endif() endforeach() -endmacro() + foreach(var include_paths definitions library_paths libraries libraries_hl) + set(${${var}_var} ${${var}} PARENT_SCOPE) + endforeach() +endfunction() # Select a preferred imported configuration from a target function(_HDF5_select_imported_config target imported_conf) @@ -522,10 +559,10 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE) set(HDF5_${_lang}_LIBRARY ${_hdf5_lang_location}) list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix}) set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix}) - set(HDF5_${_lang}_FOUND True) + set(HDF5_${_lang}_FOUND TRUE) endif() - if(FIND_HL) - get_target_property(__lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} IMPORTED_IMPLIB_${_hdf5_imported_conf} ) + if(HDF5_FIND_HL) + get_target_property(_hdf5_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} IMPORTED_IMPLIB_${_hdf5_imported_conf} ) if (NOT _hdf5_lang_hl_location) get_target_property(_hdf5_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION_${_hdf5_imported_conf}) if (NOT _hdf5_hl_lang_location) @@ -536,7 +573,7 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE) set(HDF5_${_lang}_HL_LIBRARY ${_hdf5_lang_hl_location}) list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_HL_TARGET}${_suffix}) set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_HL_TARGET}${_suffix}) - set(HDF5_HL_FOUND True) + set(HDF5_HL_FOUND TRUE) endif() unset(_hdf5_lang_hl_location) endif() @@ -547,172 +584,178 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE) endif() if(NOT HDF5_FOUND) - set(_HDF5_NEED_TO_SEARCH False) - set(HDF5_COMPILER_NO_INTERROGATE True) + set(_HDF5_NEED_TO_SEARCH FALSE) + set(HDF5_COMPILER_NO_INTERROGATE TRUE) # Only search for languages we've enabled - foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS) + foreach(_lang IN LISTS HDF5_LANGUAGE_BINDINGS) + set(HDF5_${_lang}_LIBRARIES) + set(HDF5_${_lang}_HL_LIBRARIES) + # First check to see if our regular compiler is one of wrappers - if(__lang STREQUAL "C") + if(_lang STREQUAL "C") _HDF5_test_regular_compiler_C( - HDF5_${__lang}_COMPILER_NO_INTERROGATE - HDF5_${__lang}_VERSION - HDF5_${__lang}_IS_PARALLEL) - elseif(__lang STREQUAL "CXX") + HDF5_${_lang}_COMPILER_NO_INTERROGATE + HDF5_${_lang}_VERSION + HDF5_${_lang}_IS_PARALLEL) + elseif(_lang STREQUAL "CXX") _HDF5_test_regular_compiler_CXX( - HDF5_${__lang}_COMPILER_NO_INTERROGATE - HDF5_${__lang}_VERSION - HDF5_${__lang}_IS_PARALLEL) - elseif(__lang STREQUAL "Fortran") + HDF5_${_lang}_COMPILER_NO_INTERROGATE + HDF5_${_lang}_VERSION + HDF5_${_lang}_IS_PARALLEL) + elseif(_lang STREQUAL "Fortran") _HDF5_test_regular_compiler_Fortran( - HDF5_${__lang}_COMPILER_NO_INTERROGATE - HDF5_${__lang}_IS_PARALLEL) + HDF5_${_lang}_COMPILER_NO_INTERROGATE + HDF5_${_lang}_IS_PARALLEL) else() continue() endif() - if(HDF5_${__lang}_COMPILER_NO_INTERROGATE) - message(STATUS "HDF5: Using hdf5 compiler wrapper for all ${__lang} compiling") - set(HDF5_${__lang}_FOUND True) - set(HDF5_${__lang}_COMPILER_EXECUTABLE_NO_INTERROGATE - "${CMAKE_${__lang}_COMPILER}" - CACHE FILEPATH "HDF5 ${__lang} compiler wrapper") - set(HDF5_${__lang}_DEFINITIONS) - set(HDF5_${__lang}_INCLUDE_DIRS) - set(HDF5_${__lang}_LIBRARIES) - set(HDF5_${__lang}_HL_LIBRARIES) - - mark_as_advanced(HDF5_${__lang}_COMPILER_EXECUTABLE_NO_INTERROGATE) - - set(HDF5_${__lang}_FOUND True) - set(HDF5_HL_FOUND True) + if(HDF5_${_lang}_COMPILER_NO_INTERROGATE) + if(HDF5_FIND_DEBUG) + message(STATUS "HDF5: Using hdf5 compiler wrapper for all ${_lang} compiling") + endif() + set(HDF5_${_lang}_FOUND TRUE) + set(HDF5_${_lang}_COMPILER_EXECUTABLE_NO_INTERROGATE + "${CMAKE_${_lang}_COMPILER}" + CACHE FILEPATH "HDF5 ${_lang} compiler wrapper") + set(HDF5_${_lang}_DEFINITIONS) + set(HDF5_${_lang}_INCLUDE_DIRS) + set(HDF5_${_lang}_LIBRARIES) + set(HDF5_${_lang}_HL_LIBRARIES) + + mark_as_advanced(HDF5_${_lang}_COMPILER_EXECUTABLE_NO_INTERROGATE) + + set(HDF5_${_lang}_FOUND TRUE) + set(HDF5_HL_FOUND TRUE) else() - set(HDF5_COMPILER_NO_INTERROGATE False) + set(HDF5_COMPILER_NO_INTERROGATE FALSE) # If this language isn't using the wrapper, then try to seed the # search options with the wrapper - find_program(HDF5_${__lang}_COMPILER_EXECUTABLE - NAMES ${HDF5_${__lang}_COMPILER_NAMES} NAMES_PER_DIR + find_program(HDF5_${_lang}_COMPILER_EXECUTABLE + NAMES ${HDF5_${_lang}_COMPILER_NAMES} NAMES_PER_DIR HINTS ${HDF5_ROOT} PATH_SUFFIXES bin Bin - DOC "HDF5 ${__lang} Wrapper compiler. Used only to detect HDF5 compile flags." + DOC "HDF5 ${_lang} Wrapper compiler. Used only to detect HDF5 compile flags." ${_HDF5_SEARCH_OPTS} ) - mark_as_advanced( HDF5_${__lang}_COMPILER_EXECUTABLE ) - unset(HDF5_${__lang}_COMPILER_NAMES) - - if(HDF5_${__lang}_COMPILER_EXECUTABLE) - _HDF5_invoke_compiler(${__lang} HDF5_${__lang}_COMPILE_LINE - HDF5_${__lang}_RETURN_VALUE HDF5_${__lang}_VERSION HDF5_${__lang}_IS_PARALLEL) - if(HDF5_${__lang}_RETURN_VALUE EQUAL 0) - message(STATUS "HDF5: Using hdf5 compiler wrapper to determine ${__lang} configuration") - _HDF5_parse_compile_line( HDF5_${__lang}_COMPILE_LINE - HDF5_${__lang}_INCLUDE_DIRS - HDF5_${__lang}_DEFINITIONS - HDF5_${__lang}_LIBRARY_DIRS - HDF5_${__lang}_LIBRARY_NAMES - HDF5_${__lang}_HL_LIBRARY_NAMES + mark_as_advanced( HDF5_${_lang}_COMPILER_EXECUTABLE ) + unset(HDF5_${_lang}_COMPILER_NAMES) + + if(HDF5_${_lang}_COMPILER_EXECUTABLE) + _HDF5_invoke_compiler(${_lang} HDF5_${_lang}_COMPILE_LINE + HDF5_${_lang}_RETURN_VALUE HDF5_${_lang}_VERSION HDF5_${_lang}_IS_PARALLEL) + if(HDF5_${_lang}_RETURN_VALUE EQUAL 0) + if(HDF5_FIND_DEBUG) + message(STATUS "HDF5: Using hdf5 compiler wrapper to determine ${_lang} configuration") + endif() + _HDF5_parse_compile_line( HDF5_${_lang}_COMPILE_LINE + HDF5_${_lang}_INCLUDE_DIRS + HDF5_${_lang}_DEFINITIONS + HDF5_${_lang}_LIBRARY_DIRS + HDF5_${_lang}_LIBRARY_NAMES + HDF5_${_lang}_HL_LIBRARY_NAMES ) - set(HDF5_${__lang}_LIBRARIES) + set(HDF5_${_lang}_LIBRARIES) - foreach(L IN LISTS HDF5_${__lang}_LIBRARY_NAMES) + foreach(_lib IN LISTS HDF5_${_lang}_LIBRARY_NAMES) set(_HDF5_SEARCH_NAMES_LOCAL) - if("x${L}" MATCHES "hdf5") + if("x${_lib}" MATCHES "hdf5") # hdf5 library set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS}) if(HDF5_USE_STATIC_LIBRARIES) if(WIN32) - set(_HDF5_SEARCH_NAMES_LOCAL lib${L}) + set(_HDF5_SEARCH_NAMES_LOCAL lib${_lib}) else() - set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a) + set(_HDF5_SEARCH_NAMES_LOCAL lib${_lib}.a) endif() endif() else() # external library set(_HDF5_SEARCH_OPTS_LOCAL) endif() - find_library(HDF5_${__lang}_LIBRARY_${L} - NAMES ${_HDF5_SEARCH_NAMES_LOCAL} ${L} NAMES_PER_DIR - HINTS ${HDF5_${__lang}_LIBRARY_DIRS} + find_library(HDF5_${_lang}_LIBRARY_${_lib} + NAMES ${_HDF5_SEARCH_NAMES_LOCAL} ${_lib} NAMES_PER_DIR + HINTS ${HDF5_${_lang}_LIBRARY_DIRS} ${HDF5_ROOT} ${_HDF5_SEARCH_OPTS_LOCAL} ) unset(_HDF5_SEARCH_OPTS_LOCAL) unset(_HDF5_SEARCH_NAMES_LOCAL) - if(HDF5_${__lang}_LIBRARY_${L}) - list(APPEND HDF5_${__lang}_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}}) + if(HDF5_${_lang}_LIBRARY_${_lib}) + list(APPEND HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_LIBRARY_${_lib}}) else() - list(APPEND HDF5_${__lang}_LIBRARIES ${L}) + list(APPEND HDF5_${_lang}_LIBRARIES ${_lib}) endif() endforeach() - if(FIND_HL) - set(HDF5_${__lang}_HL_LIBRARIES) - foreach(L IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES) + if(HDF5_FIND_HL) + set(HDF5_${_lang}_HL_LIBRARIES) + foreach(_lib IN LISTS HDF5_${_lang}_HL_LIBRARY_NAMES) set(_HDF5_SEARCH_NAMES_LOCAL) - if("x${L}" MATCHES "hdf5") + if("x${_lib}" MATCHES "hdf5") # hdf5 library set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS}) if(HDF5_USE_STATIC_LIBRARIES) if(WIN32) - set(_HDF5_SEARCH_NAMES_LOCAL lib${L}) + set(_HDF5_SEARCH_NAMES_LOCAL lib${_lib}) else() - set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a) + set(_HDF5_SEARCH_NAMES_LOCAL lib${_lib}.a) endif() endif() else() # external library set(_HDF5_SEARCH_OPTS_LOCAL) endif() - find_library(HDF5_${__lang}_LIBRARY_${L} - NAMES ${_HDF5_SEARCH_NAMES_LOCAL} ${L} NAMES_PER_DIR - HINTS ${HDF5_${__lang}_LIBRARY_DIRS} + find_library(HDF5_${_lang}_LIBRARY_${_lib} + NAMES ${_HDF5_SEARCH_NAMES_LOCAL} ${_lib} NAMES_PER_DIR + HINTS ${HDF5_${_lang}_LIBRARY_DIRS} ${HDF5_ROOT} ${_HDF5_SEARCH_OPTS_LOCAL} ) unset(_HDF5_SEARCH_OPTS_LOCAL) unset(_HDF5_SEARCH_NAMES_LOCAL) - if(HDF5_${__lang}_LIBRARY_${L}) - list(APPEND HDF5_${__lang}_HL_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}}) + if(HDF5_${_lang}_LIBRARY_${_lib}) + list(APPEND HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_LIBRARY_${_lib}}) else() - list(APPEND HDF5_${__lang}_HL_LIBRARIES ${L}) + list(APPEND HDF5_${_lang}_HL_LIBRARIES ${_lib}) endif() endforeach() - set(HDF5_HL_FOUND True) + set(HDF5_HL_FOUND TRUE) endif() - set(HDF5_${__lang}_FOUND True) - _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_DEFINITIONS) - _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_INCLUDE_DIRS) - _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_LIBRARIES) - _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_HL_LIBRARIES) + set(HDF5_${_lang}_FOUND TRUE) + list(REMOVE_DUPLICATES HDF5_${_lang}_DEFINITIONS) + list(REMOVE_DUPLICATES HDF5_${_lang}_INCLUDE_DIRS) else() - set(_HDF5_NEED_TO_SEARCH True) + set(_HDF5_NEED_TO_SEARCH TRUE) endif() else() - set(_HDF5_NEED_TO_SEARCH True) + set(_HDF5_NEED_TO_SEARCH TRUE) endif() endif() - if(HDF5_${__lang}_VERSION) + if(HDF5_${_lang}_VERSION) if(NOT HDF5_VERSION) - set(HDF5_VERSION ${HDF5_${__lang}_VERSION}) - elseif(NOT HDF5_VERSION VERSION_EQUAL HDF5_${__lang}_VERSION) - message(WARNING "HDF5 Version found for language ${__lang}, ${HDF5_${__lang}_VERSION} is different than previously found version ${HDF5_VERSION}") + set(HDF5_VERSION ${HDF5_${_lang}_VERSION}) + elseif(NOT HDF5_VERSION VERSION_EQUAL HDF5_${_lang}_VERSION) + message(WARNING "HDF5 Version found for language ${_lang}, ${HDF5_${_lang}_VERSION} is different than previously found version ${HDF5_VERSION}") endif() endif() - if(DEFINED HDF5_${__lang}_IS_PARALLEL) + if(DEFINED HDF5_${_lang}_IS_PARALLEL) if(NOT DEFINED HDF5_IS_PARALLEL) - set(HDF5_IS_PARALLEL ${HDF5_${__lang}_IS_PARALLEL}) - elseif(NOT HDF5_IS_PARALLEL AND HDF5_${__lang}_IS_PARALLEL) - message(WARNING "HDF5 found for language ${__lang} is parallel but previously found language is not parallel.") - elseif(HDF5_IS_PARALLEL AND NOT HDF5_${__lang}_IS_PARALLEL) - message(WARNING "HDF5 found for language ${__lang} is not parallel but previously found language is parallel.") + set(HDF5_IS_PARALLEL ${HDF5_${_lang}_IS_PARALLEL}) + elseif(NOT HDF5_IS_PARALLEL AND HDF5_${_lang}_IS_PARALLEL) + message(WARNING "HDF5 found for language ${_lang} is parallel but previously found language is not parallel.") + elseif(HDF5_IS_PARALLEL AND NOT HDF5_${_lang}_IS_PARALLEL) + message(WARNING "HDF5 found for language ${_lang} is not parallel but previously found language is parallel.") endif() endif() endforeach() + unset(_lib) else() - set(_HDF5_NEED_TO_SEARCH True) + set(_HDF5_NEED_TO_SEARCH TRUE) endif() if(NOT HDF5_FOUND AND HDF5_COMPILER_NO_INTERROGATE) # No arguments necessary, all languages can use the compiler wrappers - set(HDF5_FOUND True) + set(HDF5_FOUND TRUE) set(HDF5_METHOD "Included by compiler wrappers") set(HDF5_REQUIRED_VARS HDF5_METHOD) elseif(NOT HDF5_FOUND AND NOT _HDF5_NEED_TO_SEARCH) @@ -721,25 +764,23 @@ elseif(NOT HDF5_FOUND AND NOT _HDF5_NEED_TO_SEARCH) set(HDF5_INCLUDE_DIRS) set(HDF5_LIBRARIES) set(HDF5_HL_LIBRARIES) - foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS) - if(HDF5_${__lang}_FOUND) - if(NOT HDF5_${__lang}_COMPILER_NO_INTERROGATE) - list(APPEND HDF5_DEFINITIONS ${HDF5_${__lang}_DEFINITIONS}) - list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${__lang}_INCLUDE_DIRS}) - list(APPEND HDF5_LIBRARIES ${HDF5_${__lang}_LIBRARIES}) - if(FIND_HL) - list(APPEND HDF5_HL_LIBRARIES ${HDF5_${__lang}_HL_LIBRARIES}) + foreach(_lang IN LISTS HDF5_LANGUAGE_BINDINGS) + if(HDF5_${_lang}_FOUND) + if(NOT HDF5_${_lang}_COMPILER_NO_INTERROGATE) + list(APPEND HDF5_DEFINITIONS ${HDF5_${_lang}_DEFINITIONS}) + list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${_lang}_INCLUDE_DIRS}) + list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_LIBRARIES}) + if(HDF5_FIND_HL) + list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_HL_LIBRARIES}) endif() endif() endif() endforeach() - _HDF5_remove_duplicates_from_beginning(HDF5_DEFINITIONS) - _HDF5_remove_duplicates_from_beginning(HDF5_INCLUDE_DIRS) - _HDF5_remove_duplicates_from_beginning(HDF5_LIBRARIES) - _HDF5_remove_duplicates_from_beginning(HDF5_HL_LIBRARIES) - set(HDF5_FOUND True) + list(REMOVE_DUPLICATES HDF5_DEFINITIONS) + list(REMOVE_DUPLICATES HDF5_INCLUDE_DIRS) + set(HDF5_FOUND TRUE) set(HDF5_REQUIRED_VARS HDF5_LIBRARIES) - if(FIND_HL) + if(HDF5_FIND_HL) list(APPEND HDF5_REQUIRED_VARS HDF5_HL_LIBRARIES) endif() endif() @@ -755,41 +796,38 @@ mark_as_advanced( HDF5_DIFF_EXECUTABLE ) if( NOT HDF5_FOUND ) # seed the initial lists of libraries to find with items we know we need set(HDF5_C_LIBRARY_NAMES hdf5) - set(HDF5_C_HL_LIBRARY_NAMES hdf5_hl) + set(HDF5_C_HL_LIBRARY_NAMES hdf5_hl ${HDF5_C_LIBRARY_NAMES} ) set(HDF5_CXX_LIBRARY_NAMES hdf5_cpp ${HDF5_C_LIBRARY_NAMES}) set(HDF5_CXX_HL_LIBRARY_NAMES hdf5_hl_cpp ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_CXX_LIBRARY_NAMES}) set(HDF5_Fortran_LIBRARY_NAMES hdf5_fortran ${HDF5_C_LIBRARY_NAMES}) - set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES}) + set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5_hl_fortran hdf5hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES}) - foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS) - # find the HDF5 include directories - if("${__lang}" STREQUAL "Fortran") - set(HDF5_INCLUDE_FILENAME hdf5.mod) - elseif("${__lang}" STREQUAL "CXX") - set(HDF5_INCLUDE_FILENAME H5Cpp.h) - else() - set(HDF5_INCLUDE_FILENAME hdf5.h) - endif() + # suffixes as seen on Linux, MSYS2, ... + set(_lib_suffixes hdf5) + if(NOT HDF5_PREFER_PARALLEL) + list(APPEND _lib_suffixes hdf5/serial) + endif() + if(HDF5_USE_STATIC_LIBRARIES) + set(_inc_suffixes include/static) + else() + set(_inc_suffixes include/shared) + endif() - find_path(HDF5_${__lang}_INCLUDE_DIR ${HDF5_INCLUDE_FILENAME} - HINTS ${HDF5_ROOT} - PATHS $ENV{HOME}/.local/include - PATH_SUFFIXES include Include - ${_HDF5_SEARCH_OPTS} - ) - mark_as_advanced(HDF5_${__lang}_INCLUDE_DIR) - # set the _DIRS variable as this is what the user will normally use - set(HDF5_${__lang}_INCLUDE_DIRS ${HDF5_${__lang}_INCLUDE_DIR}) - list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${__lang}_INCLUDE_DIR}) + foreach(_lang IN LISTS HDF5_LANGUAGE_BINDINGS) + set(HDF5_${_lang}_LIBRARIES) + set(HDF5_${_lang}_HL_LIBRARIES) + + # The "main" library. + set(_hdf5_main_library "") # find the HDF5 libraries - foreach(LIB IN LISTS HDF5_${__lang}_LIBRARY_NAMES) + foreach(LIB IN LISTS HDF5_${_lang}_LIBRARY_NAMES) if(HDF5_USE_STATIC_LIBRARIES) # According to bug 1643 on the CMake bug tracker, this is the # preferred method for searching for a static library. - # See https://gitlab.kitware.com/cmake/cmake/issues/1643. We search + # See https://gitlab.kitware.com/cmake/cmake/-/issues/1643. We search # first for the full static library name, but fall back to a # generic search on the name if the static search fails. set( THIS_LIBRARY_SEARCH_DEBUG @@ -805,68 +843,114 @@ if( NOT HDF5_FOUND ) endif() find_library(HDF5_${LIB}_LIBRARY_DEBUG NAMES ${THIS_LIBRARY_SEARCH_DEBUG} - HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib + HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib ${_lib_suffixes} ${_HDF5_SEARCH_OPTS} ) - find_library( HDF5_${LIB}_LIBRARY_RELEASE + find_library(HDF5_${LIB}_LIBRARY_RELEASE NAMES ${THIS_LIBRARY_SEARCH_RELEASE} - HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib + HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib ${_lib_suffixes} ${_HDF5_SEARCH_OPTS} ) + + # Set the "main" library if not already set. + if (NOT _hdf5_main_library) + if (HDF5_${LIB}_LIBRARY_RELEASE) + set(_hdf5_main_library "${HDF5_${LIB}_LIBRARY_RELEASE}") + elseif (HDF5_${LIB}_LIBRARY_DEBUG) + set(_hdf5_main_library "${HDF5_${LIB}_LIBRARY_DEBUG}") + endif () + endif () + select_library_configurations( HDF5_${LIB} ) - list(APPEND HDF5_${__lang}_LIBRARIES ${HDF5_${LIB}_LIBRARY}) + list(APPEND HDF5_${_lang}_LIBRARIES ${HDF5_${LIB}_LIBRARY}) endforeach() - if(HDF5_${__lang}_LIBRARIES) - set(HDF5_${__lang}_FOUND True) + if(HDF5_${_lang}_LIBRARIES) + set(HDF5_${_lang}_FOUND TRUE) endif() # Append the libraries for this language binding to the list of all # required libraries. - list(APPEND HDF5_LIBRARIES ${HDF5_${__lang}_LIBRARIES}) + list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_LIBRARIES}) + + # find the HDF5 include directories + set(_hdf5_inc_extra_paths) + set(_hdf5_inc_extra_suffixes) + if("${_lang}" STREQUAL "Fortran") + set(HDF5_INCLUDE_FILENAME hdf5.mod HDF5.mod) + + # Add library-based search paths for Fortran modules. + if (NOT _hdf5_main_library STREQUAL "") + # gfortran module directory + if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") + get_filename_component(_hdf5_library_dir "${_hdf5_main_library}" DIRECTORY) + list(APPEND _hdf5_inc_extra_paths "${_hdf5_library_dir}") + unset(_hdf5_library_dir) + list(APPEND _hdf5_inc_extra_suffixes gfortran/modules) + endif () + endif () + elseif("${_lang}" STREQUAL "CXX") + set(HDF5_INCLUDE_FILENAME H5Cpp.h) + else() + set(HDF5_INCLUDE_FILENAME hdf5.h) + endif() - if(FIND_HL) - foreach(LIB IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES) + unset(_hdf5_main_library) + + find_path(HDF5_${_lang}_INCLUDE_DIR ${HDF5_INCLUDE_FILENAME} + HINTS ${HDF5_ROOT} + PATHS $ENV{HOME}/.local/include ${_hdf5_inc_extra_paths} + PATH_SUFFIXES include Include ${_inc_suffixes} ${_lib_suffixes} ${_hdf5_inc_extra_suffixes} + ${_HDF5_SEARCH_OPTS} + ) + mark_as_advanced(HDF5_${_lang}_INCLUDE_DIR) + unset(_hdf5_inc_extra_paths) + unset(_hdf5_inc_extra_suffixes) + # set the _DIRS variable as this is what the user will normally use + set(HDF5_${_lang}_INCLUDE_DIRS ${HDF5_${_lang}_INCLUDE_DIR}) + list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${_lang}_INCLUDE_DIR}) + + if(HDF5_FIND_HL) + foreach(LIB IN LISTS HDF5_${_lang}_HL_LIBRARY_NAMES) if(HDF5_USE_STATIC_LIBRARIES) # According to bug 1643 on the CMake bug tracker, this is the # preferred method for searching for a static library. - # See https://gitlab.kitware.com/cmake/cmake/issues/1643. We search + # See https://gitlab.kitware.com/cmake/cmake/-/issues/1643. We search # first for the full static library name, but fall back to a # generic search on the name if the static search fails. set( THIS_LIBRARY_SEARCH_DEBUG lib${LIB}d.a lib${LIB}_debug.a lib${LIB}d lib${LIB}_D lib${LIB}_debug lib${LIB}d-static.a lib${LIB}_debug-static.a lib${LIB}d-static lib${LIB}_D-static lib${LIB}_debug-static ) - set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-static.a lib${LIB}-static) + set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a lib${LIB} lib${LIB}-static.a lib${LIB}-static) else() set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared) set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared) endif() find_library(HDF5_${LIB}_LIBRARY_DEBUG NAMES ${THIS_LIBRARY_SEARCH_DEBUG} - HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib + HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib ${_lib_suffixes} ${_HDF5_SEARCH_OPTS} ) - find_library( HDF5_${LIB}_LIBRARY_RELEASE + find_library(HDF5_${LIB}_LIBRARY_RELEASE NAMES ${THIS_LIBRARY_SEARCH_RELEASE} - HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib + HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib ${_lib_suffixes} ${_HDF5_SEARCH_OPTS} ) + select_library_configurations( HDF5_${LIB} ) - list(APPEND HDF5_${__lang}_HL_LIBRARIES ${HDF5_${LIB}_LIBRARY}) + list(APPEND HDF5_${_lang}_HL_LIBRARIES ${HDF5_${LIB}_LIBRARY}) endforeach() # Append the libraries for this language binding to the list of all # required libraries. - list(APPEND HDF5_HL_LIBRARIES ${HDF5_${__lang}_HL_LIBRARIES}) + list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_HL_LIBRARIES}) endif() endforeach() - if(FIND_HL AND HDF5_HL_LIBRARIES) - set(HDF5_HL_FOUND True) + if(HDF5_FIND_HL AND HDF5_HL_LIBRARIES) + set(HDF5_HL_FOUND TRUE) endif() - _HDF5_remove_duplicates_from_beginning(HDF5_DEFINITIONS) - _HDF5_remove_duplicates_from_beginning(HDF5_INCLUDE_DIRS) - _HDF5_remove_duplicates_from_beginning(HDF5_LIBRARIES) - _HDF5_remove_duplicates_from_beginning(HDF5_HL_LIBRARIES) + list(REMOVE_DUPLICATES HDF5_DEFINITIONS) + list(REMOVE_DUPLICATES HDF5_INCLUDE_DIRS) # If the HDF5 include directory was found, open H5pubconf.h to determine if # HDF5 was compiled with parallel IO support @@ -897,12 +981,14 @@ if( NOT HDF5_FOUND ) endif() endforeach() endforeach() + unset(_hdr) + unset(_dir) set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL "HDF5 library compiled with parallel IO support" ) mark_as_advanced( HDF5_IS_PARALLEL ) set(HDF5_REQUIRED_VARS HDF5_LIBRARIES HDF5_INCLUDE_DIRS) - if(FIND_HL) + if(HDF5_FIND_HL) list(APPEND HDF5_REQUIRED_VARS HDF5_HL_LIBRARIES) endif() endif() @@ -939,10 +1025,10 @@ if (HDF5_FOUND) add_library(HDF5::HDF5 INTERFACE IMPORTED) string(REPLACE "-D" "" _hdf5_definitions "${HDF5_DEFINITIONS}") set_target_properties(HDF5::HDF5 PROPERTIES - INTERFACE_LINK_LIBRARIES "${HDF5_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIRS}" INTERFACE_COMPILE_DEFINITIONS "${_hdf5_definitions}") unset(_hdf5_definitions) + target_link_libraries(HDF5::HDF5 INTERFACE ${HDF5_LIBRARIES}) endif () include(vtkDetectLibraryType) @@ -975,7 +1061,7 @@ if (HDF5_FOUND) # Error if we still don't have the location. message(SEND_ERROR "HDF5 was found, but a different variable was set which contains " - "its location.") + "the location of the `hdf5::${hdf5_target_name}` library.") endif () vtk_detect_library_type(_hdf5_libtype PATH "${_hdf5_location}") add_library("hdf5::${hdf5_target_name}" "${_hdf5_libtype}" IMPORTED) @@ -1003,16 +1089,18 @@ if (HDF5_FOUND) endif () endif () - if (NOT FIND_HL) + if (NOT HDF5_FIND_HL) continue () endif () + set(hdf5_alt_target_name "") if (hdf5_lang STREQUAL "C") set(hdf5_target_name "hdf5_hl") elseif (hdf5_lang STREQUAL "CXX") set(hdf5_target_name "hdf5_hl_cpp") elseif (hdf5_lang STREQUAL "Fortran") set(hdf5_target_name "hdf5_hl_fortran") + set(hdf5_alt_target_name "hdf5hl_fortran") else () continue () endif () @@ -1031,11 +1119,13 @@ if (HDF5_FOUND) set(_hdf5_location "${HDF5_${hdf5_lang}_HL_LIBRARY}") elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}") set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}") + elseif (hdf5_alt_target_name AND DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_alt_target_name}") + set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_alt_target_name}}") else () # Error if we still don't have the location. message(SEND_ERROR "HDF5 was found, but a different variable was set which contains " - "its location.") + "the location of the `hdf5::${hdf5_target_name}` library.") endif () vtk_detect_library_type(_hdf5_libtype PATH "${_hdf5_location}") add_library("hdf5::${hdf5_target_name}" "${_hdf5_libtype}" IMPORTED) @@ -1075,13 +1165,30 @@ if (HDF5_FIND_DEBUG) message(STATUS "HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}") message(STATUS "HDF5_LIBRARIES: ${HDF5_LIBRARIES}") message(STATUS "HDF5_HL_LIBRARIES: ${HDF5_HL_LIBRARIES}") - foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS) - message(STATUS "HDF5_${__lang}_DEFINITIONS: ${HDF5_${__lang}_DEFINITIONS}") - message(STATUS "HDF5_${__lang}_INCLUDE_DIR: ${HDF5_${__lang}_INCLUDE_DIR}") - message(STATUS "HDF5_${__lang}_INCLUDE_DIRS: ${HDF5_${__lang}_INCLUDE_DIRS}") - message(STATUS "HDF5_${__lang}_LIBRARY: ${HDF5_${__lang}_LIBRARY}") - message(STATUS "HDF5_${__lang}_LIBRARIES: ${HDF5_${__lang}_LIBRARIES}") - message(STATUS "HDF5_${__lang}_HL_LIBRARY: ${HDF5_${__lang}_HL_LIBRARY}") - message(STATUS "HDF5_${__lang}_HL_LIBRARIES: ${HDF5_${__lang}_HL_LIBRARIES}") + foreach(_lang IN LISTS HDF5_LANGUAGE_BINDINGS) + message(STATUS "HDF5_${_lang}_DEFINITIONS: ${HDF5_${_lang}_DEFINITIONS}") + message(STATUS "HDF5_${_lang}_INCLUDE_DIR: ${HDF5_${_lang}_INCLUDE_DIR}") + message(STATUS "HDF5_${_lang}_INCLUDE_DIRS: ${HDF5_${_lang}_INCLUDE_DIRS}") + message(STATUS "HDF5_${_lang}_LIBRARY: ${HDF5_${_lang}_LIBRARY}") + message(STATUS "HDF5_${_lang}_LIBRARIES: ${HDF5_${_lang}_LIBRARIES}") + message(STATUS "HDF5_${_lang}_HL_LIBRARY: ${HDF5_${_lang}_HL_LIBRARY}") + message(STATUS "HDF5_${_lang}_HL_LIBRARIES: ${HDF5_${_lang}_HL_LIBRARIES}") + endforeach() + message(STATUS "Defined targets (if any):") + foreach(_lang IN ITEMS "" "_cpp" "_fortran") + foreach(_hl IN ITEMS "" "_hl") + foreach(_prefix IN ITEMS "hdf5::" "") + foreach(_suffix IN ITEMS "-static" "-shared" "") + set (_target ${_prefix}hdf5${_hl}${_lang}${_suffix}) + if (TARGET ${_target}) + message(STATUS "... ${_target}") + else() + #message(STATUS "... ${_target} does not exist") + endif() + endforeach() + endforeach() + endforeach() endforeach() endif() +unset(_lang) +unset(_HDF5_NEED_TO_SEARCH) diff --git a/CMake/patches/99/FindJPEG.cmake b/CMake/patches/99/FindJPEG.cmake deleted file mode 100644 index d4d5daf29..000000000 --- a/CMake/patches/99/FindJPEG.cmake +++ /dev/null @@ -1,128 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindJPEG --------- - -Find the JPEG library (libjpeg) - -Imported targets -^^^^^^^^^^^^^^^^ - -This module defines the following :prop_tgt:`IMPORTED` targets: - -``JPEG::JPEG`` - The JPEG library, if found. - -Result variables -^^^^^^^^^^^^^^^^ - -This module will set the following variables in your project: - -``JPEG_FOUND`` - If false, do not try to use JPEG. -``JPEG_INCLUDE_DIRS`` - where to find jpeglib.h, etc. -``JPEG_LIBRARIES`` - the libraries needed to use JPEG. -``JPEG_VERSION`` - the version of the JPEG library found - -Cache variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``JPEG_INCLUDE_DIRS`` - where to find jpeglib.h, etc. -``JPEG_LIBRARY_RELEASE`` - where to find the JPEG library (optimized). -``JPEG_LIBRARY_DEBUG`` - where to find the JPEG library (debug). - -Obsolete variables -^^^^^^^^^^^^^^^^^^ - -``JPEG_INCLUDE_DIR`` - where to find jpeglib.h, etc. (same as JPEG_INCLUDE_DIRS) -``JPEG_LIBRARY`` - where to find the JPEG library. -#]=======================================================================] - -find_path(JPEG_INCLUDE_DIR jpeglib.h) - -set(jpeg_names ${JPEG_NAMES} jpeg jpeg-static libjpeg libjpeg-static) -foreach(name ${jpeg_names}) - list(APPEND jpeg_names_debug "${name}d") -endforeach() - -if(NOT JPEG_LIBRARY) - find_library(JPEG_LIBRARY_RELEASE NAMES ${jpeg_names}) - find_library(JPEG_LIBRARY_DEBUG NAMES ${jpeg_names_debug}) - include(SelectLibraryConfigurations) - select_library_configurations(JPEG) - mark_as_advanced(JPEG_LIBRARY_RELEASE JPEG_LIBRARY_DEBUG) -endif() -unset(jpeg_names) -unset(jpeg_names_debug) - -if(JPEG_INCLUDE_DIR AND EXISTS "${JPEG_INCLUDE_DIR}/jpeglib.h") - file(GLOB _JPEG_CONFIG_HEADERS "${JPEG_INCLUDE_DIR}/jconfig*.h") - list(INSERT _JPEG_CONFIG_HEADERS 0 - "${JPEG_INCLUDE_DIR}/jpeglib.h") - foreach (_JPEG_CONFIG_HEADER IN LISTS _JPEG_CONFIG_HEADERS) - file(STRINGS "${_JPEG_CONFIG_HEADER}" - jpeg_lib_version REGEX "^#define[\t ]+JPEG_LIB_VERSION[\t ]+.*") - - if (NOT jpeg_lib_version) - continue () - endif () - - string(REGEX REPLACE "^#define[\t ]+JPEG_LIB_VERSION[\t ]+([0-9]+).*" - "\\1" JPEG_VERSION "${jpeg_lib_version}") - break () - endforeach () - unset(jpeg_lib_version) - unset(_JPEG_CONFIG_HEADER) - unset(_JPEG_CONFIG_HEADERS) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(JPEG - REQUIRED_VARS JPEG_LIBRARY JPEG_INCLUDE_DIR - VERSION_VAR JPEG_VERSION) - -if(JPEG_FOUND) - set(JPEG_LIBRARIES ${JPEG_LIBRARY}) - set(JPEG_INCLUDE_DIRS "${JPEG_INCLUDE_DIR}") - - if(NOT TARGET JPEG::JPEG) - add_library(JPEG::JPEG UNKNOWN IMPORTED) - if(JPEG_INCLUDE_DIRS) - set_target_properties(JPEG::JPEG PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${JPEG_INCLUDE_DIRS}") - endif() - if(EXISTS "${JPEG_LIBRARY}") - set_target_properties(JPEG::JPEG PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "${JPEG_LIBRARY}") - endif() - if(EXISTS "${JPEG_LIBRARY_RELEASE}") - set_property(TARGET JPEG::JPEG APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(JPEG::JPEG PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" - IMPORTED_LOCATION_RELEASE "${JPEG_LIBRARY_RELEASE}") - endif() - if(EXISTS "${JPEG_LIBRARY_DEBUG}") - set_property(TARGET JPEG::JPEG APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(JPEG::JPEG PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" - IMPORTED_LOCATION_DEBUG "${JPEG_LIBRARY_DEBUG}") - endif() - endif() -endif() - -mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIR) diff --git a/CMake/patches/99/FindLibArchive.cmake b/CMake/patches/99/FindLibArchive.cmake deleted file mode 100644 index d47a0eeef..000000000 --- a/CMake/patches/99/FindLibArchive.cmake +++ /dev/null @@ -1,71 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindLibArchive --------------- - -Find libarchive library and headers. -Libarchive is multi-format archive and compression library. - -The module defines the following variables: - -:: - - LibArchive_FOUND - true if libarchive was found - LibArchive_INCLUDE_DIRS - include search path - LibArchive_LIBRARIES - libraries to link - LibArchive_VERSION - libarchive 3-component version number - LibArchive::LibArchive - target for linking against libarchive -#]=======================================================================] - -find_path(LibArchive_INCLUDE_DIR - NAMES - archive.h - PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\LibArchive;InstallPath]/include" - DOC "libarchive include directory") -mark_as_advanced(LibArchive_INCLUDE_DIR) - -find_library(LibArchive_LIBRARY - NAMES - archive libarchive - PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\LibArchive;InstallPath]/lib" - DOC "libarchive library") -mark_as_advanced(LibArchive_LIBRARY) - -# Extract the version number from the header. -if(LibArchive_INCLUDE_DIR AND EXISTS "${LibArchive_INCLUDE_DIR}/archive.h") - # The version string appears in one of three known formats in the header: - # #define ARCHIVE_LIBRARY_VERSION "libarchive 2.4.12" - # #define ARCHIVE_VERSION_STRING "libarchive 2.8.4" - # #define ARCHIVE_VERSION_ONLY_STRING "3.2.0" - # Match any format. - set(_LibArchive_VERSION_REGEX "^#define[ \t]+ARCHIVE[_A-Z]+VERSION[_A-Z]*[ \t]+\"(libarchive +)?([0-9]+)\\.([0-9]+)\\.([0-9]+)[^\"]*\".*$") - file(STRINGS "${LibArchive_INCLUDE_DIR}/archive.h" _LibArchive_VERSION_STRING LIMIT_COUNT 1 REGEX "${_LibArchive_VERSION_REGEX}") - if(_LibArchive_VERSION_STRING) - string(REGEX REPLACE "${_LibArchive_VERSION_REGEX}" "\\2.\\3.\\4" LibArchive_VERSION "${_LibArchive_VERSION_STRING}") - endif() - unset(_LibArchive_VERSION_REGEX) - unset(_LibArchive_VERSION_STRING) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LibArchive - REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR - VERSION_VAR LibArchive_VERSION - ) -unset(LIBARCHIVE_FOUND) - -if (LibArchive_FOUND) - set(LibArchive_LIBRARIES "${LibArchive_LIBRRAY}") - set(LibArchive_INCLUDE_DIRS "${LibArchive_INCLUDE_DIR}") - - if (NOT TARGET LibArchive::LibArchive) - add_library(LibArchive::LibArchive UNKNOWN IMPORTED) - set_target_properties(LibArchive::LibArchive PROPERTIES - IMPORTED_LOCATION "${LibArchive_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${LibArchive_INCLUDE_DIR}") - endif () -endif () diff --git a/CMake/patches/99/FindOpenGL.cmake b/CMake/patches/99/FindOpenGL.cmake index 58d2f5da0..117505f57 100644 --- a/CMake/patches/99/FindOpenGL.cmake +++ b/CMake/patches/99/FindOpenGL.cmake @@ -1,135 +1,126 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -# See https://gitlab.kitware.com/cmake/cmake/merge_requests/2445 - -#.rst: -# FindOpenGL -# ---------- -# -# FindModule for OpenGL and GLU. -# -# Optional COMPONENTS -# ^^^^^^^^^^^^^^^^^^^ -# -# This module respects several optional COMPONENTS: ``EGL``, ``GLX``, -# ``OpenGL``, ``GLES2``, and ``GLES3``. There are corresponding import targets -# for each of these flags. -# -# IMPORTED Targets -# ^^^^^^^^^^^^^^^^ -# -# This module defines the :prop_tgt:`IMPORTED` targets: -# -# ``OpenGL::GL`` -# Defined to the platform-specific OpenGL libraries if the system has OpenGL. -# ``OpenGL::OpenGL`` -# Defined to libOpenGL if the system is GLVND-based. -# ``OpenGL::GLU`` -# Defined if the system has GLU. -# ``OpenGL::GLX`` -# Defined if the system has GLX. -# ``OpenGL::EGL`` -# Defined if the system has EGL. -# ``OpenGL::GLES2`` -# Defined if the system has GLES2. -# ``OpenGL::GLES3`` -# Defined if the system has GLES3. -# -# Result Variables -# ^^^^^^^^^^^^^^^^ -# -# This module sets the following variables: -# -# ``OPENGL_FOUND`` -# True, if the system has OpenGL and all components are found. -# ``OPENGL_XMESA_FOUND`` -# True, if the system has XMESA. -# ``OPENGL_GLU_FOUND`` -# True, if the system has GLU. -# ``OpenGL_OpenGL_FOUND`` -# True, if the system has an OpenGL library. -# ``OpenGL_GLX_FOUND`` -# True, if the system has GLX. -# ``OpenGL_EGL_FOUND`` -# True, if the system has EGL. -# ``OpenGL_GLES2_FOUND`` -# True, if the system has GLES2. -# ``OpenGL_GLES3_FOUND`` -# True, if the system has GLES3. -# ``OPENGL_INCLUDE_DIR`` -# Path to the OpenGL include directory. -# ``OPENGL_EGL_INCLUDE_DIRS`` -# Path to the EGL include directory. -# ``OPENGL_LIBRARIES`` -# Paths to the OpenGL library, windowing system libraries, and GLU libraries. -# On Linux, this assumes GLX and is never correct for EGL-based targets. -# Clients are encouraged to use the ``OpenGL::*`` import targets instead. -# -# Cache variables -# ^^^^^^^^^^^^^^^ -# -# The following cache variables may also be set: -# -# ``OPENGL_egl_LIBRARY`` -# Path to the EGL library. -# ``OPENGL_glu_LIBRARY`` -# Path to the GLU library. -# ``OPENGL_glx_LIBRARY`` -# Path to the GLVND 'GLX' library. -# ``OPENGL_opengl_LIBRARY`` -# Path to the GLVND 'OpenGL' library -# ``OPENGL_gl_LIBRARY`` -# Path to the OpenGL library. New code should prefer the ``OpenGL::*`` import -# targets. -# -# Linux-specific -# ^^^^^^^^^^^^^^ -# -# Some Linux systems utilize GLVND as a new ABI for OpenGL. GLVND separates -# context libraries from OpenGL itself; OpenGL lives in "libOpenGL", and -# contexts are defined in "libGLX" or "libEGL". GLVND is currently the only way -# to get OpenGL 3+ functionality via EGL in a manner portable across vendors. -# Projects may use GLVND explicitly with target ``OpenGL::OpenGL`` and either -# ``OpenGL::GLX`` or ``OpenGL::EGL``. -# -# Projects may use the ``OpenGL::GL`` target (or ``OPENGL_LIBRARIES`` variable) -# to use legacy GL interfaces. These will use the legacy GL library located -# by ``OPENGL_gl_LIBRARY``, if available. If ``OPENGL_gl_LIBRARY`` is empty or -# not found and GLVND is available, the ``OpenGL::GL`` target will use GLVND -# ``OpenGL::OpenGL`` and ``OpenGL::GLX`` (and the ``OPENGL_LIBRARIES`` -# variable will use the corresponding libraries). Thus, for non-EGL-based -# Linux targets, the ``OpenGL::GL`` target is most portable. -# -# A ``OpenGL_GL_PREFERENCE`` variable may be set to specify the preferred way -# to provide legacy GL interfaces in case multiple choices are available. -# The value may be one of: -# -# ``GLVND`` -# If the GLVND OpenGL and GLX libraries are available, prefer them. -# This forces ``OPENGL_gl_LIBRARY`` to be empty. -# This is the default if components were requested (since components -# correspond to GLVND libraries) or if policy :policy:`CMP0072` is -# set to ``NEW``. -# -# ``LEGACY`` -# Prefer to use the legacy libGL library, if available. -# This is the default if no components were requested and -# policy :policy:`CMP0072` is not set to ``NEW``. -# -# For EGL targets the client must rely on GLVND support on the user's system. -# Linking should use the ``OpenGL::OpenGL OpenGL::EGL`` targets. Using GLES* -# libraries is theoretically possible in place of ``OpenGL::OpenGL``. -# -# ``OPENGL_egl_LIBRARY`` and ``OPENGL_EGL_INCLUDE_DIRS`` are defined in the case of -# GLVND. For non-GLVND Linux and other systems these are left undefined. -# -# macOS-Specific -# ^^^^^^^^^^^^^^ -# -# On OSX FindOpenGL defaults to using the framework version of OpenGL. People -# will have to change the cache values of OPENGL_glu_LIBRARY and -# OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX. +#[=======================================================================[.rst: +FindOpenGL +---------- + +FindModule for OpenGL and OpenGL Utility Library (GLU). + +Optional COMPONENTS +^^^^^^^^^^^^^^^^^^^ + +This module respects several optional COMPONENTS: ``EGL``, ``GLX``, and +``OpenGL``. There are corresponding import targets for each of these flags. + +IMPORTED Targets +^^^^^^^^^^^^^^^^ + +This module defines the :prop_tgt:`IMPORTED` targets: + +``OpenGL::GL`` + Defined to the platform-specific OpenGL libraries if the system has OpenGL. +``OpenGL::OpenGL`` + Defined to libOpenGL if the system is GLVND-based. +``OpenGL::GLU`` + Defined if the system has OpenGL Utility Library (GLU). +``OpenGL::GLX`` + Defined if the system has OpenGL Extension to the X Window System (GLX). +``OpenGL::EGL`` + Defined if the system has EGL. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module sets the following variables: + +``OPENGL_FOUND`` + True, if the system has OpenGL and all components are found. +``OPENGL_XMESA_FOUND`` + True, if the system has XMESA. +``OPENGL_GLU_FOUND`` + True, if the system has GLU. +``OpenGL_OpenGL_FOUND`` + True, if the system has an OpenGL library. +``OpenGL_GLX_FOUND`` + True, if the system has GLX. +``OpenGL_EGL_FOUND`` + True, if the system has EGL. +``OPENGL_INCLUDE_DIR`` + Path to the OpenGL include directory. +``OPENGL_EGL_INCLUDE_DIRS`` + Path to the EGL include directory. +``OPENGL_LIBRARIES`` + Paths to the OpenGL library, windowing system libraries, and GLU libraries. + On Linux, this assumes GLX and is never correct for EGL-based targets. + Clients are encouraged to use the ``OpenGL::*`` import targets instead. + +Cache variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``OPENGL_egl_LIBRARY`` + Path to the EGL library. +``OPENGL_glu_LIBRARY`` + Path to the GLU library. +``OPENGL_glx_LIBRARY`` + Path to the GLVND 'GLX' library. +``OPENGL_opengl_LIBRARY`` + Path to the GLVND 'OpenGL' library +``OPENGL_gl_LIBRARY`` + Path to the OpenGL library. New code should prefer the ``OpenGL::*`` import + targets. + +Linux-specific +^^^^^^^^^^^^^^ + +Some Linux systems utilize GLVND as a new ABI for OpenGL. GLVND separates +context libraries from OpenGL itself; OpenGL lives in "libOpenGL", and +contexts are defined in "libGLX" or "libEGL". GLVND is currently the only way +to get OpenGL 3+ functionality via EGL in a manner portable across vendors. +Projects may use GLVND explicitly with target ``OpenGL::OpenGL`` and either +``OpenGL::GLX`` or ``OpenGL::EGL``. + +Projects may use the ``OpenGL::GL`` target (or ``OPENGL_LIBRARIES`` variable) +to use legacy GL interfaces. These will use the legacy GL library located +by ``OPENGL_gl_LIBRARY``, if available. If ``OPENGL_gl_LIBRARY`` is empty or +not found and GLVND is available, the ``OpenGL::GL`` target will use GLVND +``OpenGL::OpenGL`` and ``OpenGL::GLX`` (and the ``OPENGL_LIBRARIES`` +variable will use the corresponding libraries). Thus, for non-EGL-based +Linux targets, the ``OpenGL::GL`` target is most portable. + +A ``OpenGL_GL_PREFERENCE`` variable may be set to specify the preferred way +to provide legacy GL interfaces in case multiple choices are available. +The value may be one of: + +``GLVND`` + If the GLVND OpenGL and GLX libraries are available, prefer them. + This forces ``OPENGL_gl_LIBRARY`` to be empty. + This is the default if components were requested (since components + correspond to GLVND libraries) or if policy :policy:`CMP0072` is + set to ``NEW``. + +``LEGACY`` + Prefer to use the legacy libGL library, if available. + This is the default if no components were requested and + policy :policy:`CMP0072` is not set to ``NEW``. + +For EGL targets the client must rely on GLVND support on the user's system. +Linking should use the ``OpenGL::OpenGL OpenGL::EGL`` targets. Using GLES* +libraries is theoretically possible in place of ``OpenGL::OpenGL``, but this +module does not currently support that; contributions welcome. + +``OPENGL_egl_LIBRARY`` and ``OPENGL_EGL_INCLUDE_DIRS`` are defined in the case of +GLVND. For non-GLVND Linux and other systems these are left undefined. + +macOS-Specific +^^^^^^^^^^^^^^ + +On OSX FindOpenGL defaults to using the framework version of OpenGL. People +will have to change the cache values of OPENGL_glu_LIBRARY and +OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX. +#]=======================================================================] set(_OpenGL_REQUIRED_VARS OPENGL_gl_LIBRARY) @@ -139,14 +130,9 @@ foreach(component ${OpenGL_FIND_COMPONENTS}) set(OPENGL_USE_${_COMPONENT} 1) endforeach() -if (CYGWIN) - find_path(OPENGL_INCLUDE_DIR GL/gl.h ) - list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR) - - find_library(OPENGL_gl_LIBRARY opengl32 ) - find_library(OPENGL_glu_LIBRARY glu32 ) +set(_OpenGL_CACHE_VARS) -elseif (WIN32) +if (WIN32) if(BORLAND) set (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32") @@ -156,6 +142,10 @@ elseif (WIN32) set (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32") endif() + list(APPEND _OpenGL_CACHE_VARS + OPENGL_gl_LIBRARY + OPENGL_glu_LIBRARY + ) elseif (APPLE) # The OpenGL.framework provides both gl and glu find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL library for OS X") @@ -164,6 +154,11 @@ elseif (APPLE) find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OS X") list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR) + list(APPEND _OpenGL_CACHE_VARS + OPENGL_INCLUDE_DIR + OPENGL_gl_LIBRARY + OPENGL_glu_LIBRARY + ) else() if (CMAKE_SYSTEM_NAME MATCHES "HP-UX") # Handle HP-UX cases where we only want to find OpenGL in either hpux64 @@ -188,6 +183,17 @@ else() # `nvidia-` subdirectory. "/usr/lib/nvidia-*" "/usr/lib32/nvidia-*") + elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + # This is the path where is found in emsdk + set(_OPENGL_INCLUDE_PATH + "${EMSCRIPTEN_ROOT_PATH}/system/include") + + # These two inevitably include ${EMSCRIPTEN_SYSROOT} in the search path for + # OpenGL leading to all kinds of redefinition errors. + set(_FindOpenGL_OLD_FIND_ROOT_PATH_MODE_INCLUDE ${CMAKE_FIND_ROOT_PATH_MODE_INCLUDE}) + set(_FindOpenGL_OLD_FIND_USE_CMAKE_PATH ${CMAKE_FIND_USE_CMAKE_PATH}) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) + set(CMAKE_FIND_USE_CMAKE_PATH FALSE) endif() # The first line below is to make sure that the proper headers @@ -213,6 +219,21 @@ else() /opt/graphics/OpenGL/include ) + if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + # Restore the properties we changed above. + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ${_FindOpenGL_OLD_FIND_ROOT_PATH_MODE_INCLUDE}) + unset(_FindOpenGL_OLD_FIND_ROOT_PATH_MODE_INCLUDE) + set(CMAKE_FIND_USE_CMAKE_PATH ${_FindOpenGL_OLD_FIND_USE_CMAKE_PATH}) + unset(_FindOpenGL_OLD_FIND_USE_CMAKE_PATH) + endif() + + list(APPEND _OpenGL_CACHE_VARS + OPENGL_INCLUDE_DIR + OPENGL_GLX_INCLUDE_DIR + OPENGL_EGL_INCLUDE_DIR + OPENGL_xmesa_INCLUDE_DIR + ) + # Search for the GLVND libraries. We do this regardless of COMPONENTS; we'll # take into account the COMPONENTS logic later. find_library(OPENGL_opengl_LIBRARY @@ -223,11 +244,13 @@ else() find_library(OPENGL_glx_LIBRARY NAMES GLX PATHS ${_OPENGL_LIB_PATH} + PATH_SUFFIXES libglvnd ) find_library(OPENGL_egl_LIBRARY NAMES EGL PATHS ${_OPENGL_LIB_PATH} + PATH_SUFFIXES libglvnd ) find_library(OPENGL_gles2_LIBRARY @@ -249,6 +272,15 @@ else() /usr/shlib ) + list(APPEND _OpenGL_CACHE_VARS + OPENGL_opengl_LIBRARY + OPENGL_glx_LIBRARY + OPENGL_egl_LIBRARY + OPENGL_gles2_LIBRARY + OPENGL_gles3_LIBRARY + OPENGL_glu_LIBRARY + ) + set(_OpenGL_GL_POLICY_WARN 0) if(NOT DEFINED OpenGL_GL_PREFERENCE) set(OpenGL_GL_PREFERENCE "") @@ -293,15 +325,15 @@ else() /usr/openwin/lib /usr/shlib ${_OPENGL_LIB_PATH} + PATH_SUFFIXES libglvnd ) + list(APPEND _OpenGL_CACHE_VARS OPENGL_gl_LIBRARY) endif() if(_OpenGL_GL_POLICY_WARN AND OPENGL_gl_LIBRARY AND OPENGL_opengl_LIBRARY AND OPENGL_glx_LIBRARY) + cmake_policy(GET_WARNING CMP0072 _cmp0072_warning) message(AUTHOR_WARNING - "Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. " - "Run \"cmake --help-policy CMP0072\" for policy details. " - "Use the cmake_policy command to set the policy and suppress this warning." - "\n" + "${_cmp0072_warning}\n" "FindOpenGL found both a legacy GL library:\n" " OPENGL_gl_LIBRARY: ${OPENGL_gl_LIBRARY}\n" "and GLVND libraries for OpenGL and GLX:\n" @@ -454,8 +486,15 @@ if(OPENGL_EGL_INCLUDE_DIR) endif() include(FindPackageHandleStandardArgs) +if (CMAKE_FIND_PACKAGE_NAME STREQUAL "GLU") + # FindGLU include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive to + # the contents, detect the case in this module and suppress it explicitly. + set(FPHSA_NAME_MISMATCHED 1) +endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS} HANDLE_COMPONENTS) +unset(FPHSA_NAME_MISMATCHED) unset(_OpenGL_REQUIRED_VARS) # OpenGL:: targets @@ -702,18 +741,5 @@ set(OPENGL_LIBRARY ${OPENGL_LIBRARIES}) # This deprecated setting is for backward compatibility with CMake1.4 set(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR}) -mark_as_advanced( - OPENGL_INCLUDE_DIR - OPENGL_xmesa_INCLUDE_DIR - OPENGL_egl_LIBRARY - OPENGL_gles2_LIBRARY - OPENGL_gles3_LIBRARY - OPENGL_glu_LIBRARY - OPENGL_glx_LIBRARY - OPENGL_gl_LIBRARY - OPENGL_opengl_LIBRARY - OPENGL_EGL_INCLUDE_DIR - OPENGL_GLES2_INCLUDE_DIR - OPENGL_GLES3_INCLUDE_DIR - OPENGL_GLX_INCLUDE_DIR -) +mark_as_advanced(${_OpenGL_CACHE_VARS}) +unset(_OpenGL_CACHE_VARS) diff --git a/CMake/patches/99/FindSQLite3.cmake b/CMake/patches/99/FindSQLite3.cmake deleted file mode 100644 index c144ca1d8..000000000 --- a/CMake/patches/99/FindSQLite3.cmake +++ /dev/null @@ -1,66 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindSQLite3 ------------ - -Find the SQLite libraries, v3 - -IMPORTED targets -^^^^^^^^^^^^^^^^ - -This module defines the following :prop_tgt:`IMPORTED` target: - -``SQLite::SQLite3`` - -Result variables -^^^^^^^^^^^^^^^^ - -This module will set the following variables if found: - -``SQLite3_INCLUDE_DIRS`` - where to find sqlite3.h, etc. -``SQLite3_LIBRARIES`` - the libraries to link against to use SQLite3. -``SQLite3_VERSION`` - version of the SQLite3 library found -``SQLite3_FOUND`` - TRUE if found - -#]=======================================================================] - -# Look for the necessary header -find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h) -mark_as_advanced(SQLite3_INCLUDE_DIR) - -# Look for the necessary library -find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite) -mark_as_advanced(SQLite3_LIBRARY) - -# Extract version information from the header file -if(SQLite3_INCLUDE_DIR) - file(STRINGS ${SQLite3_INCLUDE_DIR}/sqlite3.h _ver_line - REGEX "^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\"" - LIMIT_COUNT 1) - string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" - SQLite3_VERSION "${_ver_line}") - unset(_ver_line) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SQLite3 - REQUIRED_VARS SQLite3_INCLUDE_DIR SQLite3_LIBRARY - VERSION_VAR SQLite3_VERSION) - -# Create the imported target -if(SQLite3_FOUND) - set(SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR}) - set(SQLite3_LIBRARIES ${SQLite3_LIBRARY}) - if(NOT TARGET SQLite::SQLite3) - add_library(SQLite::SQLite3 UNKNOWN IMPORTED) - set_target_properties(SQLite::SQLite3 PROPERTIES - IMPORTED_LOCATION "${SQLite3_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}") - endif() -endif() diff --git a/CMake/patches/99/FindX11.cmake b/CMake/patches/99/FindX11.cmake deleted file mode 100644 index d24436235..000000000 --- a/CMake/patches/99/FindX11.cmake +++ /dev/null @@ -1,729 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindX11 -------- - -Find X11 installation - -Try to find X11 on UNIX systems. The following values are defined - -:: - - X11_FOUND - True if X11 is available - X11_INCLUDE_DIR - include directories to use X11 - X11_LIBRARIES - link against these to use X11 - -and also the following more fine grained variables and targets: - -:: - - X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND, X11::ICE - X11_SM_INCLUDE_PATH, X11_SM_LIB, X11_SM_FOUND, X11::SM - X11_X11_INCLUDE_PATH, X11_X11_LIB, X11::X11 - X11_Xaccessrules_INCLUDE_PATH, - X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND - X11_Xau_INCLUDE_PATH, X11_Xau_LIB, X11_Xau_FOUND, X11::Xau - X11_Xcomposite_INCLUDE_PATH, X11_Xcomposite_LIB, X11_Xcomposite_FOUND, X11::Xcomposite - X11_Xcursor_INCLUDE_PATH, X11_Xcursor_LIB, X11_Xcursor_FOUND, X11::Xcursor - X11_Xdamage_INCLUDE_PATH, X11_Xdamage_LIB, X11_Xdamage_FOUND, X11::Xdamage - X11_Xdmcp_INCLUDE_PATH, X11_Xdmcp_LIB, X11_Xdmcp_FOUND, X11::Xdmcp - X11_Xext_INCLUDE_PATH, X11_Xext_LIB, X11_Xext_FOUND, X11::Xext - X11_Xxf86misc_INCLUDE_PATH, X11_Xxf86misc_LIB, X11_Xxf86misc_FOUND, X11::Xxf86misc - X11_Xxf86vm_INCLUDE_PATH, X11_Xxf86vm_LIB X11_Xxf86vm_FOUND, X11::Xxf86vm - X11_Xfixes_INCLUDE_PATH, X11_Xfixes_LIB, X11_Xfixes_FOUND, X11::Xfixes - X11_Xft_INCLUDE_PATH, X11_Xft_LIB, X11_Xft_FOUND, X11::Xft - X11_Xi_INCLUDE_PATH, X11_Xi_LIB, X11_Xi_FOUND, X11::Xi - X11_Xinerama_INCLUDE_PATH, X11_Xinerama_LIB, X11_Xinerama_FOUND, X11::Xinerama - X11_Xkb_INCLUDE_PATH, - X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND, X11::Xkb - X11_xkbfile_INCLUDE_PATH, X11_xkbfile_LIB, X11_xkbfile_FOUND, X11::xkbfile - X11_Xmu_INCLUDE_PATH, X11_Xmu_LIB, X11_Xmu_FOUND, X11::Xmu - X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND, X11::Xpm - X11_Xtst_INCLUDE_PATH, X11_Xtst_LIB, X11_Xtst_FOUND, X11::Xtst - X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND, X11::Xrandr - X11_Xrender_INCLUDE_PATH, X11_Xrender_LIB, X11_Xrender_FOUND, X11::Xrender - X11_XRes_INCLUDE_PATH, X11_XRes_LIB, X11_XRes_FOUND, X11::XRes - X11_Xss_INCLUDE_PATH, X11_Xss_LIB, X11_Xss_FOUND, X11::Xss - X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND, X11::Xt - X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND, X11::Xutil - X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND, X11::Xv - X11_dpms_INCLUDE_PATH, (in X11_Xext_LIB), X11_dpms_FOUND - X11_XShm_INCLUDE_PATH, (in X11_Xext_LIB), X11_XShm_FOUND - X11_Xshape_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xshape_FOUND - X11_XSync_INCLUDE_PATH, (in X11_Xext_LIB), X11_XSync_FOUND -#]=======================================================================] - -if (UNIX) - set(X11_FOUND 0) - # X11 is never a framework and some header files may be - # found in tcl on the mac - set(CMAKE_FIND_FRAMEWORK_SAVE ${CMAKE_FIND_FRAMEWORK}) - set(CMAKE_FIND_FRAMEWORK NEVER) - set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) - set(CMAKE_REQUIRED_QUIET ${X11_FIND_QUIETLY}) - set(X11_INC_SEARCH_PATH - /usr/pkg/xorg/include - /usr/X11R6/include - /usr/X11R7/include - /usr/include/X11 - /usr/openwin/include - /usr/openwin/share/include - /opt/graphics/OpenGL/include - /opt/X11/include - ) - - set(X11_LIB_SEARCH_PATH - /usr/pkg/xorg/lib - /usr/X11R6/lib - /usr/X11R7/lib - /usr/openwin/lib - /opt/X11/lib - ) - - find_path(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xlib_INCLUDE_PATH X11/Xlib.h ${X11_INC_SEARCH_PATH}) - - # Look for includes; keep the list sorted by name of the cmake *_INCLUDE_PATH - # variable (which doesn't need to match the include file name). - - # Solaris lacks XKBrules.h, so we should skip kxkbd there. - find_path(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH}) - find_path(X11_SM_INCLUDE_PATH X11/SM/SM.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xdmcp_INCLUDE_PATH X11/Xdmcp.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xext_INCLUDE_PATH X11/extensions/Xext.h ${X11_INC_SEARCH_PATH}) - find_path(X11_dpms_INCLUDE_PATH X11/extensions/dpms.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xxf86misc_INCLUDE_PATH X11/extensions/xf86misc.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xxf86vm_INCLUDE_PATH X11/extensions/xf86vmode.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xfixes_INCLUDE_PATH X11/extensions/Xfixes.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xft_INCLUDE_PATH X11/Xft/Xft.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xi_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xinerama_INCLUDE_PATH X11/extensions/Xinerama.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH}) - find_path(X11_xkbfile_INCLUDE_PATH X11/extensions/XKBfile.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xmu_INCLUDE_PATH X11/Xmu/Xmu.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xtst_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH}) - find_path(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xrandr_INCLUDE_PATH X11/extensions/Xrandr.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xrender_INCLUDE_PATH X11/extensions/Xrender.h ${X11_INC_SEARCH_PATH}) - find_path(X11_XRes_INCLUDE_PATH X11/extensions/XRes.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xss_INCLUDE_PATH X11/extensions/scrnsaver.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xshape_INCLUDE_PATH X11/extensions/shape.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH}) - find_path(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH}) - find_path(X11_XSync_INCLUDE_PATH X11/extensions/sync.h ${X11_INC_SEARCH_PATH}) - - # Backwards compatibility. - set(X11_Xinput_INCLUDE_PATH "${X11_Xi_INCLUDE_PATH}") - set(X11_xf86misc_INCLUDE_PATH "${X11_Xxf86misc_INCLUDE_PATH}") - set(X11_xf86vmode_INCLUDE_PATH "${X11_Xxf8vm_INCLUDE_PATH}") - set(X11_Xkbfile_INCLUDE_PATH "${X11_xkbfile_INCLUDE_PATH}") - set(X11_XTest_INCLUDE_PATH "${X11_Xtst_INCLUDE_PATH}") - set(X11_Xscreensaver_INCLUDE_PATH "${X11_Xss_INCLUDE_PATH}") - - find_library(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH}) - - # Find additional X libraries. Keep list sorted by library name. - find_library(X11_ICE_LIB ICE ${X11_LIB_SEARCH_PATH}) - find_library(X11_SM_LIB SM ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xau_LIB Xau ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xcomposite_LIB Xcomposite ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xcursor_LIB Xcursor ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xdamage_LIB Xdamage ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xdmcp_LIB Xdmcp ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xext_LIB Xext ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xfixes_LIB Xfixes ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xft_LIB Xft ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xi_LIB Xi ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH}) - find_library(X11_xkbfile_LIB xkbfile ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xmu_LIB Xmu ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH}) - find_library(X11_XRes_LIB XRes ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xss_LIB Xss ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xtst_LIB Xtst ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xv_LIB Xv ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xxf86misc_LIB Xxf86misc ${X11_LIB_SEARCH_PATH}) - find_library(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH}) - - # Backwards compatibility. - set(X11_Xinput_LIB "${X11_Xi_LIB}") - set(X11_Xkbfile_LIB "${X11_xkbfile_LIB}") - set(X11_XTest_LIB "${X11_Xtst_LIB}") - set(X11_Xscreensaver_LIB "${X11_Xss_LIB}") - - set(X11_LIBRARY_DIR "") - if(X11_X11_LIB) - get_filename_component(X11_LIBRARY_DIR ${X11_X11_LIB} PATH) - endif() - - set(X11_INCLUDE_DIR) # start with empty list - if(X11_X11_INCLUDE_PATH) - list(APPEND X11_INCLUDE_DIR ${X11_X11_INCLUDE_PATH}) - endif() - - if(X11_Xlib_INCLUDE_PATH) - list(APPEND X11_INCLUDE_DIR ${X11_Xlib_INCLUDE_PATH}) - endif() - - if(X11_Xutil_INCLUDE_PATH) - set(X11_Xutil_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xutil_INCLUDE_PATH}) - endif() - - if(X11_Xshape_INCLUDE_PATH) - set(X11_Xshape_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xshape_INCLUDE_PATH}) - endif() - - set(X11_LIBRARIES) # start with empty list - if(X11_X11_LIB) - list(APPEND X11_LIBRARIES ${X11_X11_LIB}) - endif() - - if(X11_Xext_LIB) - set(X11_Xext_FOUND TRUE) - list(APPEND X11_LIBRARIES ${X11_Xext_LIB}) - endif() - - if(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH) - set(X11_Xt_FOUND TRUE) - endif() - - if(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH) - find_package(Freetype QUIET) - find_package(Fontconfig QUIET) - if (FREETYPE_FOUND AND FONTCONFIG_FOUND) - set(X11_Xft_FOUND TRUE) - endif () - list(APPEND X11_INCLUDE_DIR ${X11_Xft_INCLUDE_PATH}) - endif() - - if(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH) - set(X11_Xv_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xv_INCLUDE_PATH}) - endif() - - if (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH) - set(X11_Xau_FOUND TRUE) - endif () - - if (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB) - set(X11_Xdmcp_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xdmcp_INCLUDE_PATH}) - endif () - - if (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH) - set(X11_Xaccess_FOUND TRUE) - set(X11_Xaccess_INCLUDE_PATH ${X11_Xaccessstr_INCLUDE_PATH}) - list(APPEND X11_INCLUDE_DIR ${X11_Xaccess_INCLUDE_PATH}) - endif () - - if (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB) - set(X11_Xpm_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xpm_INCLUDE_PATH}) - endif () - - if (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB) - set(X11_Xcomposite_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xcomposite_INCLUDE_PATH}) - endif () - - if (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB) - set(X11_Xdamage_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xdamage_INCLUDE_PATH}) - endif () - - if (X11_XShm_INCLUDE_PATH) - set(X11_XShm_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_XShm_INCLUDE_PATH}) - endif () - - if (X11_Xtst_INCLUDE_PATH AND X11_Xtst_LIB) - set(X11_Xtst_FOUND TRUE) - # Backwards compatibility. - set(X11_XTest_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xtst_INCLUDE_PATH}) - endif () - - if (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB) - set(X11_Xi_FOUND TRUE) - # Backwards compatibility. - set(X11_Xinput_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xi_INCLUDE_PATH}) - endif () - - if (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB) - set(X11_Xinerama_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xinerama_INCLUDE_PATH}) - endif () - - if (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB) - set(X11_Xfixes_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xfixes_INCLUDE_PATH}) - endif () - - if (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB) - set(X11_Xrender_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xrender_INCLUDE_PATH}) - endif () - - if (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB) - set(X11_XRes_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_XRes_INCLUDE_PATH}) - endif () - - if (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB) - set(X11_Xrandr_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xrandr_INCLUDE_PATH}) - endif () - - if (X11_Xxf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB) - set(X11_Xxf86misc_FOUND TRUE) - # Backwards compatibility. - set(X11_xf86misc_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xxf86misc_INCLUDE_PATH}) - endif () - - if (X11_Xxf86vm_INCLUDE_PATH AND X11_Xxf86vm_LIB) - set(X11_Xxf86vm_FOUND TRUE) - # Backwards compatibility. - set(X11_xf86vmode_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xxf86vm_INCLUDE_PATH}) - endif () - - if (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB) - set(X11_Xcursor_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xcursor_INCLUDE_PATH}) - endif () - - if (X11_Xss_INCLUDE_PATH AND X11_Xss_LIB) - set(X11_Xss_FOUND TRUE) - set(X11_Xscreensaver_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xss_INCLUDE_PATH}) - endif () - - if (X11_dpms_INCLUDE_PATH) - set(X11_dpms_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_dpms_INCLUDE_PATH}) - endif () - - if (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH) - set(X11_Xkb_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xkb_INCLUDE_PATH} ) - endif () - - if (X11_xkbfile_INCLUDE_PATH AND X11_xkbfile_LIB AND X11_Xlib_INCLUDE_PATH) - set(X11_xkbfile_FOUND TRUE) - # Backwards compatibility. - set(X11_Xkbfile_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_xkbfile_INCLUDE_PATH} ) - endif () - - if (X11_Xmu_INCLUDE_PATH AND X11_Xmu_LIB) - set(X11_Xmu_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_Xmu_INCLUDE_PATH}) - endif () - - if (X11_XSync_INCLUDE_PATH) - set(X11_XSync_FOUND TRUE) - list(APPEND X11_INCLUDE_DIR ${X11_XSync_INCLUDE_PATH}) - endif () - - if(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH) - set(X11_ICE_FOUND TRUE) - endif() - - if(X11_SM_LIB AND X11_SM_INCLUDE_PATH) - set(X11_SM_FOUND TRUE) - endif() - - # Most of the X11 headers will be in the same directories, avoid - # creating a huge list of duplicates. - if (X11_INCLUDE_DIR) - list(REMOVE_DUPLICATES X11_INCLUDE_DIR) - endif () - - # Deprecated variable for backwards compatibility with CMake 1.4 - if (X11_X11_INCLUDE_PATH AND X11_LIBRARIES) - set(X11_FOUND 1) - endif () - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(X11 - REQUIRED_VARS X11_X11_INCLUDE_PATH X11_X11_LIB - HANDLE_COMPONENTS) - - if(X11_FOUND) - include(CheckFunctionExists) - include(CheckLibraryExists) - - # Translated from an autoconf-generated configure script. - # See libs.m4 in autoconf's m4 directory. - if($ENV{ISC} MATCHES "^yes$") - set(X11_X_EXTRA_LIBS -lnsl_s -linet) - else() - set(X11_X_EXTRA_LIBS "") - - # See if XOpenDisplay in X11 works by itself. - check_library_exists("${X11_LIBRARIES}" "XOpenDisplay" "${X11_LIBRARY_DIR}" X11_LIB_X11_SOLO) - if(NOT X11_LIB_X11_SOLO) - # Find library needed for dnet_ntoa. - check_library_exists("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA) - if (X11_LIB_DNET_HAS_DNET_NTOA) - list(APPEND X11_X_EXTRA_LIBS -ldnet) - else () - check_library_exists("dnet_stub" "dnet_ntoa" "" X11_LIB_DNET_STUB_HAS_DNET_NTOA) - if (X11_LIB_DNET_STUB_HAS_DNET_NTOA) - list(APPEND X11_X_EXTRA_LIBS -ldnet_stub) - endif () - endif () - endif() - - # Find library needed for gethostbyname. - check_function_exists("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME) - if(NOT CMAKE_HAVE_GETHOSTBYNAME) - check_library_exists("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) - if (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) - list(APPEND X11_X_EXTRA_LIBS -lnsl) - else () - check_library_exists("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) - if (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) - list(APPEND X11_X_EXTRA_LIBS -lbsd) - endif () - endif () - endif() - - # Find library needed for connect. - check_function_exists("connect" CMAKE_HAVE_CONNECT) - if(NOT CMAKE_HAVE_CONNECT) - check_library_exists("socket" "connect" "" CMAKE_LIB_SOCKET_HAS_CONNECT) - if (CMAKE_LIB_SOCKET_HAS_CONNECT) - list(INSERT X11_X_EXTRA_LIBS 0 -lsocket) - endif () - endif() - - # Find library needed for remove. - check_function_exists("remove" CMAKE_HAVE_REMOVE) - if(NOT CMAKE_HAVE_REMOVE) - check_library_exists("posix" "remove" "" CMAKE_LIB_POSIX_HAS_REMOVE) - if (CMAKE_LIB_POSIX_HAS_REMOVE) - list(APPEND X11_X_EXTRA_LIBS -lposix) - endif () - endif() - - # Find library needed for shmat. - check_function_exists("shmat" CMAKE_HAVE_SHMAT) - if(NOT CMAKE_HAVE_SHMAT) - check_library_exists("ipc" "shmat" "" CMAKE_LIB_IPS_HAS_SHMAT) - if (CMAKE_LIB_IPS_HAS_SHMAT) - list(APPEND X11_X_EXTRA_LIBS -lipc) - endif () - endif() - endif() - - if (X11_ICE_FOUND) - check_library_exists("ICE" "IceConnectionNumber" "${X11_LIBRARY_DIR}" - CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) - if(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) - set (X11_X_PRE_LIBS ${X11_ICE_LIB}) - if(X11_SM_LIB) - list(INSERT X11_X_PRE_LIBS 0 ${X11_SM_LIB}) - endif() - endif() - endif () - - # Build the final list of libraries. - set(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS}) - - if (NOT TARGET X11::X11) - add_library(X11::X11 UNKNOWN IMPORTED) - set_target_properties(X11::X11 PROPERTIES - IMPORTED_LOCATION "${X11_X11_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_X11_INCLUDE_PATH}") - endif () - endif () - - if (X11_ICE_FOUND AND NOT TARGET X11::ICE) - add_library(X11::ICE UNKNOWN IMPORTED) - set_target_properties(X11::ICE PROPERTIES - IMPORTED_LOCATION "${X11_ICE_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_ICE_INCLUDE_PATH}") - endif () - - if (X11_SM_FOUND AND NOT TARGET X11::SM) - add_library(X11::SM UNKNOWN IMPORTED) - set_target_properties(X11::SM PROPERTIES - IMPORTED_LOCATION "${X11_SM_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_SM_INCLUDE_PATH}") - endif () - - if (X11_Xau_FOUND AND NOT TARGET X11::Xau) - add_library(X11::Xau UNKNOWN IMPORTED) - set_target_properties(X11::Xau PROPERTIES - IMPORTED_LOCATION "${X11_Xau_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xau_INCLUDE_PATH}") - endif () - - if (X11_Xcomposite_FOUND AND NOT TARGET X11::Xcomposite) - add_library(X11::Xcomposite UNKNOWN IMPORTED) - set_target_properties(X11::Xcomposite PROPERTIES - IMPORTED_LOCATION "${X11_Xcomposite_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xcomposite_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11") - endif () - - if (X11_Xcursor_FOUND AND NOT TARGET X11::Xcursor) - add_library(X11::Xcursor UNKNOWN IMPORTED) - set_target_properties(X11::Xcursor PROPERTIES - IMPORTED_LOCATION "${X11_Xcursor_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xcursor_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xrender;X11::Xfixes;X11::X11") - endif () - - if (X11_Xdamage_FOUND AND NOT TARGET X11::Xdamage) - add_library(X11::Xdamage UNKNOWN IMPORTED) - set_target_properties(X11::Xdamage PROPERTIES - IMPORTED_LOCATION "${X11_Xdamage_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xdamage_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xfixes;X11::X11") - endif () - - if (X11_Xdmcp_FOUND AND NOT TARGET X11::Xdmcp) - add_library(X11::Xdmcp UNKNOWN IMPORTED) - set_target_properties(X11::Xdmcp PROPERTIES - IMPORTED_LOCATION "${X11_Xdmcp_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xdmcp_INCLUDE_PATH}") - endif () - - if (X11_Xext_FOUND AND NOT TARGET X11::Xext) - add_library(X11::Xext UNKNOWN IMPORTED) - set_target_properties(X11::Xext PROPERTIES - IMPORTED_LOCATION "${X11_Xext_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xext_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11") - endif () - - if (X11_Xxf86misc_FOUND AND NOT TARGET X11::Xxf86misc) - add_library(X11::Xxf86misc UNKNOWN IMPORTED) - set_target_properties(X11::Xxf86misc PROPERTIES - IMPORTED_LOCATION "${X11_Xxf86misc_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xxf86misc_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11;X11::Xext") - endif () - - if (X11_Xxf86vm_FOUND AND NOT TARGET X11::Xxf86vm) - add_library(X11::Xxf86vm UNKNOWN IMPORTED) - set_target_properties(X11::Xxf86vm PROPERTIES - IMPORTED_LOCATION "${X11_Xxf86vm_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xxf86vm_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11;X11::Xext") - endif () - - if (X11_Xfixes_FOUND AND NOT TARGET X11::Xfixes) - add_library(X11::Xfixes UNKNOWN IMPORTED) - set_target_properties(X11::Xfixes PROPERTIES - IMPORTED_LOCATION "${X11_Xfixes_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xfixes_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11") - endif () - - if (X11_Xft_FOUND AND NOT TARGET X11::Xft) - add_library(X11::Xft UNKNOWN IMPORTED) - set_target_properties(X11::Xft PROPERTIES - IMPORTED_LOCATION "${X11_Xft_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xft_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xrender;X11::X11;Fontconfig::Fontconfig;Freetype::Freetype") - endif () - - if (X11_Xi_FOUND AND NOT TARGET X11::Xi) - add_library(X11::Xi UNKNOWN IMPORTED) - set_target_properties(X11::Xi PROPERTIES - IMPORTED_LOCATION "${X11_Xi_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xi_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") - endif () - - if (X11_Xinerama_FOUND AND NOT TARGET X11::Xinerama) - add_library(X11::Xinerama UNKNOWN IMPORTED) - set_target_properties(X11::Xinerama PROPERTIES - IMPORTED_LOCATION "${X11_Xinerama_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xinerama_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") - endif () - - if (X11_Xkb_FOUND AND NOT TARGET X11::Xkb) - add_library(X11::Xkb INTERFACE IMPORTED) - set_target_properties(X11::Xkb PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xkb_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11") - endif () - - if (X11_xkbfile_FOUND AND NOT TARGET X11::xkbfile) - add_library(X11::xkbfile UNKNOWN IMPORTED) - set_target_properties(X11::xkbfile PROPERTIES - IMPORTED_LOCATION "${X11_xkbfile_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_xkbfile_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11") - endif () - - if (X11_Xmu_FOUND AND NOT TARGET X11::Xmu) - add_library(X11::Xmu UNKNOWN IMPORTED) - set_target_properties(X11::Xmu PROPERTIES - IMPORTED_LOCATION "${X11_Xmu_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xmu_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xt;X11::Xext;X11::X11") - endif () - - if (X11_Xpm_FOUND AND NOT TARGET X11::Xpm) - add_library(X11::Xpm UNKNOWN IMPORTED) - set_target_properties(X11::Xpm PROPERTIES - IMPORTED_LOCATION "${X11_Xpm_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xpm_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11") - endif () - - if (X11_Xtst_FOUND AND NOT TARGET X11::Xtst) - add_library(X11::Xtst UNKNOWN IMPORTED) - set_target_properties(X11::Xtst PROPERTIES - IMPORTED_LOCATION "${X11_Xtst_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xtst_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xi;X11::Xext;X11::X11") - endif () - - if (X11_Xrandr_FOUND AND NOT TARGET X11::Xrandr) - add_library(X11::Xrandr UNKNOWN IMPORTED) - set_target_properties(X11::Xrandr PROPERTIES - IMPORTED_LOCATION "${X11_Xrandr_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xrandr_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xrender;X11::Xext;X11::X11") - endif () - - if (X11_Xrender_FOUND AND NOT TARGET X11::Xrender) - add_library(X11::Xrender UNKNOWN IMPORTED) - set_target_properties(X11::Xrender PROPERTIES - IMPORTED_LOCATION "${X11_Xrender_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xrender_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::X11") - endif () - - if (X11_XRes_FOUND AND NOT TARGET X11::XRes) - add_library(X11::XRes UNKNOWN IMPORTED) - set_target_properties(X11::XRes PROPERTIES - IMPORTED_LOCATION "${X11_XRes_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_XRes_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") - endif () - - if (X11_Xss_FOUND AND NOT TARGET X11::Xss) - add_library(X11::Xss UNKNOWN IMPORTED) - set_target_properties(X11::Xss PROPERTIES - IMPORTED_LOCATION "${X11_Xss_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xss_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") - endif () - - if (X11_Xt_FOUND AND NOT TARGET X11::Xt) - add_library(X11::Xt UNKNOWN IMPORTED) - set_target_properties(X11::Xt PROPERTIES - IMPORTED_LOCATION "${X11_Xt_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xt_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::ICE;X11::SM;X11::X11") - endif () - - if (X11_Xutil_FOUND AND NOT TARGET X11::Xutil) - add_library(X11::Xutil INTERFACE IMPORTED) - set_target_properties(X11::Xutil PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xutil_INCLUDE_PATH}" - # libX11 contains the implementations for functions in the Xutil.h - # header. - INTERFACE_LINK_LIBRARIES "X11::X11") - endif () - - if (X11_Xv_FOUND AND NOT TARGET X11::Xv) - add_library(X11::Xv UNKNOWN IMPORTED) - set_target_properties(X11::Xv PROPERTIES - IMPORTED_LOCATION "${X11_Xv_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${X11_Xv_INCLUDE_PATH}" - INTERFACE_LINK_LIBRARIES "X11::Xext;X11::X11") - endif () - - mark_as_advanced( - X11_X11_INCLUDE_PATH - X11_X11_LIB - X11_Xext_INCLUDE_PATH - X11_Xext_LIB - X11_Xau_LIB - X11_Xau_INCLUDE_PATH - X11_Xlib_INCLUDE_PATH - X11_Xutil_INCLUDE_PATH - X11_Xcomposite_INCLUDE_PATH - X11_Xcomposite_LIB - X11_Xfixes_LIB - X11_Xfixes_INCLUDE_PATH - X11_Xrandr_LIB - X11_Xrandr_INCLUDE_PATH - X11_Xdamage_LIB - X11_Xdamage_INCLUDE_PATH - X11_Xrender_LIB - X11_Xrender_INCLUDE_PATH - X11_XRes_LIB - X11_XRes_INCLUDE_PATH - X11_Xxf86misc_LIB - X11_Xxf86misc_INCLUDE_PATH - X11_Xxf86vm_LIB - X11_Xxf86vm_INCLUDE_PATH - X11_Xi_LIB - X11_Xi_INCLUDE_PATH - X11_Xinerama_LIB - X11_Xinerama_INCLUDE_PATH - X11_Xtst_LIB - X11_Xtst_INCLUDE_PATH - X11_Xcursor_LIB - X11_Xcursor_INCLUDE_PATH - X11_dpms_INCLUDE_PATH - X11_Xt_LIB - X11_Xt_INCLUDE_PATH - X11_Xdmcp_LIB - X11_LIBRARIES - X11_Xaccessrules_INCLUDE_PATH - X11_Xaccessstr_INCLUDE_PATH - X11_Xdmcp_INCLUDE_PATH - X11_Xkb_INCLUDE_PATH - X11_Xkblib_INCLUDE_PATH - X11_xkbfile_INCLUDE_PATH - X11_xkbfile_LIB - X11_Xmu_INCLUDE_PATH - X11_Xmu_LIB - X11_Xss_INCLUDE_PATH - X11_Xss_LIB - X11_Xpm_INCLUDE_PATH - X11_Xpm_LIB - X11_Xft_LIB - X11_Xft_INCLUDE_PATH - X11_Xshape_INCLUDE_PATH - X11_Xv_LIB - X11_Xv_INCLUDE_PATH - X11_XShm_INCLUDE_PATH - X11_ICE_LIB - X11_ICE_INCLUDE_PATH - X11_SM_LIB - X11_SM_INCLUDE_PATH - X11_XSync_INCLUDE_PATH - ) - set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE}) - set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) -endif () diff --git a/CMake/vtk-config.cmake.in b/CMake/vtk-config.cmake.in index 1ecfde326..f0ff20ef0 100644 --- a/CMake/vtk-config.cmake.in +++ b/CMake/vtk-config.cmake.in @@ -32,6 +32,10 @@ The following variables are provided by this module: are also targets and may be linked to using `target_link_libraries`. * `VTK_AUTOINIT_INCLUDE`: The header to include for access to VTK's autoinit support. + * `VTK_QT_VERSION`: The major version of Qt used by VTK if Qt support enabled. + * `VTK_QML_DIR`: Where VTK's QML plugins live if QML support is enabled. + * `VTK_ENABLE_VR_COLLABORATION`: Is VR collaboration enabled when VR is enabled. + * `VTK_SMP_BACKENDS`: The list of available SMP backends. For more information about the Python in use by VTK, the `VTK_PYTHON_VERSION` variable may be used to query the `find_package(Python)` that VTK performs @@ -49,8 +53,15 @@ data. [VTK module API]: TODO: Link to hosted documentation. #]==] +if (CMAKE_VERSION VERSION_LESS "3.12") + set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0) + set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE" + "VTK requires CMake 3.12 in order to reliably be used.") + return () +endif () + cmake_policy(PUSH) -cmake_policy(VERSION 3.8...3.12) +cmake_policy(VERSION 3.12) set(_vtk_temp_variables) set(_vtk_real_components) @@ -108,6 +119,7 @@ set("${CMAKE_FIND_PACKAGE_NAME}_MINOR_VERSION" "@VTK_MINOR_VERSION@") set("${CMAKE_FIND_PACKAGE_NAME}_BUILD_VERSION" "@VTK_BUILD_VERSION@") set("${CMAKE_FIND_PACKAGE_NAME}_LEGACY_REMOVE" "@VTK_LEGACY_REMOVE@") set("${CMAKE_FIND_PACKAGE_NAME}_AUTOINIT_INCLUDE" "\"vtkAutoInit.h\"") +set("${CMAKE_FIND_PACKAGE_NAME}_SMP_BACKENDS" "@vtk_smp_backends@") set("${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS" "@vtk_all_components@") @@ -128,12 +140,35 @@ include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-propert include("${CMAKE_CURRENT_LIST_DIR}/vtk-find-package-helpers.cmake" OPTIONAL) +# Ensure that the right OpenGL preference is in place when finding the OpenGL +# libraries. +if (@vtk_opengl_preference_set@) # vtk_opengl_preference_set + set("${CMAKE_FIND_PACKAGE_NAME}_OPENGL_GL_PREFERENCE_save" "${OPENGL_GL_PREFERENCE}") + set(OPENGL_GL_PREFERENCE "@vtk_opengl_preference@") +endif () + include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-find-packages.cmake") +if (@vtk_opengl_preference_set@) # vtk_opengl_preference_set + set(OPENGL_GL_PREFERENCE "${${CMAKE_FIND_PACKAGE_NAME}_OPENGL_GL_PREFERENCE_save}") +endif () + if (TARGET VTK::opengl) set(VTK_OPENGL_HAS_EGL "@VTK_OPENGL_HAS_EGL@") endif () +if (TARGET VTK::RenderingVR) + set("${CMAKE_FIND_PACKAGE_NAME}_ENABLE_VR_COLLABORATION" "@VTK_ENABLE_VR_COLLABORATION@") +endif () + +if (@vtk_qt_major_version@) # VTK_QT_VERSION + set("${CMAKE_FIND_PACKAGE_NAME}_QT_VERSION" "@vtk_qt_major_version@") +endif () + +if (@vtk_has_qml@) # vtk_has_qml + set("${CMAKE_FIND_PACKAGE_NAME}_QML_DIR" "${${CMAKE_FIND_PACKAGE_NAME}_PREFIX_PATH}/@CMAKE_INSTALL_QMLDIR@") +endif () + include("${CMAKE_CURRENT_LIST_DIR}/vtkModule.cmake") include("${CMAKE_CURRENT_LIST_DIR}/vtkEncodeString.cmake") include("${CMAKE_CURRENT_LIST_DIR}/vtkHashSource.cmake") @@ -284,8 +319,10 @@ if (NOT DEFINED "${CMAKE_FIND_PACKAGE_NAME}_FOUND") vtkjava) # Build the `_LIBRARIES` variable. foreach (_vtk_component IN LISTS _vtk_found_components) - list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES" - "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}") + if (TARGET "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}") + list(APPEND "${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES" + "${CMAKE_FIND_PACKAGE_NAME}::${_vtk_component}") + endif () endforeach () unset(_vtk_component) unset(_vtk_found_components) diff --git a/CMake/vtkAndroid.cmake b/CMake/vtkAndroid.cmake index d5371570b..047a6551d 100644 --- a/CMake/vtkAndroid.cmake +++ b/CMake/vtkAndroid.cmake @@ -27,7 +27,7 @@ set(ANDROID_NDK ${_ANDROID_NDK_DEFAULT} CACHE PATH if (NOT EXISTS "${ANDROID_NDK}/platforms") message(FATAL_ERROR "Please set a valid ANDROID_NDK path") endif() -set(ANDROID_NATIVE_API_LEVEL "21" CACHE STRING "Android Native API Level") +set(ANDROID_NATIVE_API_LEVEL "27" CACHE STRING "Android Native API Level") set(ANDROID_ARCH_ABI "armeabi" CACHE STRING "Target Android architecture/abi") # find android diff --git a/CMake/vtkCompilerDynamicAnalysisFlags.cmake b/CMake/vtkCompilerDynamicAnalysisFlags.cmake deleted file mode 100644 index 377ffbed1..000000000 --- a/CMake/vtkCompilerDynamicAnalysisFlags.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# Determine if this is a sanitizer build -string (FIND "${CTEST_MEMORYCHECK_TYPE}" "Sanitizer" SANITIZER_BUILD) -if (${SANITIZER_BUILD} GREATER -1) - # This is a sanitizer build. - # Configure the sanitizer blacklist file - set (SANITIZER_BLACKLIST "${VTK_BINARY_DIR}/sanitizer_blacklist.txt") - configure_file ( - "${VTK_SOURCE_DIR}/Utilities/DynamicAnalysis/sanitizer_blacklist.txt.in" - ${SANITIZER_BLACKLIST} - @ONLY - ) - - # Add the compiler flags for blacklist - set (FSANITIZE_BLACKLIST "\"-fsanitize-blacklist=${SANITIZER_BLACKLIST}\"") - foreach (entity C CXX SHARED_LINKER EXE_LINKER MODULE_LINKER) - set (CMAKE_${entity}_FLAGS "${CMAKE_${entity}_FLAGS} ${FSANITIZE_BLACKLIST}") - endforeach () -endif () diff --git a/CMake/vtkCompilerPlatformFlags.cmake b/CMake/vtkCompilerPlatformFlags.cmake index ab4bf29f0..ece8ba42c 100644 --- a/CMake/vtkCompilerPlatformFlags.cmake +++ b/CMake/vtkCompilerPlatformFlags.cmake @@ -36,7 +36,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(VTK_REQUIRED_MODULE_LINKER_FLAGS "${VTK_REQUIRED_MODULE_LINKER_FLAGS} -mthreads") endif() if(CMAKE_SYSTEM MATCHES "SunOS.*") -# Disable warnings that occur in X11 headers. + # Disable warnings that occur in X11 headers. if(DART_ROOT AND BUILD_TESTING) set(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -Wno-unknown-pragmas") set(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -Wno-unknown-pragmas") diff --git a/CMake/vtkDetectLibraryType.cmake b/CMake/vtkDetectLibraryType.cmake index bb9b3b042..ae6d3b1fb 100644 --- a/CMake/vtkDetectLibraryType.cmake +++ b/CMake/vtkDetectLibraryType.cmake @@ -1,5 +1,3 @@ -include(CMakeParseArguments) - #[==[ @brief Detect library type of a library @@ -16,11 +14,10 @@ vtk_detect_library_type( ~~~ #]==] function (vtk_detect_library_type output) - cmake_parse_arguments(vdlt + cmake_parse_arguments(PARSE_ARGV 1 vdlt "" "PATH" - "" - ${ARGN}) + "") if (NOT DEFINED vdlt_PATH) message(FATAL_ERROR diff --git a/CMake/vtkDirectories.cmake b/CMake/vtkDirectories.cmake deleted file mode 100644 index cc7e943c3..000000000 --- a/CMake/vtkDirectories.cmake +++ /dev/null @@ -1,14 +0,0 @@ -include(GNUInstallDirs) - -# VTK installation structure -set(vtk_subdir "vtk-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}") -vtk_set_with_default(VTK_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}") -vtk_set_with_default(VTK_INSTALL_LIBRARY_DIR "${CMAKE_INSTALL_LIBDIR}") -vtk_set_with_default(VTK_INSTALL_ARCHIVE_DIR "${CMAKE_INSTALL_LIBDIR}") -vtk_set_with_default(VTK_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${vtk_subdir}") -vtk_set_with_default(VTK_INSTALL_DATA_DIR "${CMAKE_INSTALL_DATADIR}/${vtk_subdir}") -# CMAKE_INSTALL_DOCDIR already includes PROJECT_NAME, which is not what we want -vtk_set_with_default(VTK_INSTALL_DOC_DIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${vtk_subdir}") -vtk_set_with_default(VTK_INSTALL_PACKAGE_DIR "${VTK_INSTALL_LIBRARY_DIR}/cmake/${vtk_subdir}") -vtk_set_with_default(VTK_INSTALL_DOXYGEN_DIR "${VTK_INSTALL_DOC_DIR}/doxygen") -vtk_set_with_default(VTK_INSTALL_NDK_MODULES_DIR "${VTK_INSTALL_DATA_DIR}/ndk-modules") diff --git a/CMake/vtkEncodeString.cmake b/CMake/vtkEncodeString.cmake index b294e8f41..562a98c37 100644 --- a/CMake/vtkEncodeString.cmake +++ b/CMake/vtkEncodeString.cmake @@ -9,8 +9,6 @@ can still be developed as a standalone file. set(_vtkEncodeString_script_file "${CMAKE_CURRENT_LIST_FILE}") -include(CMakeParseArguments) - #[==[ @brief Encode a file as a C string at build time @@ -53,11 +51,10 @@ library. in various compilers. #]==] function (vtk_encode_string) - cmake_parse_arguments(_vtk_encode_string + cmake_parse_arguments(PARSE_ARGV 0 _vtk_encode_string "BINARY;NUL_TERMINATE" "INPUT;NAME;EXPORT_SYMBOL;EXPORT_HEADER;HEADER_OUTPUT;SOURCE_OUTPUT" - "" - ${ARGN}) + "") if (_vtk_encode_string_UNPARSED_ARGUMENTS) message(FATAL_ERROR diff --git a/CMake/vtkHashSource.cmake b/CMake/vtkHashSource.cmake index 6ebd5b4fa..1834d52ff 100644 --- a/CMake/vtkHashSource.cmake +++ b/CMake/vtkHashSource.cmake @@ -7,8 +7,6 @@ generate a hash from a file and place that in a generated header. set(_vtkHashSource_script_file "${CMAKE_CURRENT_LIST_FILE}") -include(CMakeParseArguments) - #[==[ @brief Generate a header containing the hash of a file @@ -35,11 +33,10 @@ The only required variable is `INPUT`. * `HEADER_OUTPUT`: the variable to store the generated header path. #]==] function (vtk_hash_source) - cmake_parse_arguments(_vtk_hash_source + cmake_parse_arguments(PARSE_ARGV 0 _vtk_hash_source "" "INPUT;NAME;ALGORITHM;HEADER_OUTPUT" - "" - ${ARGN}) + "") if (_vtk_hash_source_UNPARSED_ARGUMENTS) message(FATAL_ERROR diff --git a/CMake/vtkInstallCMakePackage.cmake b/CMake/vtkInstallCMakePackage.cmake index cdfdadf10..dd8f7300a 100644 --- a/CMake/vtkInstallCMakePackage.cmake +++ b/CMake/vtkInstallCMakePackage.cmake @@ -19,6 +19,9 @@ else () set(vtk_has_vtkm OFF) endif () +get_property(vtk_smp_backends GLOBAL + PROPERTY _vtk_smp_backends) + _vtk_module_write_import_prefix("${vtk_cmake_build_dir}/vtk-prefix.cmake" "${vtk_cmake_destination}") set(vtk_python_version "") @@ -26,6 +29,21 @@ if (VTK_WRAP_PYTHON) set(vtk_python_version "${VTK_PYTHON_VERSION}") endif () +set(vtk_has_qml 0) +if (TARGET VTK::GUISupportQtQuick) + set(vtk_has_qml 1) +endif () + +get_property(vtk_opengl_preference_set GLOBAL + PROPERTY _vtk_opengl_preference + SET) +if (vtk_opengl_preference_set) + get_property(vtk_opengl_preference GLOBAL + PROPERTY _vtk_opengl_preference) +else () + set(vtk_opengl_preference "") +endif () + configure_file( "${vtk_cmake_dir}/vtk-config.cmake.in" "${vtk_cmake_build_dir}/vtk-config.cmake" @@ -55,6 +73,7 @@ set(vtk_cmake_module_files Finddouble-conversion.cmake FindEigen3.cmake FindEXPAT.cmake + FindExprTk.cmake FindFFMPEG.cmake FindFontConfig.cmake FindFreetype.cmake @@ -72,14 +91,15 @@ set(vtk_cmake_module_files FindNetCDF.cmake FindODBC.cmake FindOGG.cmake - FindOpenMP.cmake FindOpenSlide.cmake FindOpenVR.cmake FindOSMesa.cmake FindPEGTL.cmake + FindSDL2.cmake FindTBB.cmake FindTHEORA.cmake Findutf8cpp.cmake + FindCGNS.cmake vtkCMakeBackports.cmake vtkDetectLibraryType.cmake @@ -102,24 +122,24 @@ set(vtk_cmake_module_files vtk-use-file-error.cmake) set(vtk_cmake_patch_files patches/3.13/FindZLIB.cmake - patches/3.16/FindMPI/fortranparam_mpi.f90.in - patches/3.16/FindMPI/libver_mpi.c - patches/3.16/FindMPI/libver_mpi.f90.in - patches/3.16/FindMPI/mpiver.f90.in - patches/3.16/FindMPI/test_mpi.c - patches/3.16/FindMPI/test_mpi.f90.in - patches/3.16/FindMPI.cmake patches/3.16/FindPostgreSQL.cmake patches/3.18/FindPython/Support.cmake patches/3.18/FindPython2.cmake patches/3.18/FindPython3.cmake - patches/99/FindGDAL.cmake + patches/3.19/FindJPEG.cmake + patches/3.19/FindLibArchive.cmake + patches/3.19/FindSQLite3.cmake + patches/3.19/FindX11.cmake + patches/3.20/FindGDAL.cmake + patches/3.22/FindMPI/fortranparam_mpi.f90.in + patches/3.22/FindMPI/libver_mpi.c + patches/3.22/FindMPI/libver_mpi.f90.in + patches/3.22/FindMPI/mpiver.f90.in + patches/3.22/FindMPI/test_mpi.c + patches/3.22/FindMPI/test_mpi.f90.in + patches/3.22/FindMPI.cmake patches/99/FindHDF5.cmake - patches/99/FindJPEG.cmake - patches/99/FindLibArchive.cmake - patches/99/FindOpenGL.cmake - patches/99/FindSQLite3.cmake - patches/99/FindX11.cmake) + patches/99/FindOpenGL.cmake) set(vtk_cmake_files_to_install) foreach (vtk_cmake_module_file IN LISTS vtk_cmake_module_files vtk_cmake_patch_files) @@ -133,10 +153,6 @@ endforeach () include(vtkInstallCMakePackageHelpers) -if (NOT DEFINED VTK_RELOCATABLE_INSTALL) - option(VTK_RELOCATABLE_INSTALL "Do not embed hard-coded paths into the install" ON) - mark_as_advanced(VTK_RELOCATABLE_INSTALL) -endif () if (NOT VTK_RELOCATABLE_INSTALL) list(APPEND vtk_cmake_files_to_install "${vtk_cmake_build_dir}/vtk-find-package-helpers.cmake") diff --git a/CMake/vtkInstallCMakePackageHelpers.cmake b/CMake/vtkInstallCMakePackageHelpers.cmake index 87f860272..cba2f0963 100644 --- a/CMake/vtkInstallCMakePackageHelpers.cmake +++ b/CMake/vtkInstallCMakePackageHelpers.cmake @@ -1,7 +1,7 @@ function (_vtk_package_append_variables) set(_vtk_package_variables) foreach (var IN LISTS ARGN) - if (NOT ${var}) + if (NOT DEFINED "${var}") continue () endif () @@ -34,10 +34,21 @@ endif () # Per-package variable forwarding goes here. set(Boost_find_package_vars - Boost_INCLUDE_DIR) + Boost_INCLUDE_DIR + Boost_USE_STATIC_LIBS) +set(MPI_find_package_vars + MPI_C_COMPILER) set(OSMesa_find_package_vars OSMESA_INCLUDE_DIR OSMESA_LIBRARY) +set(Python2_find_package_vars + Python2_EXECUTABLE + Python2_INCLUDE_DIR + Python2_LIBRARY) +set(Python3_find_package_vars + Python3_EXECUTABLE + Python3_INCLUDE_DIR + Python3_LIBRARY) if ("ospray" IN_LIST _vtk_packages) # FIXME: ospray depends on embree, but does not help finders at all. @@ -57,6 +68,16 @@ foreach (_vtk_package IN LISTS _vtk_packages) ${${_vtk_package}_find_package_vars}) endforeach () +if ("OpenVDB" IN_LIST _vtk_packages) + # FIXME: FindOpenVDB is provided by upstream and needs module path help to + # work properly. + # https://github.com/AcademySoftwareFoundation/openvdb/issues/1160 + string(APPEND vtk_find_package_code + "list(INSERT CMAKE_MODULE_PATH 0 + \"${OpenVDB_CMAKE_PATH}\") +") +endif () + file(GENERATE OUTPUT "${vtk_cmake_build_dir}/vtk-find-package-helpers.cmake" CONTENT "${vtk_find_package_code}") diff --git a/CMake/vtkMobileDevices.cmake b/CMake/vtkMobileDevices.cmake index fdb57c6ed..306e11a68 100644 --- a/CMake/vtkMobileDevices.cmake +++ b/CMake/vtkMobileDevices.cmake @@ -1,8 +1,10 @@ # some specific defaults for Android to give folks # a reasonable starting point if (ANDROID OR APPLE_IOS) - set(CMAKE_REQUIRE_LARGE_FILE_SUPPORT 2 CACHE STRING "Result from TRY_RUN" FORCE) - set(CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE) + set(VTK_REQUIRE_LARGE_FILE_SUPPORT 2 CACHE STRING "Result from TRY_RUN" FORCE) + set(VTK_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE) + set(XDMF_REQUIRE_LARGE_FILE_SUPPORT 2 CACHE STRING "Result from TRY_RUN" FORCE) + set(XDMF_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE) set(KWSYS_LFS_WORKS 2 CACHE STRING "Result from TRY_RUN" FORCE) set(KWSYS_LFS_WORKS__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE) @@ -19,12 +21,15 @@ if (ANDROID OR APPLE_IOS) ) elseif (ANDROID) unset(OPENGL_INCLUDE_DIR CACHE) - unset(OPENGL_gl_LIBRARY CACHE) + unset(OPENGL_gles3_LIBRARY CACHE) unset(OPENGL_egl_LIBRARY CACHE) - find_path(OPENGL_INCLUDE_DIR GLES3/gl3.h) - find_library(OPENGL_gl_LIBRARY NAMES GLESv3) - find_library(OPENGL_egl_LIBRARY NAMES EGL) + set(_ANDROID_INC_PATH ${CMAKE_ANDROID_NDK}/sysroot/usr/include) + set(_ANDROID_LIB_PATH ${CMAKE_ANDROID_NDK}/platforms/android-${CMAKE_SYSTEM_VERSION}/arch-${CMAKE_ANDROID_ARCH}/usr/lib) + + find_path(OPENGL_INCLUDE_DIR GLES3/gl3.h ${_ANDROID_INC_PATH}) + find_library(OPENGL_gles3_LIBRARY NAMES GLESv3 PATHS ${_ANDROID_LIB_PATH}) + find_library(OPENGL_egl_LIBRARY NAMES EGL PATHS ${_ANDROID_LIB_PATH}) endif() else() # Choose static or shared libraries. diff --git a/CMake/vtkModule.cmake b/CMake/vtkModule.cmake index f005e23a2..ff4621558 100644 --- a/CMake/vtkModule.cmake +++ b/CMake/vtkModule.cmake @@ -466,14 +466,30 @@ modules may not add themselves to kits declared prior. The arguments are as foll * `HIDE_MODULES_FROM_CACHE`: (Defaults to `OFF`) Whether or not to hide the control variables from the cache or not. If enabled, modules will not be built unless they are required elsewhere. - * `ENABLE_TESTS`: (Defaults to `WANT`) Whether or not modules required by + * `ENABLE_TESTS`: (Defaults to `DEFAULT`) Whether or not modules required by the tests for the scanned modules should be enabled or not. - `ON`: Modules listed as `TEST_DEPENDS` will be required. - `OFF`: Test modules will not be considered. - - `WANT`: Test dependencies will enable modules if possible. + - `WANT`: Test dependencies will enable modules if possible. Note that this + has known issues where modules required only via testing may not have + their dependencies enabled. - `DEFAULT`: Test modules will be enabled if their required dependencies are satisfied and skipped otherwise. +To make error messages clearer, modules passed to `REQUIRES_MODULES` and +`REJECT_MODULES` may have a `_vtk_module_reason_` variable set to the +reason for the module appearing in either argument. For example, if the +`Package::Frobnitz` module is required due to a `ENABLE_FROBNITZ` cache +variable: + +~~~{.cmake} +set("_vtk_module_reason_Package::Frobnitz" + "via the `ENABLE_FROBNITZ` setting") +~~~ + +Additionally, the reason for the `WANT_BY_DEFAULT` value may be provided via +the `_vtk_module_reason_WANT_BY_DEFAULT` variable. + @section module-scanning-multiple Scanning multiple groups of modules When scanning complicated projects, multiple scans may be required to get @@ -523,11 +539,10 @@ endif () ~~~ #]==] function (vtk_module_scan) - cmake_parse_arguments(_vtk_scan + cmake_parse_arguments(PARSE_ARGV 0 _vtk_scan "" "WANT_BY_DEFAULT;HIDE_MODULES_FROM_CACHE;PROVIDES_MODULES;REQUIRES_MODULES;UNRECOGNIZED_MODULES;ENABLE_TESTS;PROVIDES_KITS" - "MODULE_FILES;KIT_FILES;REQUEST_MODULES;REJECT_MODULES" - ${ARGN}) + "MODULE_FILES;KIT_FILES;REQUEST_MODULES;REJECT_MODULES") if (_vtk_scan_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -554,7 +569,7 @@ function (vtk_module_scan) endif () if (NOT DEFINED _vtk_scan_ENABLE_TESTS) - set(_vtk_scan_ENABLE_TESTS "WANT") + set(_vtk_scan_ENABLE_TESTS "DEFAULT") endif () if (NOT (_vtk_scan_ENABLE_TESTS STREQUAL "ON" OR @@ -580,7 +595,7 @@ function (vtk_module_scan) foreach (_vtk_scan_kit_file IN LISTS _vtk_scan_KIT_FILES) if (NOT IS_ABSOLUTE "${_vtk_scan_kit_file}") - set(_vtk_scan_kit_file "${CMAKE_CURRENT_SOURCE_DIR}/${_vtk_scan_kit_file}") + string(PREPEND _vtk_scan_kit_file "${CMAKE_CURRENT_SOURCE_DIR}/") endif () set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY @@ -616,7 +631,7 @@ function (vtk_module_scan) # Read all of the module files passed in. foreach (_vtk_scan_module_file IN LISTS _vtk_scan_MODULE_FILES) if (NOT IS_ABSOLUTE "${_vtk_scan_module_file}") - set(_vtk_scan_module_file "${CMAKE_CURRENT_SOURCE_DIR}/${_vtk_scan_module_file}") + string(PREPEND _vtk_scan_module_file "${CMAKE_CURRENT_SOURCE_DIR}/") endif () set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY @@ -713,6 +728,8 @@ function (vtk_module_scan) if (NOT VTK_MODULE_ENABLE_${_vtk_scan_module_name_safe} STREQUAL "DEFAULT") set("_vtk_scan_enable_${_vtk_scan_module_name}" "${VTK_MODULE_ENABLE_${_vtk_scan_module_name_safe}}") + set("_vtk_scan_enable_reason_${_vtk_scan_module_name}" + "via `VTK_MDDULE_ENABLE_${_vtk_scan_module_name_safe}`") _vtk_module_debug(enable "@_vtk_scan_module_name@ is `${_vtk_scan_enable_${_vtk_scan_module_name}}` by cache value") endif () @@ -742,6 +759,8 @@ function (vtk_module_scan) set(_vtk_scan_group_enable "${VTK_GROUP_ENABLE_${_vtk_scan_group}}") if (NOT _vtk_scan_group_enable STREQUAL "DEFAULT") set("_vtk_scan_enable_${_vtk_scan_module_name}" "${_vtk_scan_group_enable}") + set("_vtk_scan_enable_reason_${_vtk_scan_module_name}" + "via `VTK_GROUP_ENABLE_${_vtk_scan_group}`") _vtk_module_debug(enable "@_vtk_scan_module_name@ is DEFAULT, using group `@_vtk_scan_group@` setting: @_vtk_scan_group_enable@") endif () endforeach () @@ -758,6 +777,13 @@ function (vtk_module_scan) else () set("_vtk_scan_enable_${_vtk_scan_module_name}" "DONT_WANT") endif () + if (DEFINED _vtk_module_reason_WANT_BY_DEFAULT) + set("_vtk_scan_enable_reason_${_vtk_scan_module_name}" + "${_vtk_module_reason_WANT_BY_DEFAULT}") + else () + set("_vtk_scan_enable_reason_${_vtk_scan_module_name}" + "via `WANT_BY_DEFAULT=${_vtk_scan_WANT_BY_DEFAULT}`") + endif () _vtk_module_debug(enable "@_vtk_scan_module_name@ is DEFAULT, using `WANT_BY_DEFAULT`: ${_vtk_scan_enable_${_vtk_scan_module_name}}") endif () @@ -826,6 +852,11 @@ function (vtk_module_scan) set_property(GLOBAL PROPERTY "_vtk_module_${_vtk_scan_module_name}_implementable" "${${_vtk_scan_module_name}_IMPLEMENTABLE}") + if (_vtk_scan_ENABLE_TESTS STREQUAL "WANT") + set_property(GLOBAL + PROPERTY + "_vtk_module_${_vtk_scan_module_name}_enable_tests_by_want" "1") + endif () endforeach () set(_vtk_scan_current_modules "${_vtk_scan_all_modules}") @@ -839,10 +870,24 @@ function (vtk_module_scan) # as arguments. foreach (_vtk_scan_request_module IN LISTS _vtk_scan_REQUEST_MODULES) set("_vtk_scan_provide_${_vtk_scan_request_module}" ON) + if (DEFINED "_vtk_module_reason_${_vtk_scan_request_module}") + set("_vtk_scan_provide_reason_${_vtk_scan_request_module}" + "${_vtk_module_reason_${_vtk_scan_request_module}}") + else () + set("_vtk_scan_provide_reason_${_vtk_scan_request_module}" + "via REQUEST_MODULES") + endif () _vtk_module_debug(provide "@_vtk_scan_request_module@ is provided via `REQUEST_MODULES`") endforeach () foreach (_vtk_scan_reject_module IN LISTS _vtk_scan_REJECT_MODULES) set("_vtk_scan_provide_${_vtk_scan_reject_module}" OFF) + if (DEFINED "_vtk_module_reason_${_vtk_scan_reject_module}") + set("_vtk_scan_provide_reason_${_vtk_scan_reject_module}" + "${_vtk_module_reason_${_vtk_scan_reject_module}}") + else () + set("_vtk_scan_provide_reason_${_vtk_scan_reject_module}" + "via REJECT_MODULES") + endif () _vtk_module_debug(provide "@_vtk_scan_reject_module@ is not provided via `REJECT_MODULES`") endforeach () @@ -860,6 +905,8 @@ function (vtk_module_scan) # Mark enabled modules as to-be-provided. Any errors with requiring a # disabled module will be dealt with later. set("_vtk_scan_provide_${_vtk_scan_module}" ON) + set("_vtk_scan_provide_reason_${_vtk_scan_module}" + "via a `YES` setting (${_vtk_scan_enable_reason_${_vtk_scan_module}})") _vtk_module_debug(provide "@_vtk_scan_module@ is provided due to `YES` setting") elseif (_vtk_scan_enable_${_vtk_scan_module} STREQUAL "WANT") # Check to see if we can provide this module by checking of any of its @@ -871,10 +918,18 @@ function (vtk_module_scan) endif () set("_vtk_scan_provide_${_vtk_scan_module}" ON) + set("_vtk_scan_provide_reason_${_vtk_scan_module}" + "via a `WANT` setting (${_vtk_scan_enable_reason_${_vtk_scan_module}})") _vtk_module_debug(provide "@_vtk_scan_module@ is provided due to `WANT` setting") foreach (_vtk_scan_module_depend IN LISTS "${_vtk_scan_module}_DEPENDS" "${_vtk_scan_module}_PRIVATE_DEPENDS" _vtk_scan_test_depends) if (DEFINED "_vtk_scan_provide_${_vtk_scan_module_depend}" AND NOT _vtk_scan_provide_${_vtk_scan_module_depend}) set("_vtk_scan_provide_${_vtk_scan_module}" OFF) + set("_vtk_scan_provide_reason_${_vtk_scan_module}" + "due to the ${_vtk_scan_module_depend} module not being available") + if (DEFINED "_vtk_scan_provide_reason_${_vtk_scan_module_depend}") + string(APPEND "_vtk_scan_provide_reason_${_vtk_scan_module}" + " (${_vtk_scan_provide_reason_${_vtk_scan_module_depend}})") + endif () _vtk_module_debug(provide "@_vtk_scan_module@ is not provided due to not provided dependency @_vtk_scan_module_depend@") break () endif () @@ -884,6 +939,12 @@ function (vtk_module_scan) foreach (_vtk_scan_module_depend IN LISTS "${_vtk_scan_module}_DEPENDS" "${_vtk_scan_module}_PRIVATE_DEPENDS" _vtk_scan_test_depends) if (DEFINED "_vtk_scan_provide_${_vtk_scan_module_depend}" AND NOT _vtk_scan_provide_${_vtk_scan_module_depend}) set("_vtk_scan_provide_${_vtk_scan_module}" OFF) + set("_vtk_scan_provide_reason_${_vtk_scan_module}" + "due to the ${_vtk_scan_module_depend} module not being available") + if (DEFINED "_vtk_scan_provide_reason_${_vtk_scan_module_depend}") + string(APPEND "_vtk_scan_provide_reason_${_vtk_scan_module}" + " (${_vtk_scan_provide_reason_${_vtk_scan_module_depend}})") + endif () _vtk_module_debug(provide "@_vtk_scan_module@ is not provided due to not provided dependency @_vtk_scan_module_depend@") break () endif () @@ -891,6 +952,8 @@ function (vtk_module_scan) elseif (_vtk_scan_enable_${_vtk_scan_module} STREQUAL "NO") # Disable the module. set("_vtk_scan_provide_${_vtk_scan_module}" OFF) + set("_vtk_scan_provide_reason_${_vtk_scan_module}" + "via a `NO` setting (${_vtk_scan_enable_reason_${_vtk_scan_module}})") _vtk_module_debug(provide "@_vtk_scan_module@ is not provided due to `NO` setting") endif () @@ -957,17 +1020,29 @@ function (vtk_module_scan) continue () else () message(FATAL_ERROR - "The ${_vtk_scan_module} module requires the disabled module ${_vtk_scan_module_depend}.") + "The ${_vtk_scan_module} module (enabled " + "${_vtk_scan_provide_reason_${_vtk_scan_module}}) requires the " + "disabled module ${_vtk_scan_module_depend} (disabled " + "${_vtk_scan_provide_reason_${_vtk_scan_module_depend}}).") endif () endif () if (DEFINED "_vtk_scan_provide_${_vtk_scan_module_depend}") if (NOT _vtk_scan_provide_${_vtk_scan_module_depend}) message(FATAL_ERROR - "The `${_vtk_scan_module_depend} should be provided, but is disabled.") + "The ${_vtk_scan_module_depend} module (disabled " + "${_vtk_scan_provide_reason_${_vtk_scan_module_depend}}) should " + "be provided because it is required by ${_vtk_scan_module} " + "(${_vtk_scan_provide_reason_${_vtk_scan_module}})") endif () continue () endif () + set("_vtk_scan_provide_reason_${_vtk_scan_module_depend}" + "via dependency from ${_vtk_scan_module}") + if (DEFINED "_vtk_scan_provide_reason_${_vtk_scan_module}") + string(APPEND "_vtk_scan_provide_reason_${_vtk_scan_module_depend}" + " (${_vtk_scan_provide_reason_${_vtk_scan_module}})") + endif () set("_vtk_scan_provide_${_vtk_scan_module_depend}" ON) if (NOT _vtk_scan_module_depend IN_LIST _vtk_scan_current_modules) @@ -1114,11 +1189,11 @@ function (_vtk_module_real_target var module) get_property(_vtk_real_target_kit GLOBAL PROPERTY "_vtk_module_${module}_kit") if (_vtk_real_target_kit) - set(_vtk_real_target_res "${_vtk_real_target_res}-objects") + string(APPEND _vtk_real_target_res "-objects") endif () # A query for after the module is built. elseif (TARGET "${_vtk_real_target_res}-objects") - set(_vtk_real_target_res "${_vtk_real_target_res}-objects") + string(APPEND _vtk_real_target_res "-objects") endif () endif () @@ -1128,9 +1203,12 @@ function (_vtk_module_real_target var module) if (DEFINED _vtk_build_module) set(_vtk_real_target_msg " Is a module dependency missing?") + elseif (TARGET "${module}") + set(_vtk_real_target_msg + " It's a target, but is it a VTK module?") else () set(_vtk_real_target_msg - " Is a `find_package` missing a required component?") + " The module name is not a CMake target. Is there a typo? Is it missing a `Package::` prefix? Is a `find_package` missing a required component?") endif () endif () message(FATAL_ERROR @@ -1219,11 +1297,10 @@ vtk_module_set_property( ~~~ #]==] function (vtk_module_set_property module) - cmake_parse_arguments(_vtk_property + cmake_parse_arguments(PARSE_ARGV 1 _vtk_property "APPEND;APPEND_STRING" "PROPERTY" - "VALUE" - ${ARGN}) + "VALUE") if (_vtk_property_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1280,11 +1357,10 @@ The variable name passed to the `VARIABLE` argument will be unset if the property is not set (rather than the empty string). #]==] function (vtk_module_get_property module) - cmake_parse_arguments(_vtk_property + cmake_parse_arguments(PARSE_ARGV 1 _vtk_property "" "PROPERTY;VARIABLE" - "" - ${ARGN}) + "") if (_vtk_property_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1375,11 +1451,10 @@ vtk_module_include( ~~~ #]==] function (vtk_module_include module) - cmake_parse_arguments(_vtk_include + cmake_parse_arguments(PARSE_ARGV 1 _vtk_include "SYSTEM" "" - "INTERFACE;PUBLIC;PRIVATE" - ${ARGN}) + "INTERFACE;PUBLIC;PRIVATE") if (_vtk_include_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1416,11 +1491,10 @@ vtk_module_definitions( ~~~ #]==] function (vtk_module_definitions module) - cmake_parse_arguments(_vtk_definitions + cmake_parse_arguments(PARSE_ARGV 1 _vtk_definitions "" "" - "INTERFACE;PUBLIC;PRIVATE" - ${ARGN}) + "INTERFACE;PUBLIC;PRIVATE") if (_vtk_definitions_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1451,11 +1525,10 @@ vtk_module_compile_options( ~~~ #]==] function (vtk_module_compile_options module) - cmake_parse_arguments(_vtk_compile_options + cmake_parse_arguments(PARSE_ARGV 1 _vtk_compile_options "" "" - "INTERFACE;PUBLIC;PRIVATE" - ${ARGN}) + "INTERFACE;PUBLIC;PRIVATE") if (_vtk_compile_options_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1486,11 +1559,10 @@ vtk_module_compile_features( ~~~ #]==] function (vtk_module_compile_features module) - cmake_parse_arguments(_vtk_compile_features + cmake_parse_arguments(PARSE_ARGV 1 _vtk_compile_features "" "" - "INTERFACE;PUBLIC;PRIVATE" - ${ARGN}) + "INTERFACE;PUBLIC;PRIVATE") if (_vtk_compile_features_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1507,6 +1579,77 @@ function (vtk_module_compile_features module) ${_vtk_compile_features_PRIVATE_args}) endfunction () +#[==[ +@ingroup module-impl +@brief Manage the private link target for a module + +This function manages the private link target for a module. + +~~~ +_vtk_private_kit_link_target( + [CREATE_IF_NEEDED] + [SETUP_TARGET_NAME ] + [USAGE_TARGET_NAME ]) +~~~ +#]==] +function (_vtk_private_kit_link_target module) + cmake_parse_arguments(_vtk_private_kit_link_target + "CREATE_IF_NEEDED" + "SETUP_TARGET_NAME;USAGE_TARGET_NAME" + "" + ${ARGN}) + + if (_vtk_private_kit_link_target_UNPARSED_ARGUMENTS) + message(FATAL_ERROR + "Unparsed arguments for _vtk_private_kit_link_target: " + "${_vtk_private_kit_link_target_UNPARSED_ARGUMENTS}.") + endif () + + # Compute the target name. + get_property(_vtk_private_kit_link_base_target_name GLOBAL + PROPERTY "_vtk_module_${module}_target_name") + if (NOT _vtk_private_kit_link_base_target_name) + message(FATAL_ERROR + "_vtk_private_kit_link_target only works for modules built in the " + "current project.") + endif () + + set(_vtk_private_kit_link_target_setup_name + "${_vtk_private_kit_link_base_target_name}-private-kit-links") + get_property(_vtk_private_kit_link_namespace GLOBAL + PROPERTY "_vtk_module_${module}_namespace") + if (_vtk_private_kit_link_namespace) + set(_vtk_private_kit_link_target_usage_name + "${_vtk_private_kit_link_namespace}::${_vtk_private_kit_link_target_setup_name}") + else () + set(_vtk_private_kit_link_target_usage_name + ":${_vtk_private_kit_link_target_setup_name}") + endif () + + # Create the target if requested. + if (_vtk_private_kit_link_target_CREATE_IF_NEEDED AND + NOT TARGET "${_vtk_private_kit_link_target_setup_name}") + add_library("${_vtk_private_kit_link_target_setup_name}" INTERFACE) + if (NOT _vtk_private_kit_link_target_setup_name STREQUAL _vtk_private_kit_link_target_usage_name) + add_library("${_vtk_private_kit_link_target_usage_name}" ALIAS + "${_vtk_private_kit_link_target_setup_name}") + endif () + _vtk_module_install("${_vtk_private_kit_link_target_setup_name}") + endif () + + if (_vtk_private_kit_link_target_SETUP_TARGET_NAME) + set("${_vtk_private_kit_link_target_SETUP_TARGET_NAME}" + "${_vtk_private_kit_link_target_setup_name}" + PARENT_SCOPE) + endif () + + if (_vtk_private_kit_link_target_USAGE_TARGET_NAME) + set("${_vtk_private_kit_link_target_USAGE_TARGET_NAME}" + "${_vtk_private_kit_link_target_usage_name}" + PARENT_SCOPE) + endif () +endfunction () + #[==[ @ingroup module @brief Add link libraries to a module @@ -1523,11 +1666,10 @@ vtk_module_link( ~~~ #]==] function (vtk_module_link module) - cmake_parse_arguments(_vtk_link + cmake_parse_arguments(PARSE_ARGV 1 _vtk_link "" "" - "INTERFACE;PUBLIC;PRIVATE" - ${ARGN}) + "INTERFACE;PUBLIC;PRIVATE") if (_vtk_link_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1540,29 +1682,17 @@ function (vtk_module_link module) get_property(_vtk_link_kit GLOBAL PROPERTY "_vtk_module_${module}_kit") - if (_vtk_link_kit AND NOT CMAKE_VERSION VERSION_LESS "3.12") - foreach (_vtk_link_private IN LISTS _vtk_link_PRIVATE) - if (NOT TARGET "${_vtk_link_private}") - continue () - endif () - - get_property(_vtk_link_private_imported - TARGET "${_vtk_link_private}" - PROPERTY IMPORTED) - if (_vtk_link_private_imported) - get_property(_vtk_link_private_imported_global - TARGET "${_vtk_link_private}" - PROPERTY IMPORTED_GLOBAL) - if (NOT _vtk_link_private_imported_global) - set_property(TARGET "${_vtk_link_private}" - PROPERTY - IMPORTED_GLOBAL TRUE) - endif () - endif () - endforeach () - set_property(GLOBAL APPEND - PROPERTY - "_vtk_kit_${_vtk_link_kit}_private_links" ${_vtk_link_PRIVATE}) + if (_vtk_link_kit) + if (_vtk_link_PRIVATE) + _vtk_private_kit_link_target("${module}" + CREATE_IF_NEEDED + SETUP_TARGET_NAME _vtk_link_private_kit_link_target) + foreach (_vtk_link_private IN LISTS _vtk_link_PRIVATE) + target_link_libraries("${_vtk_link_private_kit_link_target}" + INTERFACE + "$") + endforeach () + endif () endif () target_link_libraries("${_vtk_link_target}" @@ -1585,11 +1715,10 @@ vtk_module_link_options( ~~~ #]==] function (vtk_module_link_options module) - cmake_parse_arguments(_vtk_link_options + cmake_parse_arguments(PARSE_ARGV 1 _vtk_link_options "" "" - "INTERFACE;PUBLIC;PRIVATE" - ${ARGN}) + "INTERFACE;PUBLIC;PRIVATE") if (_vtk_link_options_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1687,11 +1816,10 @@ _vtk_module_set_module_property( ~~~ #]==] function (_vtk_module_set_module_property module) - cmake_parse_arguments(_vtk_property + cmake_parse_arguments(PARSE_ARGV 1 _vtk_property "APPEND;APPEND_STRING" "PROPERTY" - "VALUE" - ${ARGN}) + "VALUE") if (_vtk_property_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1757,11 +1885,10 @@ property is not set. The property name is automatically prepended with the required prefix. #]==] function (_vtk_module_get_module_property module) - cmake_parse_arguments(_vtk_property + cmake_parse_arguments(PARSE_ARGV 1 _vtk_property "" "PROPERTY;VARIABLE" - "" - ${ARGN}) + "") if (_vtk_property_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -1919,11 +2046,10 @@ The set of properties exported is computed as follows: change between the build and installation. #]==] function (_vtk_module_export_properties) - cmake_parse_arguments(_vtk_export_properties + cmake_parse_arguments(PARSE_ARGV 0 _vtk_export_properties "" "BUILD_FILE;INSTALL_FILE;MODULE;KIT" - "FROM_GLOBAL_PROPERTIES;PROPERTIES;SPLIT_INSTALL_PROPERTIES" - ${ARGN}) + "FROM_GLOBAL_PROPERTIES;PROPERTIES;SPLIT_INSTALL_PROPERTIES") if (_vtk_export_properties_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -2066,6 +2192,10 @@ vtk_module_build( [TARGETS_COMPONENT ] [INSTALL_EXPORT ] + [TARGET_SPECIFIC_COMPONENTS ] + + [UTILITY_TARGET ] + [TEST_DIRECTORY_NAME ] [TEST_DATA_TARGET ] [TEST_INPUT_DATA_DIRECTORY ] @@ -2109,6 +2239,11 @@ have reasonable defaults if not specified. component (e.g., CMake module files). * `TARGETS_COMPONENT`: `Defaults to `runtime`) The install component to use for the libraries built. + * `TARGET_SPECIFIC_COMPONENTS`: (Defaults to `OFF`) If `ON`, place artifacts + into target-specific install components (`-`). + * `UTILITY_TARGET`: If specified, all libraries and executables made by the + VTK Module API will privately link to this target. This may be used to + provide things such as project-wide compilation flags or similar. * `TARGET_NAMESPACE`: `Defaults to `\`) The namespace for installed targets. All targets must have the same namespace. If set to `\`, the namespace will be detected automatically. @@ -2142,13 +2277,13 @@ See CMake documentation for the difference between `ARCHIVE`, `LIBRARY`, and destination for library files. * `RUNTIME_DESTINATION`: (Defaults to `${CMAKE_INSTALL_BINDIR}`) The install destination for runtime files. - * `CMAKE_DESTINATION`: (Defaults to `/cmake/`) + * `CMAKE_DESTINATION`: (Defaults to `/cmake/`) The install destination for CMake files. * `LICENSE_DESTINATION`: (Defaults to `${CMAKE_INSTALL_DATAROOTDIR}/licenses/${CMAKE_PROJECT_NAME}`) The install destination for license files (relevant for third party packages). - * `HIERARCHY_DESTINATION`: (Defaults to `/vtk/hierarchy/`) The install destination + * `HIERARCHY_DESTINATION`: (Defaults to + `/vtk/hierarchy/`) The install destination for hierarchy files (used for language wrapping). #]==] function (vtk_module_build) @@ -2161,6 +2296,7 @@ function (vtk_module_build) INSTALL_EXPORT TARGETS_COMPONENT TARGET_NAMESPACE + UTILITY_TARGET # Destinations ARCHIVE_DESTINATION @@ -2181,11 +2317,10 @@ function (vtk_module_build) # TODO: Add an option to build statically? Currently, `BUILD_SHARED_LIBS` is # used. - cmake_parse_arguments(_vtk_build + cmake_parse_arguments(PARSE_ARGV 0 _vtk_build "" - "BUILD_WITH_KITS;USE_EXTERNAL;LIBRARY_NAME_SUFFIX;VERSION;SOVERSION;PACKAGE;ENABLE_WRAPPING;${_vtk_build_install_arguments};${_vtk_build_test_arguments}" - "MODULES;KITS" - ${ARGN}) + "BUILD_WITH_KITS;USE_EXTERNAL;TARGET_SPECIFIC_COMPONENTS;LIBRARY_NAME_SUFFIX;VERSION;SOVERSION;PACKAGE;ENABLE_WRAPPING;${_vtk_build_install_arguments};${_vtk_build_test_arguments}" + "MODULES;KITS") if (_vtk_build_UNPARSED_ARGUMENTS) message(FATAL_ERROR @@ -2197,6 +2332,10 @@ function (vtk_module_build) set(_vtk_build_USE_EXTERNAL OFF) endif () + if (NOT DEFINED _vtk_build_TARGET_SPECIFIC_COMPONENTS) + set(_vtk_build_TARGET_SPECIFIC_COMPONENTS OFF) + endif () + if (NOT DEFINED _vtk_build_PACKAGE) set(_vtk_build_PACKAGE "${CMAKE_PROJECT_NAME}") endif () @@ -2233,11 +2372,10 @@ function (vtk_module_build) if (NOT DEFINED _vtk_build_BUILD_WITH_KITS) set(_vtk_build_BUILD_WITH_KITS OFF) endif () - - if (_vtk_build_BUILD_WITH_KITS AND CMAKE_VERSION VERSION_LESS "3.12") - message(FATAL_ERROR - "Building with kits enabled requires CMake 3.12 which introduced " - "support for OBJECT libraries to have and utilize usage requirements.") + if (_vtk_build_BUILD_WITH_KITS AND NOT BUILD_SHARED_LIBS) + message(AUTHOR_WARNING + "Static builds with kits are not well-tested and doesn't make much " + "sense. It is recommended to only build with kits in shared builds.") endif () if (_vtk_build_BUILD_WITH_KITS AND NOT DEFINED _vtk_build_KITS) @@ -2365,8 +2503,21 @@ function (vtk_module_build) foreach (_vtk_build_depend IN LISTS "_vtk_build_${_vtk_build_module}_depends" "_vtk_build_${_vtk_build_module}_private_depends") if (NOT TARGET "${_vtk_build_depend}") + get_property(_vtk_build_enable_tests_by_want GLOBAL + PROPERTY "_vtk_module_${_vtk_build_module}_enable_tests_by_want") + + set(_vtk_build_explain "") + if (_vtk_build_enable_tests_by_want) + string(APPEND _vtk_build_explain + " The `vtk_module_scan` for this module used `ENABLE_TESTS WANT`. " + "This is a known issue, but the fix is not trivial. You may " + "either change the flag used to control testing for this scan or " + "explicitly enable the ${_vtk_build_depend} module.") + endif () + message(FATAL_ERROR - "The ${_vtk_build_depend} dependency is missing for ${_vtk_build_module}.") + "The ${_vtk_build_depend} dependency is missing for " + "${_vtk_build_module}.${_vtk_build_explain}") endif () endforeach () @@ -2432,6 +2583,13 @@ function (vtk_module_build) list(APPEND _vtk_build_kit_modules_object_libraries "${_vtk_build_kit_module_target_name}-objects") + _vtk_private_kit_link_target("${_vtk_build_kit_module}" + USAGE_TARGET_NAME _vtk_build_kit_module_usage_name) + if (TARGET "${_vtk_build_kit_module_usage_name}") + list(APPEND _vtk_build_kit_modules_private_depends + "${_vtk_build_kit_module_usage_name}") + endif () + # Since there is no link step for modules, we need to copy the private # dependencies of the constituent modules into the kit so that their # private dependencies are actually linked. @@ -2455,9 +2613,6 @@ function (vtk_module_build) endforeach () endforeach () - get_property(_vtk_build_kit_private_links GLOBAL - PROPERTY "_vtk_kit_${_vtk_build_kit}_private_links") - if (_vtk_build_kit_modules_private_depends) list(REMOVE_DUPLICATES _vtk_build_kit_modules_private_depends) endif () @@ -2468,8 +2623,14 @@ function (vtk_module_build) target_link_libraries("${_vtk_build_target_name}" PRIVATE ${_vtk_build_kit_modules_object_libraries} - ${_vtk_build_kit_modules_private_depends} - ${_vtk_build_kit_private_links}) + ${_vtk_build_kit_modules_private_depends}) + + if (_vtk_build_UTILITY_TARGET) + target_link_libraries("${_vtk_build_target_name}" + PRIVATE + "${_vtk_build_UTILITY_TARGET}") + endif () + get_property(_vtk_build_kit_library_name GLOBAL PROPERTY "_vtk_kit_${_vtk_build_kit}_library_name") if (_vtk_build_LIBRARY_NAME_SUFFIX) @@ -2682,11 +2843,10 @@ _vtk_module_standard_includes( ~~~ #]==] function (_vtk_module_standard_includes) - cmake_parse_arguments(_vtk_standard_includes + cmake_parse_arguments(PARSE_ARGV 0 _vtk_standard_includes "SYSTEM;INTERFACE" "TARGET;HEADERS_DESTINATION" - "" - ${ARGN}) + "") if (NOT _vtk_standard_includes_TARGET) message(FATAL_ERROR @@ -2826,11 +2986,10 @@ After this call, the targets given to the `TARGETS` argument will gain the preprocessor definitions to trigger registrations properly. #]==] function (vtk_module_autoinit) - cmake_parse_arguments(_vtk_autoinit + cmake_parse_arguments(PARSE_ARGV 0 _vtk_autoinit "" "" - "TARGETS;MODULES" - ${ARGN}) + "TARGETS;MODULES") if (_vtk_autoinit_UNRECOGNIZED_ARGUMENTS) message(FATAL_ERROR @@ -2994,7 +3153,7 @@ function (_vtk_module_write_wrap_hierarchy) set(_vtk_add_module_target_name_iface "${_vtk_add_module_target_name}") if (_vtk_add_module_build_with_kit) - set(_vtk_add_module_target_name_iface "${_vtk_add_module_target_name}-objects") + string(APPEND _vtk_add_module_target_name_iface "-objects") endif () set(_vtk_hierarchy_genex_compile_definitions "$") @@ -3115,6 +3274,17 @@ $<$:\n-I\'$:\n-I\'$ - [FORCE_STATIC] [HEADER_ONLY] + [FORCE_STATIC] [HEADER_ONLY] [HEADER_DIRECTORIES] [EXPORT_MACRO_PREFIX ] [HEADERS_SUBDIR ] [LIBRARY_NAME_SUFFIX ] [CLASSES ...] [TEMPLATE_CLASSES